Merge branch '21666-provision-test-improvement'
[arvados.git] / sdk / R / man / Collection.Rd
index 46c76cb40b49c7026e375cd4fa6ce0f69b56d3d3..0de9a842e6805656c15a3924b58030f3e2412dcc 100644 (file)
-% 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\r
+% Please edit documentation in R/Collection.R\r
+\name{Collection}\r
+\alias{Collection}\r
+\title{R6 Class Representing Arvados Collection}\r
+\description{\r
+Collection class provides interface for working with Arvados collections,\r
+for exaplme actions like creating, updating, moving or removing are possible.\r
+}\r
+\examples{\r
+\r
+## ------------------------------------------------\r
+## Method `Collection$new`\r
+## ------------------------------------------------\r
+\r
+\dontrun{\r
+collection <- Collection$new(arv, CollectionUUID)\r
+}\r
+\r
+## ------------------------------------------------\r
+## Method `Collection$readArvFile`\r
+## ------------------------------------------------\r
+\r
+\dontrun{\r
+collection <- Collection$new(arv, collectionUUID)\r
+readFile <- collection$readArvFile(arvadosFile, istable = 'yes')                    # table\r
+readFile <- collection$readArvFile(arvadosFile, istable = 'no')                     # text\r
+readFile <- collection$readArvFile(arvadosFile)                                     # xlsx, csv, tsv, rds, rdata\r
+readFile <- collection$readArvFile(arvadosFile, fileclass = 'fasta')                # fasta\r
+readFile <- collection$readArvFile(arvadosFile, Ncol= 4, Nrow = 32)                 # binary, only numbers\r
+readFile <- collection$readArvFile(arvadosFile, Ncol = 5, Nrow = 150, istable = "factor") # binary with factor or text\r
+}\r
+\r
+## ------------------------------------------------\r
+## Method `Collection$writeFile`\r
+## ------------------------------------------------\r
+\r
+\dontrun{\r
+collection <- Collection$new(arv, collectionUUID)\r
+writeFile <- collection$writeFile(name = "myoutput.csv", file = file, fileFormat = "csv", istable = NULL, collectionUUID = collectionUUID)             # csv\r
+writeFile <- collection$writeFile(name = "myoutput.tsv", file = file, fileFormat = "tsv", istable = NULL, collectionUUID = collectionUUID)             # tsv\r
+writeFile <- collection$writeFile(name = "myoutput.fasta", file = file, fileFormat = "fasta", istable = NULL, collectionUUID = collectionUUID)         # fasta\r
+writeFile <- collection$writeFile(name = "myoutputtable.txt", file = file, fileFormat = "txt", istable = "yes", collectionUUID = collectionUUID)       # txt table\r
+writeFile <- collection$writeFile(name = "myoutputtext.txt", file = file, fileFormat = "txt", istable = "no", collectionUUID = collectionUUID)         # txt text\r
+writeFile <- collection$writeFile(name = "myoutputbinary.dat", file = file, fileFormat = "dat", collectionUUID = collectionUUID)                       # binary\r
+writeFile <- collection$writeFile(name = "myoutputxlsx.xlsx", file = file, fileFormat = "xlsx", collectionUUID = collectionUUID)                       # xlsx\r
+}\r
+\r
+## ------------------------------------------------\r
+## Method `Collection$create`\r
+## ------------------------------------------------\r
+\r
+\dontrun{\r
+collection <- arv$collections_create(name = collectionTitle, description = collectionDescription, owner_uuid = collectionOwner, properties = list("ROX37196928443768648" = "ROX37742976443830153"))\r
+}\r
+\r
+## ------------------------------------------------\r
+## Method `Collection$remove`\r
+## ------------------------------------------------\r
+\r
+\dontrun{\r
+collection$remove(fileName.format)\r
+}\r
+\r
+## ------------------------------------------------\r
+## Method `Collection$move`\r
+## ------------------------------------------------\r
+\r
+\dontrun{\r
+collection$move("fileName.format", path)\r
+}\r
+\r
+## ------------------------------------------------\r
+## Method `Collection$copy`\r
+## ------------------------------------------------\r
+\r
+\dontrun{\r
+copied <- collection$copy("oldName.format", "newName.format")\r
+}\r
+\r
+## ------------------------------------------------\r
+## Method `Collection$refresh`\r
+## ------------------------------------------------\r
+\r
+\dontrun{\r
+collection$refresh()\r
+}\r
+\r
+## ------------------------------------------------\r
+## Method `Collection$getFileListing`\r
+## ------------------------------------------------\r
+\r
+\dontrun{\r
+list <- collection$getFileListing()\r
+}\r
+\r
+## ------------------------------------------------\r
+## Method `Collection$get`\r
+## ------------------------------------------------\r
+\r
+\dontrun{\r
+arvadosFile <- collection$get(fileName)\r
+}\r
+}\r
+\seealso{\r
+https://git.arvados.org/arvados.git/tree/HEAD:/sdk/R\r
+}\r
+\section{Public fields}{\r
+\if{html}{\out{<div class="r6-fields">}}\r
+\describe{\r
+\item{\code{uuid}}{Autentic for Collection UUID.}\r
+}\r
+\if{html}{\out{</div>}}\r
+}\r
+\section{Methods}{\r
+\subsection{Public methods}{\r
+\itemize{\r
+\item \href{#method-Collection-new}{\code{Collection$new()}}\r
+\item \href{#method-Collection-add}{\code{Collection$add()}}\r
+\item \href{#method-Collection-readArvFile}{\code{Collection$readArvFile()}}\r
+\item \href{#method-Collection-writeFile}{\code{Collection$writeFile()}}\r
+\item \href{#method-Collection-create}{\code{Collection$create()}}\r
+\item \href{#method-Collection-remove}{\code{Collection$remove()}}\r
+\item \href{#method-Collection-move}{\code{Collection$move()}}\r
+\item \href{#method-Collection-copy}{\code{Collection$copy()}}\r
+\item \href{#method-Collection-refresh}{\code{Collection$refresh()}}\r
+\item \href{#method-Collection-getFileListing}{\code{Collection$getFileListing()}}\r
+\item \href{#method-Collection-get}{\code{Collection$get()}}\r
+\item \href{#method-Collection-getRESTService}{\code{Collection$getRESTService()}}\r
+\item \href{#method-Collection-setRESTService}{\code{Collection$setRESTService()}}\r
+}\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-new"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-new}{}}}\r
+\subsection{Method \code{new()}}{\r
+Initialize new enviroment.\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$new(api, uuid)}\if{html}{\out{</div>}}\r
+}\r
+\r
+\subsection{Arguments}{\r
+\if{html}{\out{<div class="arguments">}}\r
+\describe{\r
+\item{\code{api}}{Arvados enviroment.}\r
+\r
+\item{\code{uuid}}{The UUID Autentic for Collection UUID.}\r
+}\r
+\if{html}{\out{</div>}}\r
+}\r
+\subsection{Returns}{\r
+A new `Collection` object.\r
+}\r
+\subsection{Examples}{\r
+\if{html}{\out{<div class="r example copy">}}\r
+\preformatted{\dontrun{\r
+collection <- Collection$new(arv, CollectionUUID)\r
+}\r
+}\r
+\if{html}{\out{</div>}}\r
+\r
+}\r
+\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-add"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-add}{}}}\r
+\subsection{Method \code{add()}}{\r
+Adds ArvadosFile or Subcollection specified by content to the collection. Used only with ArvadosFile or Subcollection.\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$add(content, relativePath = "")}\if{html}{\out{</div>}}\r
+}\r
+\r
+\subsection{Arguments}{\r
+\if{html}{\out{<div class="arguments">}}\r
+\describe{\r
+\item{\code{content}}{Content to be added.}\r
+\r
+\item{\code{relativePath}}{Path to add content.}\r
+}\r
+\if{html}{\out{</div>}}\r
+}\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-readArvFile"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-readArvFile}{}}}\r
+\subsection{Method \code{readArvFile()}}{\r
+Read file content.\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$readArvFile(\r
+  file,\r
+  con,\r
+  sep = ",",\r
+  istable = NULL,\r
+  fileclass = "SeqFastadna",\r
+  Ncol = NULL,\r
+  Nrow = NULL,\r
+  wantedFunction = NULL\r
+)}\if{html}{\out{</div>}}\r
+}\r
+\r
+\subsection{Arguments}{\r
+\if{html}{\out{<div class="arguments">}}\r
+\describe{\r
+\item{\code{file}}{Name of the file.}\r
+\r
+\item{\code{sep}}{Separator used in reading tsv, csv file format.}\r
+\r
+\item{\code{istable}}{Used in reading txt file to check if the file is table or not.}\r
+\r
+\item{\code{fileclass}}{Used in reading fasta file to set file class.}\r
+\r
+\item{\code{Ncol}}{Used in reading binary file to set numbers of columns in data.frame.}\r
+\r
+\item{\code{Nrow}}{Used in reading binary file to set numbers of rows in data.frame size.}\r
+\r
+\item{\code{col}}{Collection from which the file is read.}\r
+}\r
+\if{html}{\out{</div>}}\r
+}\r
+\subsection{Examples}{\r
+\if{html}{\out{<div class="r example copy">}}\r
+\preformatted{\dontrun{\r
+collection <- Collection$new(arv, collectionUUID)\r
+readFile <- collection$readArvFile(arvadosFile, istable = 'yes')                    # table\r
+readFile <- collection$readArvFile(arvadosFile, istable = 'no')                     # text\r
+readFile <- collection$readArvFile(arvadosFile)                                     # xlsx, csv, tsv, rds, rdata\r
+readFile <- collection$readArvFile(arvadosFile, fileclass = 'fasta')                # fasta\r
+readFile <- collection$readArvFile(arvadosFile, Ncol= 4, Nrow = 32)                 # binary, only numbers\r
+readFile <- collection$readArvFile(arvadosFile, Ncol = 5, Nrow = 150, istable = "factor") # binary with factor or text\r
+}\r
+}\r
+\if{html}{\out{</div>}}\r
+\r
+}\r
+\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-writeFile"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-writeFile}{}}}\r
+\subsection{Method \code{writeFile()}}{\r
+Write file content\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$writeFile(\r
+  name,\r
+  file,\r
+  collectionUUID,\r
+  fileFormat,\r
+  istable = NULL,\r
+  seqName = NULL\r
+)}\if{html}{\out{</div>}}\r
+}\r
+\r
+\subsection{Arguments}{\r
+\if{html}{\out{<div class="arguments">}}\r
+\describe{\r
+\item{\code{name}}{Name of the file.}\r
+\r
+\item{\code{file}}{File to be saved.}\r
+\r
+\item{\code{istable}}{Used in writing txt file to check if the file is table or not.}\r
+}\r
+\if{html}{\out{</div>}}\r
+}\r
+\subsection{Examples}{\r
+\if{html}{\out{<div class="r example copy">}}\r
+\preformatted{\dontrun{\r
+collection <- Collection$new(arv, collectionUUID)\r
+writeFile <- collection$writeFile(name = "myoutput.csv", file = file, fileFormat = "csv", istable = NULL, collectionUUID = collectionUUID)             # csv\r
+writeFile <- collection$writeFile(name = "myoutput.tsv", file = file, fileFormat = "tsv", istable = NULL, collectionUUID = collectionUUID)             # tsv\r
+writeFile <- collection$writeFile(name = "myoutput.fasta", file = file, fileFormat = "fasta", istable = NULL, collectionUUID = collectionUUID)         # fasta\r
+writeFile <- collection$writeFile(name = "myoutputtable.txt", file = file, fileFormat = "txt", istable = "yes", collectionUUID = collectionUUID)       # txt table\r
+writeFile <- collection$writeFile(name = "myoutputtext.txt", file = file, fileFormat = "txt", istable = "no", collectionUUID = collectionUUID)         # txt text\r
+writeFile <- collection$writeFile(name = "myoutputbinary.dat", file = file, fileFormat = "dat", collectionUUID = collectionUUID)                       # binary\r
+writeFile <- collection$writeFile(name = "myoutputxlsx.xlsx", file = file, fileFormat = "xlsx", collectionUUID = collectionUUID)                       # xlsx\r
+}\r
+}\r
+\if{html}{\out{</div>}}\r
+\r
+}\r
+\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-create"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-create}{}}}\r
+\subsection{Method \code{create()}}{\r
+Creates one or more ArvadosFiles and adds them to the collection at specified path.\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$create(files)}\if{html}{\out{</div>}}\r
+}\r
+\r
+\subsection{Arguments}{\r
+\if{html}{\out{<div class="arguments">}}\r
+\describe{\r
+\item{\code{files}}{Content to be created.}\r
+}\r
+\if{html}{\out{</div>}}\r
+}\r
+\subsection{Examples}{\r
+\if{html}{\out{<div class="r example copy">}}\r
+\preformatted{\dontrun{\r
+collection <- arv$collections_create(name = collectionTitle, description = collectionDescription, owner_uuid = collectionOwner, properties = list("ROX37196928443768648" = "ROX37742976443830153"))\r
+}\r
+}\r
+\if{html}{\out{</div>}}\r
+\r
+}\r
+\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-remove"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-remove}{}}}\r
+\subsection{Method \code{remove()}}{\r
+Remove one or more files from the collection.\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$remove(paths)}\if{html}{\out{</div>}}\r
+}\r
+\r
+\subsection{Arguments}{\r
+\if{html}{\out{<div class="arguments">}}\r
+\describe{\r
+\item{\code{paths}}{Content to be removed.}\r
+}\r
+\if{html}{\out{</div>}}\r
+}\r
+\subsection{Examples}{\r
+\if{html}{\out{<div class="r example copy">}}\r
+\preformatted{\dontrun{\r
+collection$remove(fileName.format)\r
+}\r
+}\r
+\if{html}{\out{</div>}}\r
+\r
+}\r
+\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-move"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-move}{}}}\r
+\subsection{Method \code{move()}}{\r
+Moves ArvadosFile or Subcollection to another location in the collection.\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$move(content, destination)}\if{html}{\out{</div>}}\r
+}\r
+\r
+\subsection{Arguments}{\r
+\if{html}{\out{<div class="arguments">}}\r
+\describe{\r
+\item{\code{content}}{Content to be moved.}\r
+\r
+\item{\code{destination}}{Path to move content.}\r
+}\r
+\if{html}{\out{</div>}}\r
+}\r
+\subsection{Examples}{\r
+\if{html}{\out{<div class="r example copy">}}\r
+\preformatted{\dontrun{\r
+collection$move("fileName.format", path)\r
+}\r
+}\r
+\if{html}{\out{</div>}}\r
+\r
+}\r
+\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-copy"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-copy}{}}}\r
+\subsection{Method \code{copy()}}{\r
+Copies ArvadosFile or Subcollection to another location in the collection.\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$copy(content, destination)}\if{html}{\out{</div>}}\r
+}\r
+\r
+\subsection{Arguments}{\r
+\if{html}{\out{<div class="arguments">}}\r
+\describe{\r
+\item{\code{content}}{Content to be moved.}\r
+\r
+\item{\code{destination}}{Path to move content.}\r
+}\r
+\if{html}{\out{</div>}}\r
+}\r
+\subsection{Examples}{\r
+\if{html}{\out{<div class="r example copy">}}\r
+\preformatted{\dontrun{\r
+copied <- collection$copy("oldName.format", "newName.format")\r
+}\r
+}\r
+\if{html}{\out{</div>}}\r
+\r
+}\r
+\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-refresh"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-refresh}{}}}\r
+\subsection{Method \code{refresh()}}{\r
+Refreshes the environment.\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$refresh()}\if{html}{\out{</div>}}\r
+}\r
+\r
+\subsection{Examples}{\r
+\if{html}{\out{<div class="r example copy">}}\r
+\preformatted{\dontrun{\r
+collection$refresh()\r
+}\r
+}\r
+\if{html}{\out{</div>}}\r
+\r
+}\r
+\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-getFileListing"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-getFileListing}{}}}\r
+\subsection{Method \code{getFileListing()}}{\r
+Returns collections file content as character vector.\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$getFileListing()}\if{html}{\out{</div>}}\r
+}\r
+\r
+\subsection{Examples}{\r
+\if{html}{\out{<div class="r example copy">}}\r
+\preformatted{\dontrun{\r
+list <- collection$getFileListing()\r
+}\r
+}\r
+\if{html}{\out{</div>}}\r
+\r
+}\r
+\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-get"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-get}{}}}\r
+\subsection{Method \code{get()}}{\r
+If relativePath is valid, returns ArvadosFile or Subcollection specified by relativePath, else returns NULL.\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$get(relativePath)}\if{html}{\out{</div>}}\r
+}\r
+\r
+\subsection{Arguments}{\r
+\if{html}{\out{<div class="arguments">}}\r
+\describe{\r
+\item{\code{relativePath}}{Path from content is taken.}\r
+}\r
+\if{html}{\out{</div>}}\r
+}\r
+\subsection{Examples}{\r
+\if{html}{\out{<div class="r example copy">}}\r
+\preformatted{\dontrun{\r
+arvadosFile <- collection$get(fileName)\r
+}\r
+}\r
+\if{html}{\out{</div>}}\r
+\r
+}\r
+\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-getRESTService"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-getRESTService}{}}}\r
+\subsection{Method \code{getRESTService()}}{\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$getRESTService()}\if{html}{\out{</div>}}\r
+}\r
+\r
+}\r
+\if{html}{\out{<hr>}}\r
+\if{html}{\out{<a id="method-Collection-setRESTService"></a>}}\r
+\if{latex}{\out{\hypertarget{method-Collection-setRESTService}{}}}\r
+\subsection{Method \code{setRESTService()}}{\r
+\subsection{Usage}{\r
+\if{html}{\out{<div class="r">}}\preformatted{Collection$setRESTService(newRESTService)}\if{html}{\out{</div>}}\r
+}\r
+\r
+}\r
+}\r