R SDK for Arvados Examples of usage: -------------------------------------------------------------------------------------------------------------------------------- #Initialize API: arv <- Arvados$new("insert_token", "insert_host_name") -------------------------------------------------------------------------------------------------------------------------------- #Get collection: arv$getCollection("uuid") -------------------------------------------------------------------------------------------------------------------------------- #List collections: collectionList <- arv$listCollections(list("uuid", "=" "aaaaa-bbbbb-ccccccccccccccc"), limit = 10, offset = 2) -------------------------------------------------------------------------------------------------------------------------------- #Delete collection: deletedCollection <- arv$deleteCollection("uuid") -------------------------------------------------------------------------------------------------------------------------------- #Update collection: updatedCollection <- arv$updateCollection("uuid", list(collection = list(name = "new_name", description = "new_desciption"))) -------------------------------------------------------------------------------------------------------------------------------- #Create collection: updatedCollection <- arv$createCollection("uuid", list(collection = list(name = "new_name", description = "new_desciption"))) -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- #Collection manipulation: -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- #Create collection object: arv <- Arvados$new("insert_token", "insert_host_name") collection <- Collection$new(arv, "uuid") -------------------------------------------------------------------------------------------------------------------------------- #Print content of the collection (directory/folder tree structure) collection$printFileContent() -------------------------------------------------------------------------------------------------------------------------------- #Get file/folder content as character vector collection$getFileContent() -------------------------------------------------------------------------------------------------------------------------------- #This will return ArvadosFile or Subcollection from internal tree-like structure. arvadosFile <- collection$get("location/to/my/file.cpp") #or arvadosSubcollection <- collection$get("location/to/my/directory/") -------------------------------------------------------------------------------------------------------------------------------- #Read whole file or just a portion of it. fileContent <- arvadosFile$read(offset = 1024, length = 512) -------------------------------------------------------------------------------------------------------------------------------- #Get ArvadosFile or Subcollection size size <- arvadosFile$getSizeInBytes() size <- arvadosSubcollection$getSizeInBytes() -------------------------------------------------------------------------------------------------------------------------------- #Create new file in a collection #Call structure collection$createNewFile("relativePath", "fileContent", "fileContentType") #Example collection$createNewFile("cpp/src/main.cpp", "#include", "text/html") -------------------------------------------------------------------------------------------------------------------------------- #Write to existing file (Override current content of the file) arvadosFile <- collection$get("location/to/my/file.cpp") arvadosFile$write("This is new file content") --------------------------------------------------------------------------------------------------------------------------------