X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f67c59f3fea793ed3ccea7f5a8106014ec2dc108..HEAD:/sdk/R/man/Collection.Rd diff --git a/sdk/R/man/Collection.Rd b/sdk/R/man/Collection.Rd index 46c76cb40b..0de9a842e6 100644 --- a/sdk/R/man/Collection.Rd +++ b/sdk/R/man/Collection.Rd @@ -1,17 +1,480 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/Collection.R -\docType{data} -\name{Collection} -\alias{Collection} -\title{Arvados Collection Object} -\format{An object of class \code{R6ClassGenerator} of length 24.} -\usage{ -Collection -} -\description{ -Update description -} -\examples{ -arv = Collection$new(api, uuid) -} -\keyword{datasets} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/Collection.R +\name{Collection} +\alias{Collection} +\title{R6 Class Representing Arvados Collection} +\description{ +Collection class provides interface for working with Arvados collections, +for exaplme actions like creating, updating, moving or removing are possible. +} +\examples{ + +## ------------------------------------------------ +## Method `Collection$new` +## ------------------------------------------------ + +\dontrun{ +collection <- Collection$new(arv, CollectionUUID) +} + +## ------------------------------------------------ +## Method `Collection$readArvFile` +## ------------------------------------------------ + +\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 +} + +## ------------------------------------------------ +## Method `Collection$writeFile` +## ------------------------------------------------ + +\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 +} + +## ------------------------------------------------ +## Method `Collection$create` +## ------------------------------------------------ + +\dontrun{ +collection <- arv$collections_create(name = collectionTitle, description = collectionDescription, owner_uuid = collectionOwner, properties = list("ROX37196928443768648" = "ROX37742976443830153")) +} + +## ------------------------------------------------ +## Method `Collection$remove` +## ------------------------------------------------ + +\dontrun{ +collection$remove(fileName.format) +} + +## ------------------------------------------------ +## Method `Collection$move` +## ------------------------------------------------ + +\dontrun{ +collection$move("fileName.format", path) +} + +## ------------------------------------------------ +## Method `Collection$copy` +## ------------------------------------------------ + +\dontrun{ +copied <- collection$copy("oldName.format", "newName.format") +} + +## ------------------------------------------------ +## Method `Collection$refresh` +## ------------------------------------------------ + +\dontrun{ +collection$refresh() +} + +## ------------------------------------------------ +## Method `Collection$getFileListing` +## ------------------------------------------------ + +\dontrun{ +list <- collection$getFileListing() +} + +## ------------------------------------------------ +## Method `Collection$get` +## ------------------------------------------------ + +\dontrun{ +arvadosFile <- collection$get(fileName) +} +} +\seealso{ +https://git.arvados.org/arvados.git/tree/HEAD:/sdk/R +} +\section{Public fields}{ +\if{html}{\out{
}} +\describe{ +\item{\code{uuid}}{Autentic for Collection UUID.} +} +\if{html}{\out{
}} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-Collection-new}{\code{Collection$new()}} +\item \href{#method-Collection-add}{\code{Collection$add()}} +\item \href{#method-Collection-readArvFile}{\code{Collection$readArvFile()}} +\item \href{#method-Collection-writeFile}{\code{Collection$writeFile()}} +\item \href{#method-Collection-create}{\code{Collection$create()}} +\item \href{#method-Collection-remove}{\code{Collection$remove()}} +\item \href{#method-Collection-move}{\code{Collection$move()}} +\item \href{#method-Collection-copy}{\code{Collection$copy()}} +\item \href{#method-Collection-refresh}{\code{Collection$refresh()}} +\item \href{#method-Collection-getFileListing}{\code{Collection$getFileListing()}} +\item \href{#method-Collection-get}{\code{Collection$get()}} +\item \href{#method-Collection-getRESTService}{\code{Collection$getRESTService()}} +\item \href{#method-Collection-setRESTService}{\code{Collection$setRESTService()}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-new}{}}} +\subsection{Method \code{new()}}{ +Initialize new enviroment. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$new(api, uuid)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{api}}{Arvados enviroment.} + +\item{\code{uuid}}{The UUID Autentic for Collection UUID.} +} +\if{html}{\out{
}} +} +\subsection{Returns}{ +A new `Collection` object. +} +\subsection{Examples}{ +\if{html}{\out{
}} +\preformatted{\dontrun{ +collection <- Collection$new(arv, CollectionUUID) +} +} +\if{html}{\out{
}} + +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-add}{}}} +\subsection{Method \code{add()}}{ +Adds ArvadosFile or Subcollection specified by content to the collection. Used only with ArvadosFile or Subcollection. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$add(content, relativePath = "")}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{content}}{Content to be added.} + +\item{\code{relativePath}}{Path to add content.} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-readArvFile}{}}} +\subsection{Method \code{readArvFile()}}{ +Read file content. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$readArvFile( + file, + con, + sep = ",", + istable = NULL, + fileclass = "SeqFastadna", + Ncol = NULL, + Nrow = NULL, + wantedFunction = NULL +)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{file}}{Name of the file.} + +\item{\code{sep}}{Separator used in reading tsv, csv file format.} + +\item{\code{istable}}{Used in reading txt file to check if the file is table or not.} + +\item{\code{fileclass}}{Used in reading fasta file to set file class.} + +\item{\code{Ncol}}{Used in reading binary file to set numbers of columns in data.frame.} + +\item{\code{Nrow}}{Used in reading binary file to set numbers of rows in data.frame size.} + +\item{\code{col}}{Collection from which the file is read.} +} +\if{html}{\out{
}} +} +\subsection{Examples}{ +\if{html}{\out{
}} +\preformatted{\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 +} +} +\if{html}{\out{
}} + +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-writeFile}{}}} +\subsection{Method \code{writeFile()}}{ +Write file content +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$writeFile( + name, + file, + collectionUUID, + fileFormat, + istable = NULL, + seqName = NULL +)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{name}}{Name of the file.} + +\item{\code{file}}{File to be saved.} + +\item{\code{istable}}{Used in writing txt file to check if the file is table or not.} +} +\if{html}{\out{
}} +} +\subsection{Examples}{ +\if{html}{\out{
}} +\preformatted{\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 +} +} +\if{html}{\out{
}} + +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-create}{}}} +\subsection{Method \code{create()}}{ +Creates one or more ArvadosFiles and adds them to the collection at specified path. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$create(files)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{files}}{Content to be created.} +} +\if{html}{\out{
}} +} +\subsection{Examples}{ +\if{html}{\out{
}} +\preformatted{\dontrun{ +collection <- arv$collections_create(name = collectionTitle, description = collectionDescription, owner_uuid = collectionOwner, properties = list("ROX37196928443768648" = "ROX37742976443830153")) +} +} +\if{html}{\out{
}} + +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-remove}{}}} +\subsection{Method \code{remove()}}{ +Remove one or more files from the collection. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$remove(paths)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{paths}}{Content to be removed.} +} +\if{html}{\out{
}} +} +\subsection{Examples}{ +\if{html}{\out{
}} +\preformatted{\dontrun{ +collection$remove(fileName.format) +} +} +\if{html}{\out{
}} + +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-move}{}}} +\subsection{Method \code{move()}}{ +Moves ArvadosFile or Subcollection to another location in the collection. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$move(content, destination)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{content}}{Content to be moved.} + +\item{\code{destination}}{Path to move content.} +} +\if{html}{\out{
}} +} +\subsection{Examples}{ +\if{html}{\out{
}} +\preformatted{\dontrun{ +collection$move("fileName.format", path) +} +} +\if{html}{\out{
}} + +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-copy}{}}} +\subsection{Method \code{copy()}}{ +Copies ArvadosFile or Subcollection to another location in the collection. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$copy(content, destination)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{content}}{Content to be moved.} + +\item{\code{destination}}{Path to move content.} +} +\if{html}{\out{
}} +} +\subsection{Examples}{ +\if{html}{\out{
}} +\preformatted{\dontrun{ +copied <- collection$copy("oldName.format", "newName.format") +} +} +\if{html}{\out{
}} + +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-refresh}{}}} +\subsection{Method \code{refresh()}}{ +Refreshes the environment. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$refresh()}\if{html}{\out{
}} +} + +\subsection{Examples}{ +\if{html}{\out{
}} +\preformatted{\dontrun{ +collection$refresh() +} +} +\if{html}{\out{
}} + +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-getFileListing}{}}} +\subsection{Method \code{getFileListing()}}{ +Returns collections file content as character vector. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$getFileListing()}\if{html}{\out{
}} +} + +\subsection{Examples}{ +\if{html}{\out{
}} +\preformatted{\dontrun{ +list <- collection$getFileListing() +} +} +\if{html}{\out{
}} + +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-get}{}}} +\subsection{Method \code{get()}}{ +If relativePath is valid, returns ArvadosFile or Subcollection specified by relativePath, else returns NULL. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$get(relativePath)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{relativePath}}{Path from content is taken.} +} +\if{html}{\out{
}} +} +\subsection{Examples}{ +\if{html}{\out{
}} +\preformatted{\dontrun{ +arvadosFile <- collection$get(fileName) +} +} +\if{html}{\out{
}} + +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-getRESTService}{}}} +\subsection{Method \code{getRESTService()}}{ +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$getRESTService()}\if{html}{\out{
}} +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-Collection-setRESTService}{}}} +\subsection{Method \code{setRESTService()}}{ +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Collection$setRESTService(newRESTService)}\if{html}{\out{
}} +} + +} +}