All Downloads are FREE. Search and download functionalities are using the official Maven repository.

R.File-methods.R Maven / Gradle / Ivy


# WARNING: AUTOGENERATED CODE
#
#    This code was generated by a tool.
#    
#    Manual changes to this file may cause unexpected behavior in your application.
#    Manual changes to this file will be overwritten if the code is regenerated.


# ##############################################################################
#' FileClient methods
#' @include AllClasses.R
#' @include AllGenerics.R
#' @include commons.R

#' @description This function implements the OpenCGA calls for managing Files.

#' The following table summarises the available *actions* for this client:
#'
#' | endpointName | Endpoint WS | parameters accepted |
#' | -- | :-- | --: |
#' | updateAcl | /{apiVersion}/files/acl/{members}/update | study, members[*], action[*], body[*] |
#' | loadAnnotationSets | /{apiVersion}/files/annotationSets/load | study, variableSetId[*], path[*], parents, annotationSetId, body |
#' | bioformats | /{apiVersion}/files/bioformats |  |
#' | create | /{apiVersion}/files/create | study, parents, body[*] |
#' | distinct | /{apiVersion}/files/distinct | study, id, uuid, name, path, uri, type, bioformat, format, external, status, internalStatus, internalVariantIndexStatus, softwareName, directory, creationDate, modificationDate, description, tags, size, sampleIds, jobId, annotation, acl, deleted, release, field[*] |
#' | fetch | /{apiVersion}/files/fetch | jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body[*] |
#' | formats | /{apiVersion}/files/formats |  |
#' | link | /{apiVersion}/files/link | study, parents, body[*] |
#' | runLink | /{apiVersion}/files/link/run | study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body[*] |
#' | runPostlink | /{apiVersion}/files/postlink/run | study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body[*] |
#' | search | /{apiVersion}/files/search | include, exclude, limit, skip, count, flattenAnnotations, study, id, uuid, name, path, uri, type, bioformat, format, external, status, internalStatus, internalVariantIndexStatus, softwareName, directory, creationDate, modificationDate, description, tags, size, sampleIds, jobId, annotation, acl, deleted, release |
#' | upload | /{apiVersion}/files/upload | file, fileName, fileFormat, bioformat, checksum, study, relativeFilePath, description, parents |
#' | acl | /{apiVersion}/files/{files}/acl | files[*], study, member, silent |
#' | delete | /{apiVersion}/files/{files}/delete | study, files[*], skipTrash |
#' | info | /{apiVersion}/files/{files}/info | include, exclude, flattenAnnotations, files[*], study, deleted |
#' | unlink | /{apiVersion}/files/{files}/unlink | study, files[*] |
#' | update | /{apiVersion}/files/{files}/update | include, exclude, files[*], study, sampleIdsAction, annotationSetsAction, relatedFilesAction, tagsAction, body[*] |
#' | updateAnnotationSetsAnnotations | /{apiVersion}/files/{file}/annotationSets/{annotationSet}/annotations/update | file[*], study, annotationSet[*], action, body |
#' | download | /{apiVersion}/files/{file}/download | file[*], study |
#' | grep | /{apiVersion}/files/{file}/grep | file[*], study, pattern, ignoreCase, maxCount |
#' | head | /{apiVersion}/files/{file}/head | file[*], study, offset, lines |
#' | image | /{apiVersion}/files/{file}/image | file[*], study |
#' | move | /{apiVersion}/files/{file}/move | include, exclude, file[*], study, body[*] |
#' | refresh | /{apiVersion}/files/{file}/refresh | file[*], study |
#' | tail | /{apiVersion}/files/{file}/tail | file[*], study, lines |
#' | list | /{apiVersion}/files/{folder}/list | include, exclude, limit, skip, count, folder[*], study |
#' | tree | /{apiVersion}/files/{folder}/tree | include, exclude, folder[*], study, maxDepth |
#'
#' @md
#' @seealso \url{http://docs.opencb.org/display/opencga/Using+OpenCGA} and the RESTful API documentation
#' \url{http://bioinfo.hpc.cam.ac.uk/opencga-prod/webservices/}
#' [*]: Required parameter
#' @export

