X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7da8eaf51a23ab23369b6e65f0634448cc4aeb3b..c4d1131613de217719929ff05a06f19321cb5fdc:/sdk/R/man/Collection.Rd
diff --git a/sdk/R/man/Collection.Rd b/sdk/R/man/Collection.Rd
index 46c76cb40b..5fbf1c1a11 100644
--- a/sdk/R/man/Collection.Rd
+++ b/sdk/R/man/Collection.Rd
@@ -1,17 +1,431 @@
-% 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`
+## ------------------------------------------------
+
+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)
+}
+\seealso{
+\code{\link{https://github.com/arvados/arvados/tree/main/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-new}{\code{Collection$new()}}
+\item \href{#method-add}{\code{Collection$add()}}
+\item \href{#method-readArvFile}{\code{Collection$readArvFile()}}
+\item \href{#method-writeFile}{\code{Collection$writeFile()}}
+\item \href{#method-create}{\code{Collection$create()}}
+\item \href{#method-remove}{\code{Collection$remove()}}
+\item \href{#method-move}{\code{Collection$move()}}
+\item \href{#method-copy}{\code{Collection$copy()}}
+\item \href{#method-refresh}{\code{Collection$refresh()}}
+\item \href{#method-getFileListing}{\code{Collection$getFileListing()}}
+\item \href{#method-get}{\code{Collection$get()}}
+\item \href{#method-getRESTService}{\code{Collection$getRESTService()}}
+\item \href{#method-setRESTService}{\code{Collection$setRESTService()}}
+}
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-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{collection <- Collection$new(arv, CollectionUUID)
+}
+\if{html}{\out{
}}
+
+}
+
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-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-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{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
+}
+\if{html}{\out{
}}
+
+}
+
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-writeFile}{}}}
+\subsection{Method \code{writeFile()}}{
+Write file content
+\subsection{Usage}{
+\if{html}{\out{}}\preformatted{Collection$writeFile(name, file, 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{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
+}
+\if{html}{\out{
}}
+
+}
+
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-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{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-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{collection$remove(fileName.format)
+}
+\if{html}{\out{
}}
+
+}
+
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-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{collection$move("fileName.format", path)
+}
+\if{html}{\out{
}}
+
+}
+
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-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{copied <- collection$copy("oldName.format", "newName.format")
+}
+\if{html}{\out{
}}
+
+}
+
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-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{collection$refresh()
+}
+\if{html}{\out{
}}
+
+}
+
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-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{list <- collection$getFileListing()
+}
+\if{html}{\out{
}}
+
+}
+
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-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{arvadosFile <- collection$get(fileName)
+}
+\if{html}{\out{
}}
+
+}
+
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-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-setRESTService}{}}}
+\subsection{Method \code{setRESTService()}}{
+\subsection{Usage}{
+\if{html}{\out{}}\preformatted{Collection$setRESTService(newRESTService)}\if{html}{\out{
}}
+}
+
+}
+}