| Collection | R Documentation |
Collection class provides interface for working with Arvados collections, for exaplme actions like creating, updating, moving or removing are possible.
uuidAutentic for Collection UUID.
new()Initialize new enviroment.
Collection$new(api, uuid)
apiArvados enviroment.
uuidThe UUID Autentic for Collection UUID.
A new 'Collection' object.
collection <- Collection$new(arv, CollectionUUID)
add()Adds ArvadosFile or Subcollection specified by content to the collection. Used only with ArvadosFile or Subcollection.
Collection$add(content, relativePath = "")
contentContent to be added.
relativePathPath to add content.
readArvFile()Read file content.
Collection$readArvFile( file, con, sep = ",", istable = NULL, fileclass = "SeqFastadna", Ncol = NULL, Nrow = NULL, wantedFunction = NULL )
fileName of the file.
sepSeparator used in reading tsv, csv file format.
istableUsed in reading txt file to check if the file is table or not.
fileclassUsed in reading fasta file to set file class.
NcolUsed in reading binary file to set numbers of columns in data.frame.
NrowUsed in reading binary file to set numbers of rows in data.frame size.
colCollection from which the file is read.
collection <- Collection$new(arv, collectionUUID) readFile <- collection$readArvFile(arvadosFile, istable = 'yes') # table readFile <- collection$readArvFile(arvadosFile, istable = 'no') # text readFile <- collection$readArvFile(arvadosFile) # xlsx, csv, tsv, rds, rdata readFile <- collection$readArvFile(arvadosFile, fileclass = 'lala') # fasta readFile <- collection$readArvFile(arvadosFile, Ncol= 4, Nrow = 32) # binary, only numbers readFile <- collection$readArvFile(arvadosFile, Ncol = 5, Nrow = 150, istable = "factor") # binary with factor or text
writeFile()Write file content
Collection$writeFile(name, file, istable = NULL, seqName = NULL)
nameName of the file.
fileFile to be saved.
istableUsed in writing txt file to check if the file is table or not.
collection <- Collection$new(arv, collectionUUID)
writeFile <- collection$writeFile("myoutput.csv", file, istable = NULL) # csv
writeFile <- collection$writeFile("myoutput.fasta", file, istable = NULL) # fasta
writeFile <- collection$writeFile("myoutputtable.txt", file, istable = "yes") # txt table
writeFile <- collection$writeFile("myoutputtext.txt", file, istable = "no") # txt text
writeFile <- collection$writeFile("myoutputbinary.dat", file) # binary
writeFile <- collection$writeFile("myoutputxlsx.xlsx", file) # xlsx
create()Creates one or more ArvadosFiles and adds them to the collection at specified path.
Collection$create(files)
filesContent to be created.
collection <- arv$collections_create(name = collectionTitle, description = collectionDescription, owner_uuid = collectionOwner, properties = list("ROX37196928443768648" = "ROX37742976443830153"))
remove()Remove one or more files from the collection.
Collection$remove(paths)
pathsContent to be removed.
collection$remove(fileName.format)
move()Moves ArvadosFile or Subcollection to another location in the collection.
Collection$move(content, destination)
contentContent to be moved.
destinationPath to move content.
collection$move("fileName.format", path)
copy()Copies ArvadosFile or Subcollection to another location in the collection.
Collection$copy(content, destination)
contentContent to be moved.
destinationPath to move content.
copied <- collection$copy("oldName.format", "newName.format")
refresh()Refreshes the environment.
Collection$refresh()
collection$refresh()
getFileListing()Returns collections file content as character vector.
Collection$getFileListing()
list <- collection$getFileListing()
get()If relativePath is valid, returns ArvadosFile or Subcollection specified by relativePath, else returns NULL.
Collection$get(relativePath)
relativePathPath from content is taken.
arvadosFile <- collection$get(fileName)
getRESTService()Collection$getRESTService()
setRESTService()Collection$setRESTService(newRESTService)
https://github.com/arvados/arvados/tree/main/sdk/R
## ------------------------------------------------
## Method `Collection$new`
## ------------------------------------------------
collection <- Collection$new(arv, CollectionUUID)
## ------------------------------------------------
## Method `Collection$readArvFile`
## ------------------------------------------------
collection <- Collection$new(arv, collectionUUID)
readFile <- collection$readArvFile(arvadosFile, istable = 'yes') # table
readFile <- collection$readArvFile(arvadosFile, istable = 'no') # text
readFile <- collection$readArvFile(arvadosFile) # xlsx, csv, tsv, rds, rdata
readFile <- collection$readArvFile(arvadosFile, fileclass = 'lala') # fasta
readFile <- collection$readArvFile(arvadosFile, Ncol= 4, Nrow = 32) # binary, only numbers
readFile <- collection$readArvFile(arvadosFile, Ncol = 5, Nrow = 150, istable = "factor") # binary with factor or text
## ------------------------------------------------
## Method `Collection$writeFile`
## ------------------------------------------------
collection <- Collection$new(arv, collectionUUID)
writeFile <- collection$writeFile("myoutput.csv", file, istable = NULL) # csv
writeFile <- collection$writeFile("myoutput.fasta", file, istable = NULL) # fasta
writeFile <- collection$writeFile("myoutputtable.txt", file, istable = "yes") # txt table
writeFile <- collection$writeFile("myoutputtext.txt", file, istable = "no") # txt text
writeFile <- collection$writeFile("myoutputbinary.dat", file) # binary
writeFile <- collection$writeFile("myoutputxlsx.xlsx", file) # xlsx
## ------------------------------------------------
## Method `Collection$create`
## ------------------------------------------------
collection <- arv$collections_create(name = collectionTitle, description = collectionDescription, owner_uuid = collectionOwner, properties = list("ROX37196928443768648" = "ROX37742976443830153"))
## ------------------------------------------------
## Method `Collection$remove`
## ------------------------------------------------
collection$remove(fileName.format)
## ------------------------------------------------
## Method `Collection$move`
## ------------------------------------------------
collection$move("fileName.format", path)
## ------------------------------------------------
## Method `Collection$copy`
## ------------------------------------------------
copied <- collection$copy("oldName.format", "newName.format")
## ------------------------------------------------
## Method `Collection$refresh`
## ------------------------------------------------
collection$refresh()
## ------------------------------------------------
## Method `Collection$getFileListing`
## ------------------------------------------------
list <- collection$getFileListing()
## ------------------------------------------------
## Method `Collection$get`
## ------------------------------------------------
arvadosFile <- collection$get(fileName)