setMethod("fileClient", "OpencgaR", function(OpencgaR, annotationSet, file, files, folder, members, endpointName, params=NULL, ...) {
    switch(endpointName,

        #' @section Endpoint /{apiVersion}/files/acl/{members}/update:
        #' Update the set of permissions granted for the member.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param members Comma separated list of user or group ids.
        #' @param action Action to be performed [ADD, SET, REMOVE or RESET]. Allowed values: ['SET ADD REMOVE RESET']
        #' @param data JSON containing the parameters to add ACLs.
        updateAcl=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL, subcategory="acl",
                subcategoryId=members, action="update", params=params, httpMethod="POST", as.queryParam=c("action"),
                ...),

        #' @section Endpoint /{apiVersion}/files/annotationSets/load:
        #' Load annotation sets from a TSV file.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param variableSetId Variable set ID or name.
        #' @param path Path where the TSV file is located in OpenCGA or where it should be located.
        #' @param parents Flag indicating whether to create parent directories if they don't exist (only when TSV file was not previously associated).
        #' @param annotationSetId Annotation set id. If not provided, variableSetId will be used.
        #' @param data JSON containing the 'content' of the TSV file if this has not yet been registered into OpenCGA.
        loadAnnotationSets=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL,
                subcategory="annotationSets", subcategoryId=NULL, action="load", params=params, httpMethod="POST",
                as.queryParam=c("variableSetId","path"), ...),

        #' @section Endpoint /{apiVersion}/files/bioformats:
        #' List of accepted file bioformats.

        bioformats=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL, subcategory=NULL,
                subcategoryId=NULL, action="bioformats", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/create:
        #' Create file or folder.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param parents Create the parent directories if they do not exist.
        #' @param data File parameters.
        create=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL, subcategory=NULL, subcategoryId=NULL,
                action="create", params=params, httpMethod="POST", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/distinct:
        #' File distinct method.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param id Comma separated list of file IDs up to a maximum of 100. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
        #' @param uuid Comma separated list file UUIDs up to a maximum of 100.
        #' @param name Comma separated list of file names. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
        #' @param path Comma separated list of paths. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
        #' @param uri Comma separated list of uris. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
        #' @param type File type, either FILE or DIRECTORY.
        #' @param bioformat Comma separated Bioformat values. For existing Bioformats see files/bioformats.
        #' @param format Comma separated Format values. For existing Formats see files/formats.
        #' @param external Boolean field indicating whether to filter by external or non external files.
        #' @param status Filter by status.
        #' @param internalStatus Filter by internal status.
        #' @param internalVariantIndexStatus Filter by internal variant index status.
        #' @param softwareName Software name.
        #' @param directory Directory under which we want to look for files or folders.
        #' @param creationDate Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        #' @param modificationDate Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        #' @param description Description.
        #' @param tags Tags. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
        #' @param size File size.
        #' @param sampleIds Comma separated list sample IDs or UUIDs up to a maximum of 100.
        #' @param jobId Job ID that created the file(s) or folder(s).
        #' @param annotation Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
        #' @param acl Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS permissions. Only study owners or administrators can query by this field. .
        #' @param deleted Boolean to retrieve deleted entries.
        #' @param release Release when it was created.
        #' @param field Comma separated list of fields for which to obtain the distinct values.
        distinct=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL, subcategory=NULL, subcategoryId=NULL,
                action="distinct", params=params, httpMethod="GET", as.queryParam=c("field"), ...),

        #' @section Endpoint /{apiVersion}/files/fetch:
        #' Download an external file to catalog and register it.
        #' @param jobId Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not provided.
        #' @param jobDescription Job description.
        #' @param jobDependsOn Comma separated list of existing job IDs the job will depend on.
        #' @param jobTags Job tags.
        #' @param jobScheduledStartTime Time when the job is scheduled to start.
        #' @param jobPriority Priority of the job.
        #' @param jobDryRun Flag indicating that the job will be executed in dry-run mode. In this mode, OpenCGA will validate that all parameters and prerequisites are correctly set for successful execution, but the job will not actually run.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param data Fetch parameters.
        fetch=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL, subcategory=NULL, subcategoryId=NULL,
                action="fetch", params=params, httpMethod="POST", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/formats:
        #' List of accepted file formats.

        formats=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL, subcategory=NULL, subcategoryId=NULL,
                action="formats", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/link:
        #' Link an external file into catalog.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param parents Create the parent directories if they do not exist.
        #' @param data File parameters.
        link=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL, subcategory=NULL, subcategoryId=NULL,
                action="link", params=params, httpMethod="POST", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/link/run:
        #' Link an external file into catalog asynchronously.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param jobId Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not provided.
        #' @param jobDependsOn Comma separated list of existing job IDs the job will depend on.
        #' @param jobDescription Job description.
        #' @param jobTags Job tags.
        #' @param jobScheduledStartTime Time when the job is scheduled to start.
        #' @param jobPriority Priority of the job.
        #' @param jobDryRun Flag indicating that the job will be executed in dry-run mode. In this mode, OpenCGA will validate that all parameters and prerequisites are correctly set for successful execution, but the job will not actually run.
        #' @param data File parameters.
        runLink=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL, subcategory="link",
                subcategoryId=NULL, action="run", params=params, httpMethod="POST", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/postlink/run:
        #' Associate non-registered samples for files with high volumes of samples.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param jobId Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not provided.
        #' @param jobDependsOn Comma separated list of existing job IDs the job will depend on.
        #' @param jobDescription Job description.
        #' @param jobTags Job tags.
        #' @param jobScheduledStartTime Time when the job is scheduled to start.
        #' @param jobPriority Priority of the job.
        #' @param jobDryRun Flag indicating that the job will be executed in dry-run mode. In this mode, OpenCGA will validate that all parameters and prerequisites are correctly set for successful execution, but the job will not actually run.
        #' @param data File parameters.
        runPostlink=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL, subcategory="postlink",
                subcategoryId=NULL, action="run", params=params, httpMethod="POST", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/search:
        #' File search method.
        #' @param include Fields included in the response, whole JSON path must be provided.
        #' @param exclude Fields excluded in the response, whole JSON path must be provided.
        #' @param limit Number of results to be returned.
        #' @param skip Number of results to skip.
        #' @param count Get the total number of results matching the query. Deactivated by default.
        #' @param flattenAnnotations Boolean indicating to flatten the annotations.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param id Comma separated list of file IDs up to a maximum of 100. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
        #' @param uuid Comma separated list file UUIDs up to a maximum of 100.
        #' @param name Comma separated list of file names. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
        #' @param path Comma separated list of paths. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
        #' @param uri Comma separated list of uris. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
        #' @param type File type, either FILE or DIRECTORY.
        #' @param bioformat Comma separated Bioformat values. For existing Bioformats see files/bioformats.
        #' @param format Comma separated Format values. For existing Formats see files/formats.
        #' @param external Boolean field indicating whether to filter by external or non external files.
        #' @param status Filter by status.
        #' @param internalStatus Filter by internal status.
        #' @param internalVariantIndexStatus Filter by internal variant index status.
        #' @param softwareName Software name.
        #' @param directory Directory under which we want to look for files or folders.
        #' @param creationDate Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        #' @param modificationDate Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
        #' @param description Description.
        #' @param tags Tags. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
        #' @param size File size.
        #' @param sampleIds Comma separated list sample IDs or UUIDs up to a maximum of 100.
        #' @param jobId Job ID that created the file(s) or folder(s).
        #' @param annotation Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
        #' @param acl Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS permissions. Only study owners or administrators can query by this field. .
        #' @param deleted Boolean to retrieve deleted entries.
        #' @param release Release when it was created.
        search=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL, subcategory=NULL, subcategoryId=NULL,
                action="search", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/upload:
        #' Resource to upload a file by chunks.
        #' @param file File to upload.
        #' @param fileName File name to overwrite the input fileName.
        #' @param fileFormat File format. Allowed values: ['VCF BCF GVCF TBI BIGWIG SAM BAM BAI CRAM CRAI FASTQ FASTA PED TAB_SEPARATED_VALUES COMMA_SEPARATED_VALUES XML PROTOCOL_BUFFER JSON AVRO PARQUET PDF IMAGE PLAIN BINARY NONE UNKNOWN']
        #' @param bioformat File bioformat. Allowed values: ['MICROARRAY_EXPRESSION_ONECHANNEL_AGILENT MICROARRAY_EXPRESSION_ONECHANNEL_AFFYMETRIX MICROARRAY_EXPRESSION_ONECHANNEL_GENEPIX MICROARRAY_EXPRESSION_TWOCHANNELS_AGILENT MICROARRAY_EXPRESSION_TWOCHANNELS_GENEPIX DATAMATRIX_EXPRESSION IDLIST IDLIST_RANKED ANNOTATION_GENEVSANNOTATION OTHER_NEWICK OTHER_BLAST OTHER_INTERACTION OTHER_GENOTYPE OTHER_PLINK OTHER_VCF OTHER_PED VCF4 VARIANT ALIGNMENT COVERAGE SEQUENCE PEDIGREE REFERENCE_GENOME NONE UNKNOWN']
        #' @param checksum Expected MD5 file checksum.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param relativeFilePath Path within catalog where the file will be located (default: root folder).
        #' @param description description.
        #' @param parents Create the parent directories if they do not exist.
        upload=fetchOpenCGA(object=OpencgaR, category="files", categoryId=NULL, subcategory=NULL, subcategoryId=NULL,
                action="upload", params=params, httpMethod="POST", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{files}/acl:
        #' Return the acl defined for the file or folder. If member is provided, it will only return the acl for the member.
        #' @param files Comma separated list of file IDs or names up to a maximum of 100.
        #' @param study Comma separated list of Studies [[organization@]project:]study where study and project can be either the ID or UUID up to a maximum of 100.
        #' @param member User or group id.
        #' @param silent Boolean to retrieve all possible entries that are queried for, false to raise an exception whenever one of the entries looked for cannot be shown for whichever reason.
        acl=fetchOpenCGA(object=OpencgaR, category="files", categoryId=files, subcategory=NULL, subcategoryId=NULL,
                action="acl", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{files}/delete:
        #' Delete existing files and folders.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param files Comma separated list of file ids, names or paths.
        #' @param skipTrash Skip trash and delete the files/folders from disk directly (CANNOT BE RECOVERED).
        delete=fetchOpenCGA(object=OpencgaR, category="files", categoryId=files, subcategory=NULL, subcategoryId=NULL,
                action="delete", params=params, httpMethod="DELETE", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{files}/info:
        #' File info.
        #' @param include Fields included in the response, whole JSON path must be provided.
        #' @param exclude Fields excluded in the response, whole JSON path must be provided.
        #' @param flattenAnnotations Flatten the annotations?.
        #' @param files Comma separated list of file IDs or names up to a maximum of 100.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param deleted Boolean to retrieve deleted files.
        info=fetchOpenCGA(object=OpencgaR, category="files", categoryId=files, subcategory=NULL, subcategoryId=NULL,
                action="info", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{files}/unlink:
        #' Unlink linked files and folders.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param files Comma separated list of file ids, names or paths.
        unlink=fetchOpenCGA(object=OpencgaR, category="files", categoryId=files, subcategory=NULL, subcategoryId=NULL,
                action="unlink", params=params, httpMethod="DELETE", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{files}/update:
        #' Update some file attributes.
        #' @param include Fields included in the response, whole JSON path must be provided.
        #' @param exclude Fields excluded in the response, whole JSON path must be provided.
        #' @param files Comma separated list of file ids, names or paths. Paths must be separated by : instead of /.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param sampleIdsAction Action to be performed if the array of samples is being updated. Allowed values: ['ADD SET REMOVE']
        #' @param annotationSetsAction Action to be performed if the array of annotationSets is being updated. Allowed values: ['ADD SET REMOVE']
        #' @param relatedFilesAction Action to be performed if the array of relatedFiles is being updated. Allowed values: ['ADD SET REMOVE']
        #' @param tagsAction Action to be performed if the array of tags is being updated. Allowed values: ['ADD SET REMOVE']
        #' @param data Parameters to modify.
        update=fetchOpenCGA(object=OpencgaR, category="files", categoryId=files, subcategory=NULL, subcategoryId=NULL,
                action="update", params=params, httpMethod="POST", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{file}/annotationSets/{annotationSet}/annotations/update:
        #' Update annotations from an annotationSet.
        #' @param file File id, name or path. Paths must be separated by : instead of /.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param annotationSet AnnotationSet ID to be updated.
        #' @param action Action to be performed: ADD to add new annotations; REPLACE to replace the value of an already existing annotation; SET to set the new list of annotations removing any possible old annotations; REMOVE to remove some annotations; RESET to set some annotations to the default value configured in the corresponding variables of the VariableSet if any. Allowed values: ['ADD SET REMOVE RESET REPLACE']
        #' @param data Json containing the map of annotations when the action is ADD, SET or REPLACE, a json with only the key 'remove' containing the comma separated variables to be removed as a value when the action is REMOVE or a json with only the key 'reset' containing the comma separated variables that will be set to the default value when the action is RESET.
        updateAnnotationSetsAnnotations=fetchOpenCGA(object=OpencgaR, category="files", categoryId=file,
                subcategory="annotationSets", subcategoryId=annotationSet, action="annotations/update", params=params,
                httpMethod="POST", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{file}/download:
        #' Download file.
        #' @param file File id, name or path. Paths must be separated by : instead of /.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        download=fetchOpenCGA(object=OpencgaR, category="files", categoryId=file, subcategory=NULL, subcategoryId=NULL,
                action="download", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{file}/grep:
        #' Filter lines of the file containing the pattern.
        #' @param file File uuid, id, or name.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param pattern String pattern.
        #' @param ignoreCase Flag to perform a case insensitive search.
        #' @param maxCount Stop reading a file after 'n' matching lines. 0 means no limit.
        grep=fetchOpenCGA(object=OpencgaR, category="files", categoryId=file, subcategory=NULL, subcategoryId=NULL,
                action="grep", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{file}/head:
        #' Show the first lines of a file (up to a limit).
        #' @param file File uuid, id, or name.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param offset Starting byte from which the file will be read.
        #' @param lines Maximum number of lines to be returned up to a maximum of 1000.
        head=fetchOpenCGA(object=OpencgaR, category="files", categoryId=file, subcategory=NULL, subcategoryId=NULL,
                action="head", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{file}/image:
        #' Obtain the base64 content of an image.
        #' @param file File ID.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        image=fetchOpenCGA(object=OpencgaR, category="files", categoryId=file, subcategory=NULL, subcategoryId=NULL,
                action="image", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{file}/move:
        #' Move file to a different path.
        #' @param include Fields included in the response, whole JSON path must be provided.
        #' @param exclude Fields excluded in the response, whole JSON path must be provided.
        #' @param file File id, UUID or name.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param data Parameters to modify.
        move=fetchOpenCGA(object=OpencgaR, category="files", categoryId=file, subcategory=NULL, subcategoryId=NULL,
                action="move", params=params, httpMethod="POST", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{file}/refresh:
        #' Refresh metadata from the selected file or folder. Return updated files.
        #' @param file File id, name or path. Paths must be separated by : instead of /.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        refresh=fetchOpenCGA(object=OpencgaR, category="files", categoryId=file, subcategory=NULL, subcategoryId=NULL,
                action="refresh", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{file}/tail:
        #' Show the last lines of a file (up to a limit).
        #' @param file File uuid, id, or name.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param lines Maximum number of lines to be returned up to a maximum of 1000.
        tail=fetchOpenCGA(object=OpencgaR, category="files", categoryId=file, subcategory=NULL, subcategoryId=NULL,
                action="tail", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{folder}/list:
        #' List all the files inside the folder.
        #' @param include Fields included in the response, whole JSON path must be provided.
        #' @param exclude Fields excluded in the response, whole JSON path must be provided.
        #' @param limit Number of results to be returned.
        #' @param skip Number of results to skip.
        #' @param count Get the total number of results matching the query. Deactivated by default.
        #' @param folder Folder ID, name or path.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        list=fetchOpenCGA(object=OpencgaR, category="files", categoryId=folder, subcategory=NULL, subcategoryId=NULL,
                action="list", params=params, httpMethod="GET", as.queryParam=NULL, ...),

        #' @section Endpoint /{apiVersion}/files/{folder}/tree:
        #' Obtain a tree view of the files and folders within a folder.
        #' @param include Fields included in the response, whole JSON path must be provided.
        #' @param exclude Fields excluded in the response, whole JSON path must be provided.
        #' @param folder Folder id or name. Paths must be separated by : instead of /.
        #' @param study Study [[organization@]project:]study where study and project can be either the ID or UUID.
        #' @param maxDepth Maximum depth to get files from.
        tree=fetchOpenCGA(object=OpencgaR, category="files", categoryId=folder, subcategory=NULL, subcategoryId=NULL,
                action="tree", params=params, httpMethod="GET", as.queryParam=NULL, ...),
    )
})




© 2015 - 2025 Weber Informatics LLC | Privacy Policy