Collection | R Documentation |
Collection class provides interface for working with Arvados collections, for exaplme actions like creating, updating, moving or removing are possible.
uuid
Autentic for Collection UUID.
new()
Initialize new enviroment.
Collection$new(api, uuid)
api
Arvados enviroment.
uuid
The UUID Autentic for Collection UUID.
A new 'Collection' object.
\dontrun{ 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 = "")
content
Content to be added.
relativePath
Path to add content.
readArvFile()
Read file content.
Collection$readArvFile( file, con, sep = ",", istable = NULL, fileclass = "SeqFastadna", Ncol = NULL, Nrow = NULL, wantedFunction = NULL )
file
Name of the file.
sep
Separator used in reading tsv, csv file format.
istable
Used in reading txt file to check if the file is table or not.
fileclass
Used in reading fasta file to set file class.
Ncol
Used in reading binary file to set numbers of columns in data.frame.
Nrow
Used in reading binary file to set numbers of rows in data.frame size.
col
Collection from which the file is read.
\dontrun{ 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 = 'fasta') # 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, collectionUUID, fileFormat, istable = NULL, seqName = NULL )
name
Name of the file.
file
File to be saved.
istable
Used in writing txt file to check if the file is table or not.
\dontrun{ collection <- Collection$new(arv, collectionUUID) writeFile <- collection$writeFile(name = "myoutput.csv", file = file, fileFormat = "csv", istable = NULL, collectionUUID = collectionUUID) # csv writeFile <- collection$writeFile(name = "myoutput.tsv", file = file, fileFormat = "tsv", istable = NULL, collectionUUID = collectionUUID) # tsv writeFile <- collection$writeFile(name = "myoutput.fasta", file = file, fileFormat = "fasta", istable = NULL, collectionUUID = collectionUUID) # fasta writeFile <- collection$writeFile(name = "myoutputtable.txt", file = file, fileFormat = "txt", istable = "yes", collectionUUID = collectionUUID) # txt table writeFile <- collection$writeFile(name = "myoutputtext.txt", file = file, fileFormat = "txt", istable = "no", collectionUUID = collectionUUID) # txt text writeFile <- collection$writeFile(name = "myoutputbinary.dat", file = file, fileFormat = "dat", collectionUUID = collectionUUID) # binary writeFile <- collection$writeFile(name = "myoutputxlsx.xlsx", file = file, fileFormat = "xlsx", collectionUUID = collectionUUID) # xlsx }
create()
Creates one or more ArvadosFiles and adds them to the collection at specified path.
Collection$create(files)
files
Content to be created.
\dontrun{ 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)
paths
Content to be removed.
\dontrun{ collection$remove(fileName.format) }
move()
Moves ArvadosFile or Subcollection to another location in the collection.
Collection$move(content, destination)
content
Content to be moved.
destination
Path to move content.
\dontrun{ collection$move("fileName.format", path) }
copy()
Copies ArvadosFile or Subcollection to another location in the collection.
Collection$copy(content, destination)
content
Content to be moved.
destination
Path to move content.
\dontrun{ copied <- collection$copy("oldName.format", "newName.format") }
refresh()
Refreshes the environment.
Collection$refresh()
\dontrun{ collection$refresh() }
getFileListing()
Returns collections file content as character vector.
Collection$getFileListing()
\dontrun{ list <- collection$getFileListing() }
get()
If relativePath is valid, returns ArvadosFile or Subcollection specified by relativePath, else returns NULL.
Collection$get(relativePath)
relativePath
Path from content is taken.
\dontrun{ arvadosFile <- collection$get(fileName) }
getRESTService()
Collection$getRESTService()
setRESTService()
Collection$setRESTService(newRESTService)
https://git.arvados.org/arvados.git/tree/HEAD:/sdk/R
## ------------------------------------------------ ## Method `Collection$new` ## ------------------------------------------------ ## Not run: collection <- Collection$new(arv, CollectionUUID) ## End(Not run) ## ------------------------------------------------ ## Method `Collection$readArvFile` ## ------------------------------------------------ ## Not run: 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 = 'fasta') # 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 ## End(Not run) ## ------------------------------------------------ ## Method `Collection$writeFile` ## ------------------------------------------------ ## Not run: collection <- Collection$new(arv, collectionUUID) writeFile <- collection$writeFile(name = "myoutput.csv", file = file, fileFormat = "csv", istable = NULL, collectionUUID = collectionUUID) # csv writeFile <- collection$writeFile(name = "myoutput.tsv", file = file, fileFormat = "tsv", istable = NULL, collectionUUID = collectionUUID) # tsv writeFile <- collection$writeFile(name = "myoutput.fasta", file = file, fileFormat = "fasta", istable = NULL, collectionUUID = collectionUUID) # fasta writeFile <- collection$writeFile(name = "myoutputtable.txt", file = file, fileFormat = "txt", istable = "yes", collectionUUID = collectionUUID) # txt table writeFile <- collection$writeFile(name = "myoutputtext.txt", file = file, fileFormat = "txt", istable = "no", collectionUUID = collectionUUID) # txt text writeFile <- collection$writeFile(name = "myoutputbinary.dat", file = file, fileFormat = "dat", collectionUUID = collectionUUID) # binary writeFile <- collection$writeFile(name = "myoutputxlsx.xlsx", file = file, fileFormat = "xlsx", collectionUUID = collectionUUID) # xlsx ## End(Not run) ## ------------------------------------------------ ## Method `Collection$create` ## ------------------------------------------------ ## Not run: collection <- arv$collections_create(name = collectionTitle, description = collectionDescription, owner_uuid = collectionOwner, properties = list("ROX37196928443768648" = "ROX37742976443830153")) ## End(Not run) ## ------------------------------------------------ ## Method `Collection$remove` ## ------------------------------------------------ ## Not run: collection$remove(fileName.format) ## End(Not run) ## ------------------------------------------------ ## Method `Collection$move` ## ------------------------------------------------ ## Not run: collection$move("fileName.format", path) ## End(Not run) ## ------------------------------------------------ ## Method `Collection$copy` ## ------------------------------------------------ ## Not run: copied <- collection$copy("oldName.format", "newName.format") ## End(Not run) ## ------------------------------------------------ ## Method `Collection$refresh` ## ------------------------------------------------ ## Not run: collection$refresh() ## End(Not run) ## ------------------------------------------------ ## Method `Collection$getFileListing` ## ------------------------------------------------ ## Not run: list <- collection$getFileListing() ## End(Not run) ## ------------------------------------------------ ## Method `Collection$get` ## ------------------------------------------------ ## Not run: arvadosFile <- collection$get(fileName) ## End(Not run)