diff --git a/.gitignore b/.gitignore index 876801ecbf0..83aee9ed5ef 100644 --- a/.gitignore +++ b/.gitignore @@ -86,7 +86,7 @@ git.properties *.Rcheck* opencga-client/src/main/R_packages opencga-client/src/main/opencgaR_*.tar.gz -opencga-client/src/main/R/vignettes/opencgaR.html +#opencga-client/src/main/R/vignettes/opencgaR.html opencga-client/src/main/R/vignettes/opencgaR.md /opencga-catalog/src/test/java/org/opencb/opencga/catalog/config/CatalogConfigurationTest.java diff --git a/opencga-client/src/main/R/DESCRIPTION b/opencga-client/src/main/R/DESCRIPTION index f41fc777fa4..1b5e25a026f 100644 --- a/opencga-client/src/main/R/DESCRIPTION +++ b/opencga-client/src/main/R/DESCRIPTION @@ -2,8 +2,8 @@ Package: opencgaR Type: Package Title: Querying Opencga Data Version: ${opencgar.version} -Author: Marta Bleda -Maintainer: Marta Bleda +Author: Zetta Genomics +Maintainer: Zetta Genomics Description: R client that contains classes and methods for working with Opencga data. License: GPL-3 @@ -17,7 +17,8 @@ Imports: configr, base64enc, methods, - rlang + rlang, + lubridate Suggests: BiocStyle, knitr, @@ -40,6 +41,7 @@ Collate: 'Meta-methods.R' 'OpencgaR-methods.R' 'Operation-methods.R' + 'Organization-methods.R' 'Panel-methods.R' 'Project-methods.R' 'RestResponse-methods.R' @@ -47,5 +49,5 @@ Collate: 'Study-methods.R' 'User-methods.R' 'Variant-methods.R' -RoxygenNote: 7.1.2 +RoxygenNote: 7.3.2 VignetteBuilder: knitr diff --git a/opencga-client/src/main/R/NAMESPACE b/opencga-client/src/main/R/NAMESPACE index ad9a79a488b..cf8377f585e 100644 --- a/opencga-client/src/main/R/NAMESPACE +++ b/opencga-client/src/main/R/NAMESPACE @@ -23,6 +23,8 @@ export(mergeResults) export(opencgaHelp) export(opencgaLogin) export(opencgaLogout) +export(opencgaR) +export(restResponse) export(results) exportClasses(OpencgaR) exportClasses(RestResponse) @@ -37,6 +39,7 @@ exportMethods(individualClient) exportMethods(jobClient) exportMethods(metaClient) exportMethods(operationClient) +exportMethods(organizationClient) exportMethods(panelClient) exportMethods(projectClient) exportMethods(sampleClient) diff --git a/opencga-client/src/main/R/R/OpencgaR-methods.R b/opencga-client/src/main/R/R/OpencgaR-methods.R index a53439dc689..a538b2eb544 100644 --- a/opencga-client/src/main/R/R/OpencgaR-methods.R +++ b/opencga-client/src/main/R/R/OpencgaR-methods.R @@ -147,22 +147,23 @@ readConfFile <- function(conf){ #' #' \dontrun{ #' con <- initOpencgaR(host = "http://bioinfo.hpc.cam.ac.uk/opencga-prod/", version = "v2") -#' con <- opencgaLogin(opencga = con, userid = "demouser", passwd = "demouser", showToken = TRUE) +#' con <- opencgaLogin(opencga = con, userid = "xxx", passwd = "xxx", showToken = TRUE) #' #' # Configuration in list format #' conf <- list(version="v2", rest=list(host="http://bioinfo.hpc.cam.ac.uk/opencga-prod/")) #' con <- initOpencgaR(opencgaConfig=conf) -#' con <- opencgaLogin(opencga = con, userid = "demouser", passwd = demouser") +#' con <- opencgaLogin(opencga = con, userid = "xxx", passwd = xxx") #' #' # Configuration in file format ("YAML" or "JSON") #' conf <- "/path/to/conf/client-configuration.yml" #' con <- initOpencgaR(opencgaConfig=conf) -#' con <- opencgaLogin(opencga = con, userid = "demouser", passwd = "demouser") +#' con <- opencgaLogin(opencga = con, userid = "xxx", passwd = "xxx") #' } #' @export opencgaLogin <- function(opencga, userid=NULL, passwd=NULL, interactive=FALSE, - autoRenew=FALSE, verbose=FALSE, showToken=FALSE){ + autoRenew=FALSE, verbose=FALSE, showToken=FALSE, + organization=NULL){ if (class(opencga) == "OpencgaR"){ host <- slot(object = opencga, name = "host") version <- slot(object = opencga, name = "version") @@ -183,16 +184,18 @@ opencgaLogin <- function(opencga, userid=NULL, passwd=NULL, interactive=FALSE, if(requireNamespace("miniUI", quietly = TRUE) & requireNamespace("shiny", quietly = TRUE)){ user_login <- function() { ui <- miniUI::miniPage( - miniUI::gadgetTitleBar("Please enter your username and password"), + miniUI::gadgetTitleBar("Please enter your username, password and organization (optional):"), miniUI::miniContentPanel( shiny::textInput("username", "Username"), - shiny::passwordInput("password", "Password"))) + shiny::passwordInput("password", "Password"), + shiny::passwordInput("organization", "Organization"))) server <- function(input, output) { shiny::observeEvent(input$done, { user <- input$username pass <- input$password - res <- list(user=user, pass=pass) + org <- input$organization + res <- list(user=user, pass=pass, org=org) shiny::stopApp(res) }) shiny::observeEvent(input$cancel, { @@ -205,6 +208,7 @@ opencgaLogin <- function(opencga, userid=NULL, passwd=NULL, interactive=FALSE, cred <- user_login() userid <- cred$user passwd <- cred$pass + organization <- cred$org }else{ print("The 'miniUI' and 'shiny' packages are required to run the interactive login, please install it and try again. @@ -215,7 +219,11 @@ opencgaLogin <- function(opencga, userid=NULL, passwd=NULL, interactive=FALSE, # end interactive login # Send request - query <- httr::POST(baseurl, body = list(user=userid, password=passwd), encode = "json") + body_req <- list(user=userid, password=passwd) + if (!is.null(organization) && organization != ""){ + body_req <- append(x=body_req, values=list(organization=organization)) + } + query <- httr::POST(baseurl, body = body_req, encode = "json") # check query status httr::warn_for_status(query) @@ -235,14 +243,14 @@ opencgaLogin <- function(opencga, userid=NULL, passwd=NULL, interactive=FALSE, # get expiration time loginInfo <- unlist(strsplit(x=token, split="\\."))[2] loginInfojson <- jsonlite::fromJSON(rawToChar(base64enc::base64decode(what=loginInfo))) - loginTime <- as.character(as.POSIXct(loginInfojson$iat, origin="1970-01-01"), format="%Y%m%d%H%M%S") - expirationTime <- as.character(as.POSIXct(loginInfojson$exp, origin="1970-01-01"), format="%Y%m%d%H%M%S") + loginTime <- lubridate::as_datetime(as.POSIXct(loginInfojson$iat, origin="1970-01-01")) + expirationTime <- lubridate::as_datetime(as.POSIXct(loginInfojson$exp, origin="1970-01-01")) # Create session JSON sessionDf <- data.frame(host=opencga@host, version=opencga@version, user=opencga@user, token=opencga@token, refreshToken=opencga@refreshToken, - login=loginTime, expirationTime=expirationTime) + login=as.character(loginTime), expirationTime=as.character(expirationTime)) sessionJson <- jsonlite::toJSON(sessionDf) # Get system to define session directory @@ -267,10 +275,10 @@ opencgaLogin <- function(opencga, userid=NULL, passwd=NULL, interactive=FALSE, sessionTable <- rbind(sessionTable, sessionDf) write(x = jsonlite::toJSON(sessionTable), file = sessionFile) }else if (length(sessionTableMatch) == 1){ - sessionTable[sessionTableMatch, "login"] <- loginTime + sessionTable[sessionTableMatch, "login"] <- as.character(loginTime) sessionTable[sessionTableMatch, "token"] <- token sessionTable[sessionTableMatch, "refreshToken"] <- refreshToken - sessionTable[sessionTableMatch, "expirationTime"] <- expirationTime + sessionTable[sessionTableMatch, "expirationTime"] <- as.character(expirationTime) write(x = jsonlite::toJSON(sessionTable), file = sessionFile) }else{ stop(paste("There is more than one connection to this host in your rsession file. Please, remove any duplicated entries in", diff --git a/opencga-client/src/main/R/R/commons.R b/opencga-client/src/main/R/R/commons.R index f37893a76ac..b3be5415a5a 100644 --- a/opencga-client/src/main/R/R/commons.R +++ b/opencga-client/src/main/R/R/commons.R @@ -119,8 +119,8 @@ fetchOpenCGA <- function(object=object, category=NULL, categoryId=NULL, stop(paste("There is more than one connection to this host in your rsession file. Please, remove any duplicated entries in", object@sessionFile)) } - timeNow <- Sys.time() - timeLeft <- as.numeric(difftime(as.POSIXct(expirationTime, format="%Y%m%d%H%M%S"), timeNow, units="mins")) + timeNow <- lubridate::as_datetime(Sys.time()) + timeLeft <- as.numeric(difftime(expirationTime, timeNow, units="mins")) if (timeLeft > 0 & timeLeft <= 5){ print("INFO: Your session will expire in less than 5 minutes.") urlNewToken <- paste0(host, version, "users/login") @@ -270,11 +270,28 @@ callREST <- function(pathUrl, params, httpMethod, skip, token, as.queryParam, return(list(resp=resp, content=content)) } + +# A function to print Events +printEvents <- function (row){ + print(paste(row$type, ":", row$name, row$message)) +} + + ## A function to parse the json data into R dataframes parseResponse <- function(resp, content, verbose){ js <- jsonlite::fromJSON(content) if (resp$status_code == 200){ - if (!("warning" %in% js[[1]]) || js[[1]]$warning == ""){ + # QUERY SUCCESSFUL + if ("events" %in% names(js) == 0){ + if (length(js$events)){ + if (isTRUE(verbose)){ + print("Query successful!") + } + }else if (nrow(js$events) > 0){ + print("Query successful with warnings.") + printEvents(js$events) + } + }else if (!("warning" %in% js[[1]]) || js[[1]]$warning == ""){ if (isTRUE(verbose)){ print("Query successful!") } @@ -283,15 +300,19 @@ parseResponse <- function(resp, content, verbose){ print(paste("WARNING:", js[[1]]$warning)) } }else{ + # QUERY UNSUCCESSFUL print("Query unsuccessful.") print(paste("Category:", httr::http_status(resp)$category)) print(paste("Reason:", httr::http_status(resp)$reason)) - if (js[[1]]$warning != ""){ - print(paste("WARNING:", js[[1]]$warning)) - print() - } - if (js[[1]]$error != ""){ - stop(paste("ERROR:", js[[1]]$error)) + if ("events" %in% names(js)){ + printEvents(js$events) + }else{ + if (js[[1]]$warning != ""){ + print(paste("WARNING:", js[[1]]$warning)) + } + if (js[[1]]$error != ""){ + stop(paste("ERROR:", js[[1]]$error)) + } } } diff --git a/opencga-client/src/main/R/man/adminClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/adminClient-OpencgaR-method.Rd index a0bbbc24d71..b7b39bb0c06 100644 --- a/opencga-client/src/main/R/man/adminClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/adminClient-OpencgaR-method.Rd @@ -4,14 +4,14 @@ \alias{adminClient,OpencgaR-method} \title{AdminClient methods} \usage{ -\S4method{adminClient}{OpencgaR}(OpencgaR, endpointName, params = NULL, ...) +\S4method{adminClient}{OpencgaR}(OpencgaR, user, endpointName, params = NULL, ...) } \arguments{ -\item{fields}{Comma separated list of fields by which to group by.} +\item{user}{User ID.} -\item{entity}{Entity to be grouped by.} +\item{fields}{Comma separated list of fields by which to group by.} -\item{action}{Action performed.} +\item{entity}{Entity to be grouped by. Allowed values: \link{'AUDIT NOTE ORGANIZATION USER PROJECT STUDY FILE SAMPLE JOB INDIVIDUAL COHORT DISEASE_PANEL FAMILY CLINICAL_ANALYSIS INTERPRETATION VARIANT ALIGNMENT CLINICAL EXPRESSION RGA FUNCTIONAL'}} \item{before}{Object before update.} @@ -19,7 +19,13 @@ \item{date}{Date <,<=,>,>=(Format: yyyyMMddHHmmss) and yyyyMMddHHmmss-yyyyMMddHHmmss.} -\item{collection}{Collection to be indexed (file, sample, individual, family, cohort and/or job). If not provided, all of them will be indexed.} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} + +\item{entryIds}{Comma separated list of entry ids.} + +\item{permissions}{Comma separated list of permissions to be retrieved.} + +\item{category}{Category corresponding to the id's provided.} \item{include}{Fields included in the response, whole JSON path must be provided.} @@ -31,11 +37,11 @@ \item{count}{Get the total number of results matching the query. Deactivated by default.} -\item{user}{User ID.} +\item{authenticationId}{Authentication origin ID.} -\item{account}{Account type \link{GUEST, FULL, ADMINISTRATOR}.} +\item{organization}{Organization id.} -\item{authenticationId}{Authentication origin ID.} +\item{action}{Action to be performed: ADD or REMOVE user to/from groups. Allowed values: \link{'ADD REMOVE'}} \item{data}{JSON containing the parameters.} } @@ -44,13 +50,14 @@ This function implements the OpenCGA calls for managing Admin. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr groupByAudit \tab /{apiVersion}/admin/audit/groupBy \tab count, limit, fields\link{*}, entity\link{*}, action, before, after, date \cr - indexStatsCatalog \tab /{apiVersion}/admin/catalog/indexStats \tab collection \cr installCatalog \tab /{apiVersion}/admin/catalog/install \tab body\link{*} \cr - jwtCatalog \tab /{apiVersion}/admin/catalog/jwt \tab body\link{*} \cr + jwtCatalog \tab /{apiVersion}/admin/catalog/jwt \tab organization, body\link{*} \cr createUsers \tab /{apiVersion}/admin/users/create \tab body\link{*} \cr - importUsers \tab /{apiVersion}/admin/users/import \tab body\link{*} \cr - searchUsers \tab /{apiVersion}/admin/users/search \tab include, exclude, limit, skip, count, user, account, authenticationId \cr - syncUsers \tab /{apiVersion}/admin/users/sync \tab body\link{*} \cr + importUsers \tab /{apiVersion}/admin/users/import \tab organization, body\link{*} \cr + permissionsUsers \tab /{apiVersion}/admin/users/permissions \tab study, entryIds, permissions, category \cr + searchUsers \tab /{apiVersion}/admin/users/search \tab include, exclude, limit, skip, count, organization, user, authenticationId \cr + syncUsers \tab /{apiVersion}/admin/users/sync \tab organization, body\link{*} \cr + usersUpdateGroups \tab /{apiVersion}/admin/users/{user}/groups/update \tab organization, user\link{*}, action, body\link{*} \cr } } \section{Endpoint /{apiVersion}/admin/audit/groupBy}{ @@ -58,11 +65,6 @@ The following table summarises the available \emph{actions} for this client:\tab Group by operation. } -\section{Endpoint /{apiVersion}/admin/catalog/indexStats}{ - -Sync Catalog into the Solr. -} - \section{Endpoint /{apiVersion}/admin/catalog/install}{ Install OpenCGA database. @@ -83,6 +85,11 @@ Create a new user. Import users or a group of users from LDAP or AAD. } +\section{Endpoint /{apiVersion}/admin/users/permissions}{ + +User permissions. +} + \section{Endpoint /{apiVersion}/admin/users/search}{ User search method. @@ -93,6 +100,11 @@ User search method. Synchronise a group of users from an authentication origin with a group in a study from catalog. } +\section{Endpoint /{apiVersion}/admin/users/{user}/groups/update}{ + +Add or remove users from existing groups. +} + \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/} diff --git a/opencga-client/src/main/R/man/alignmentClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/alignmentClient-OpencgaR-method.Rd index 90628b933df..4be36d52af2 100644 --- a/opencga-client/src/main/R/man/alignmentClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/alignmentClient-OpencgaR-method.Rd @@ -67,25 +67,31 @@ \item{jobTags}{Job tags.} +\item{jobScheduledStartTime}{Time when the job is scheduled to start.} + +\item{jobPriority}{Priority of the job.} + +\item{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.} + \item{data}{Samtools parameters. Supported Samtools commands: sort, index, view, stats, flagstat, dict, faidx, depth, plot-bamstats.} } \description{ This function implements the OpenCGA calls for managing Analysis - Alignment. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr - runBwa \tab /{apiVersion}/analysis/alignment/bwa/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr - runCoverageIndex \tab /{apiVersion}/analysis/alignment/coverage/index/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr - coverageQcGeneCoverageStatsRun \tab /{apiVersion}/analysis/alignment/coverage/qc/geneCoverageStats/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr + runBwa \tab /{apiVersion}/analysis/alignment/bwa/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runCoverageIndex \tab /{apiVersion}/analysis/alignment/coverage/index/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + coverageQcGeneCoverageStatsRun \tab /{apiVersion}/analysis/alignment/coverage/qc/geneCoverageStats/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr queryCoverage \tab /{apiVersion}/analysis/alignment/coverage/query \tab file\link{*}, study, region, gene, offset, onlyExons, range, windowSize, splitResults \cr ratioCoverage \tab /{apiVersion}/analysis/alignment/coverage/ratio \tab file1\link{*}, file2\link{*}, study, skipLog2, region, gene, offset, onlyExons, windowSize, splitResults \cr statsCoverage \tab /{apiVersion}/analysis/alignment/coverage/stats \tab file\link{*}, gene\link{*}, study, threshold \cr - runDeeptools \tab /{apiVersion}/analysis/alignment/deeptools/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr - runFastqc \tab /{apiVersion}/analysis/alignment/fastqc/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr - runIndex \tab /{apiVersion}/analysis/alignment/index/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr - runPicard \tab /{apiVersion}/analysis/alignment/picard/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr - runQc \tab /{apiVersion}/analysis/alignment/qc/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr + runDeeptools \tab /{apiVersion}/analysis/alignment/deeptools/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runFastqc \tab /{apiVersion}/analysis/alignment/fastqc/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runIndex \tab /{apiVersion}/analysis/alignment/index/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runPicard \tab /{apiVersion}/analysis/alignment/picard/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runQc \tab /{apiVersion}/analysis/alignment/qc/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr query \tab /{apiVersion}/analysis/alignment/query \tab limit, skip, count, file\link{*}, study, region, gene, offset, onlyExons, minMappingQuality, maxNumMismatches, maxNumHits, properlyPaired, maxInsertSize, skipUnmapped, skipDuplicated, regionContained, forceMDField, binQualities, splitResults \cr - runSamtools \tab /{apiVersion}/analysis/alignment/samtools/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr + runSamtools \tab /{apiVersion}/analysis/alignment/samtools/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr } } \section{Endpoint /{apiVersion}/analysis/alignment/bwa/run}{ @@ -140,7 +146,7 @@ Picard is a set of command line tools (in Java) for manipulating high-throughput \section{Endpoint /{apiVersion}/analysis/alignment/qc/run}{ -Compute quality control (QC) metrics for a given alignment file (including samtools stats, samtools flag stats, FastQC and HS metrics). +Compute quality control (QC) metrics for a given alignment file: samtools stats, samtools flag stats and FastQC metrics. } \section{Endpoint /{apiVersion}/analysis/alignment/query}{ diff --git a/opencga-client/src/main/R/man/clinicalClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/clinicalClient-OpencgaR-method.Rd index 7479b604d64..f2b25ce10a5 100644 --- a/opencga-client/src/main/R/man/clinicalClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/clinicalClient-OpencgaR-method.Rd @@ -6,38 +6,49 @@ \usage{ \S4method{clinicalClient}{OpencgaR}( OpencgaR, - members, - interpretations, - interpretation, + annotationSet, clinicalAnalyses, clinicalAnalysis, + interpretation, + interpretations, + members, endpointName, params = NULL, ... ) } \arguments{ -\item{members}{Comma separated list of user or group IDs.} - -\item{interpretations}{Interpretation IDs of the Clinical Analysis.} - -\item{interpretation}{Interpretation ID.} +\item{annotationSet}{AnnotationSet ID to be updated.} \item{clinicalAnalyses}{Comma separated list of clinical analysis IDs.} \item{clinicalAnalysis}{Clinical analysis ID.} -\item{action}{Action to be performed \link{ADD, SET, REMOVE or RESET}.} +\item{interpretation}{Interpretation ID.} + +\item{interpretations}{Interpretation IDs of the Clinical Analysis.} + +\item{members}{Comma separated list of user or group IDs.} \item{propagate}{Propagate permissions to related families, individuals, samples and files.} +\item{variableSetId}{Variable set ID or name.} + +\item{path}{Path where the TSV file is located in OpenCGA or where it should be located.} + +\item{parents}{Flag indicating whether to create parent directories if they don't exist (only when TSV file was not previously associated).} + +\item{annotationSetId}{Annotation set id. If not provided, variableSetId will be used.} + \item{skipCreateDefaultInterpretation}{Flag to skip creating and initialise an empty default primary interpretation (Id will be '{clinicalAnalysisId}.1'). This flag is only considered if no Interpretation object is passed.} \item{sort}{Sort the results.} +\item{name}{Comma separated list of Interpretation names up to a maximum of 100.} + \item{clinicalAnalysisId}{Clinical Analysis id.} -\item{methodName}{Interpretation method name.} +\item{methodName}{Interpretation method name. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.} \item{primaryFindings}{Interpretation primary findings.} @@ -53,6 +64,12 @@ \item{jobTags}{Job tags.} +\item{jobScheduledStartTime}{Time when the job is scheduled to start.} + +\item{jobPriority}{Priority of the job.} + +\item{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.} + \item{auxiliarIndex}{Index auxiliar collection to improve performance assuming RGA is completely indexed.} \item{includeIndividual}{Include only the comma separated list of individuals to the response.} @@ -97,7 +114,7 @@ \item{uuid}{Comma separated list of Clinical Analysis UUIDs up to a maximum of 100.} -\item{disorder}{Clinical Analysis disorder.} +\item{disorder}{Clinical Analysis disorder. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.} \item{files}{Clinical Analysis files.} @@ -123,14 +140,20 @@ \item{modificationDate}{Clinical Analysis Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.} +\item{dueDate}{Clinical Analysis due date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.} + \item{qualityControlSummary}{Clinical Analysis quality control summary.} \item{release}{Release when it was created.} +\item{snapshot}{Snapshot value (Latest version of the entry in the specified release).} + \item{status}{Filter by status.} \item{internalStatus}{Filter by internal status.} +\item{annotation}{Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.} + \item{limit}{Number of results to be returned.} \item{skip}{Number of results to skip.} @@ -143,7 +166,9 @@ \item{savedFilter}{Use a saved filter at User level.} -\item{id}{List of IDs, these can be rs IDs (dbSNP) or variants in the format chrom:start:ref:alt, e.g. rs116600158,19:7177679:C:T.} +\item{includeInterpretation}{Interpretation ID to include the fields related to this interpretation.} + +\item{id}{List of variant IDs in the format chrom:start:ref:alt, e.g. 19:7177679:C:T.} \item{region}{List of regions, these can be just a single chromosome name or regions in the format chr:start-end, e.g.: 2,3:100000-200000.} @@ -157,7 +182,7 @@ \item{fileData}{Filter by file data (i.e. FILTER, QUAL and INFO columns from VCF file). [{file}:]{key}{op}{value}\link{,;}* . If no file is specified, will use all files from "file" filter. e.g. AN>200 or file_1.vcf:AN>200;file_2.vcf:AN<10 . Many fields can be combined. e.g. file_1.vcf:AN>200;DB=true;file_2.vcf:AN<10,FILTER=PASS,LowDP.} -\item{sample}{Filter variants by sample genotype. This will automatically set 'includeSample' parameter when not provided. This filter accepts multiple 3 forms: 1) List of samples: Samples that contain the main variant. Accepts AND (;) and OR (,) operators. e.g. HG0097,HG0098 . 2) List of samples with genotypes: {sample}:{gt1},{gt2}. Accepts AND (;) and OR (,) operators. e.g. HG0097:0/0;HG0098:0/1,1/1 . Unphased genotypes (e.g. 0/1, 1/1) will also include phased genotypes (e.g. 0|1, 1|0, 1|1), but not vice versa. When filtering by multi-allelic genotypes, any secondary allele will match, regardless of its position e.g. 1/2 will match with genotypes 1/2, 1/3, 1/4, .... Genotype aliases accepted: HOM_REF, HOM_ALT, HET, HET_REF, HET_ALT, HET_MISS and MISS e.g. HG0097:HOM_REF;HG0098:HET_REF,HOM_ALT . 3) Sample with segregation mode: {sample}:{segregation}. Only one sample accepted.Accepted segregation modes: \link{ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, mendelianError, compoundHeterozygous }. Value is case insensitive. e.g. HG0097:DeNovo Sample must have parents defined and indexed. .} +\item{sample}{Filter variants by sample genotype. This will automatically set 'includeSample' parameter when not provided. This filter accepts multiple 3 forms: 1) List of samples: Samples that contain the main variant. Accepts AND (;) and OR (,) operators. e.g. HG0097,HG0098 . 2) List of samples with genotypes: {sample}:{gt1},{gt2}. Accepts AND (;) and OR (,) operators. e.g. HG0097:0/0;HG0098:0/1,1/1 . Unphased genotypes (e.g. 0/1, 1/1) will also include phased genotypes (e.g. 0|1, 1|0, 1|1), but not vice versa. When filtering by multi-allelic genotypes, any secondary allele will match, regardless of its position e.g. 1/2 will match with genotypes 1/2, 1/3, 1/4, .... Genotype aliases accepted: HOM_REF, HOM_ALT, HET, HET_REF, HET_ALT, HET_MISS and MISS e.g. HG0097:HOM_REF;HG0098:HET_REF,HOM_ALT . 3) Sample with segregation mode: {sample}:{segregation}. Only one sample accepted.Accepted segregation modes: \link{ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, deNovoStrict, mendelianError, compoundHeterozygous }. Value is case insensitive. e.g. HG0097:DeNovo Sample must have parents defined and indexed. .} \item{sampleData}{Filter by any SampleData field from samples. [{sample}:]{key}{op}{value}\link{,;}* . If no sample is specified, will use all samples from "sample" or "genotype" filter. e.g. DP>200 or HG0097:DP>200,HG0098:DP<10 . Many FORMAT fields can be combined. e.g. HG0097:DP>200;GT=1/1,0/1,HG0098:DP<10.} @@ -185,7 +210,7 @@ \item{familyDisorder}{Specify the disorder to use for the family segregation.} -\item{familySegregation}{Filter by segregation mode from a given family. Accepted values: \link{ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, mendelianError, compoundHeterozygous }.} +\item{familySegregation}{Filter by segregation mode from a given family. Accepted values: \link{ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, deNovoStrict, mendelianError, compoundHeterozygous }.} \item{familyMembers}{Sub set of the members of a given family.} @@ -195,7 +220,7 @@ \item{ct}{List of SO consequence types, e.g. missense_variant,stop_lost or SO:0001583,SO:0001578. Accepts aliases 'loss_of_function' and 'protein_altering'.} -\item{xref}{List of any external reference, these can be genes, proteins or variants. Accepted IDs include HGNC, Ensembl genes, dbSNP, ClinVar, HPO, Cosmic, ...} +\item{xref}{List of any external reference, these can be genes, proteins or variants. Accepted IDs include HGNC, Ensembl genes, dbSNP, ClinVar, HPO, Cosmic, HGVS ...} \item{biotype}{List of biotypes, e.g. protein_coding.} @@ -203,11 +228,11 @@ \item{conservation}{Filter by conservation score: {conservation_score}[<|>|<=|>=]{number} e.g. phastCons>0.5,phylop<0.1,gerp>0.1.} -\item{populationFrequencyAlt}{Alternate Population Frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1kG_phase3:ALL<0.01.} +\item{populationFrequencyAlt}{Alternate Population Frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1000G:ALL<0.01.} -\item{populationFrequencyRef}{Reference Population Frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1kG_phase3:ALL<0.01.} +\item{populationFrequencyRef}{Reference Population Frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1000G:ALL<0.01.} -\item{populationFrequencyMaf}{Population minor allele frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1kG_phase3:ALL<0.01.} +\item{populationFrequencyMaf}{Population minor allele frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1000G:ALL<0.01.} \item{transcriptFlag}{List of transcript flags. e.g. canonical, CCDS, basic, LRG, MANE Select, MANE Plus Clinical, EGLH_HaemOnc, TSO500.} @@ -251,9 +276,15 @@ \item{force}{Force deletion if the ClinicalAnalysis contains interpretations or is locked.} -\item{flagsAction}{Action to be performed if the array of flags is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{flagsAction}{Action to be performed if the array of flags is being updated. Allowed values: \link{'ADD SET REMOVE'}} -\item{filesAction}{Action to be performed if the array of files is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{analystsAction}{Action to be performed if the array of analysts is being updated. Allowed values: \link{'ADD SET REMOVE'}} + +\item{annotationSetsAction}{Action to be performed if the array of annotationSets is being updated. Allowed values: \link{'ADD SET REMOVE'}} + +\item{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: \link{'ADD SET REMOVE RESET REPLACE'}} + +\item{flattenAnnotations}{Flatten the annotations?.} \item{deleted}{Boolean to retrieve deleted entries.} @@ -261,63 +292,71 @@ \item{version}{Version to revert to.} -\item{include}{Fields included in the response, whole JSON path must be provided.} +\item{primaryFindingsAction}{Action to be performed if the array of primary findings is being updated. Allowed values: \link{'ADD SET REMOVE REPLACE'}} -\item{exclude}{Fields excluded in the response, whole JSON path must be provided.} +\item{methodsAction}{Action to be performed if the array of methods is being updated. Allowed values: \link{'ADD SET REMOVE'}} + +\item{secondaryFindingsAction}{Action to be performed if the array of secondary findings is being updated. Allowed values: \link{'ADD SET REMOVE REPLACE'}} + +\item{panelsAction}{Action to be performed if the array of panels is being updated. Allowed values: \link{'ADD SET REMOVE'}} -\item{study}{[\link{user@}project:]study ID.} +\item{setAs}{Set interpretation as. Allowed values: \link{'PRIMARY SECONDARY'}} -\item{primaryFindingsAction}{Action to be performed if the array of primary findings is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE', 'REPLACE'}} +\item{include}{Fields included in the response, whole JSON path must be provided.} -\item{methodsAction}{Action to be performed if the array of methods is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{exclude}{Fields excluded in the response, whole JSON path must be provided.} -\item{secondaryFindingsAction}{Action to be performed if the array of secondary findings is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE', 'REPLACE'}} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} -\item{commentsAction}{Action to be performed if the array of comments is being updated. To REMOVE or REPLACE, the date will need to be provided to identify the comment. Allowed values: \link{'ADD', 'REMOVE', 'REPLACE'}} +\item{commentsAction}{Action to be performed if the array of comments is being updated. Allowed values: \link{'ADD REMOVE REPLACE'}} -\item{panelsAction}{Action to be performed if the array of panels is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{supportingEvidencesAction}{Action to be performed if the array of supporting evidences is being updated. Allowed values: \link{'ADD SET REMOVE'}} -\item{setAs}{Set interpretation as. Allowed values: \link{'PRIMARY', 'SECONDARY'}} +\item{filesAction}{Action to be performed if the array of files is being updated. Allowed values: \link{'ADD SET REMOVE'}} \item{includeResult}{Flag indicating to include the created or updated document result in the response.} -\item{data}{JSON containing clinical interpretation information.} +\item{data}{JSON containing clinical report information.} } \description{ This function implements the OpenCGA calls for managing Analysis - Clinical. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr updateAcl \tab /{apiVersion}/analysis/clinical/acl/{members}/update \tab study, members\link{*}, action\link{*}, propagate, body\link{*} \cr + loadAnnotationSets \tab /{apiVersion}/analysis/clinical/annotationSets/load \tab study, variableSetId\link{*}, path\link{*}, parents, annotationSetId, body \cr updateClinicalConfiguration \tab /{apiVersion}/analysis/clinical/clinical/configuration/update \tab study, body \cr create \tab /{apiVersion}/analysis/clinical/create \tab include, exclude, study, skipCreateDefaultInterpretation, includeResult, body\link{*} \cr - distinct \tab /{apiVersion}/analysis/clinical/distinct \tab study, id, uuid, type, disorder, files, sample, individual, proband, probandSamples, family, familyMembers, familyMemberSamples, panels, locked, analystId, priority, flags, creationDate, modificationDate, qualityControlSummary, release, status, internalStatus, deleted, field\link{*} \cr - distinctInterpretation \tab /{apiVersion}/analysis/clinical/interpretation/distinct \tab study, id, uuid, clinicalAnalysisId, analystId, methodName, panels, primaryFindings, secondaryFindings, creationDate, modificationDate, status, internalStatus, release, field\link{*} \cr - searchInterpretation \tab /{apiVersion}/analysis/clinical/interpretation/search \tab include, exclude, limit, skip, sort, study, id, uuid, clinicalAnalysisId, analystId, methodName, panels, primaryFindings, secondaryFindings, creationDate, modificationDate, status, internalStatus, release \cr + distinct \tab /{apiVersion}/analysis/clinical/distinct \tab study, id, uuid, type, disorder, files, sample, individual, proband, probandSamples, family, familyMembers, familyMemberSamples, panels, locked, analystId, priority, flags, creationDate, modificationDate, dueDate, qualityControlSummary, release, snapshot, status, internalStatus, annotation, deleted, field\link{*} \cr + distinctInterpretation \tab /{apiVersion}/analysis/clinical/interpretation/distinct \tab study, id, uuid, name, clinicalAnalysisId, analystId, methodName, panels, primaryFindings, secondaryFindings, creationDate, modificationDate, status, internalStatus, release, field\link{*} \cr + searchInterpretation \tab /{apiVersion}/analysis/clinical/interpretation/search \tab include, exclude, limit, skip, sort, study, id, uuid, name, clinicalAnalysisId, analystId, methodName, panels, primaryFindings, secondaryFindings, creationDate, modificationDate, status, internalStatus, release \cr infoInterpretation \tab /{apiVersion}/analysis/clinical/interpretation/{interpretations}/info \tab include, exclude, interpretations\link{*}, study, version, deleted \cr - runInterpreterCancerTiering \tab /{apiVersion}/analysis/clinical/interpreter/cancerTiering/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runInterpreterTeam \tab /{apiVersion}/analysis/clinical/interpreter/team/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runInterpreterTiering \tab /{apiVersion}/analysis/clinical/interpreter/tiering/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runInterpreterZetta \tab /{apiVersion}/analysis/clinical/interpreter/zetta/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr + runInterpreterCancerTiering \tab /{apiVersion}/analysis/clinical/interpreter/cancerTiering/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runInterpreterExomiser \tab /{apiVersion}/analysis/clinical/interpreter/exomiser/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runInterpreterTeam \tab /{apiVersion}/analysis/clinical/interpreter/team/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runInterpreterTiering \tab /{apiVersion}/analysis/clinical/interpreter/tiering/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runInterpreterZetta \tab /{apiVersion}/analysis/clinical/interpreter/zetta/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + load \tab /{apiVersion}/analysis/clinical/load \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr aggregationStatsRga \tab /{apiVersion}/analysis/clinical/rga/aggregationStats \tab limit, skip, sampleId, individualId, sex, phenotypes, disorders, numParents, geneId, geneName, chromosome, start, end, transcriptId, variants, dbSnps, knockoutType, filter, type, clinicalSignificance, populationFrequency, consequenceType, study, field\link{*} \cr queryRgaGene \tab /{apiVersion}/analysis/clinical/rga/gene/query \tab include, exclude, limit, skip, count, includeIndividual, skipIndividual, limitIndividual, sampleId, individualId, sex, phenotypes, disorders, numParents, geneId, geneName, chromosome, start, end, transcriptId, variants, dbSnps, knockoutType, filter, type, clinicalSignificance, populationFrequency, consequenceType, study \cr summaryRgaGene \tab /{apiVersion}/analysis/clinical/rga/gene/summary \tab limit, skip, count, sampleId, individualId, sex, phenotypes, disorders, numParents, geneId, geneName, chromosome, start, end, transcriptId, variants, dbSnps, knockoutType, filter, type, clinicalSignificance, populationFrequency, consequenceType, study \cr - runRgaIndex \tab /{apiVersion}/analysis/clinical/rga/index/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, auxiliarIndex, body\link{*} \cr + runRgaIndex \tab /{apiVersion}/analysis/clinical/rga/index/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, auxiliarIndex, body\link{*} \cr queryRgaIndividual \tab /{apiVersion}/analysis/clinical/rga/individual/query \tab include, exclude, limit, skip, count, sampleId, individualId, sex, phenotypes, disorders, numParents, geneId, geneName, chromosome, start, end, transcriptId, variants, dbSnps, knockoutType, filter, type, clinicalSignificance, populationFrequency, consequenceType, study \cr summaryRgaIndividual \tab /{apiVersion}/analysis/clinical/rga/individual/summary \tab limit, skip, count, sampleId, individualId, sex, phenotypes, disorders, numParents, geneId, geneName, chromosome, start, end, transcriptId, variants, dbSnps, knockoutType, filter, type, clinicalSignificance, populationFrequency, consequenceType, study \cr queryRgaVariant \tab /{apiVersion}/analysis/clinical/rga/variant/query \tab include, exclude, limit, skip, count, includeIndividual, skipIndividual, limitIndividual, sampleId, individualId, sex, phenotypes, disorders, numParents, geneId, geneName, chromosome, start, end, transcriptId, variants, dbSnps, knockoutType, filter, type, clinicalSignificance, populationFrequency, consequenceType, study \cr summaryRgaVariant \tab /{apiVersion}/analysis/clinical/rga/variant/summary \tab limit, skip, count, sampleId, individualId, sex, phenotypes, disorders, numParents, geneId, geneName, chromosome, start, end, transcriptId, variants, dbSnps, knockoutType, filter, type, clinicalSignificance, populationFrequency, consequenceType, study \cr - search \tab /{apiVersion}/analysis/clinical/search \tab include, exclude, limit, skip, count, study, id, uuid, type, disorder, files, sample, individual, proband, probandSamples, family, familyMembers, familyMemberSamples, panels, locked, analystId, priority, flags, creationDate, modificationDate, qualityControlSummary, release, status, internalStatus, deleted \cr - actionableVariant \tab /{apiVersion}/analysis/clinical/variant/actionable \tab study, sample \cr - queryVariant \tab /{apiVersion}/analysis/clinical/variant/query \tab include, exclude, limit, skip, count, approximateCount, approximateCountSamplingSize, savedFilter, id, region, type, study, file, filter, qual, fileData, sample, sampleData, sampleAnnotation, cohort, cohortStatsRef, cohortStatsAlt, cohortStatsMaf, cohortStatsMgf, cohortStatsPass, missingAlleles, missingGenotypes, score, family, familyDisorder, familySegregation, familyMembers, familyProband, gene, ct, xref, biotype, proteinSubstitution, conservation, populationFrequencyAlt, populationFrequencyRef, populationFrequencyMaf, transcriptFlag, geneTraitId, go, expression, proteinKeyword, drug, functionalScore, clinical, clinicalSignificance, clinicalConfirmedStatus, customAnnotation, panel, panelModeOfInheritance, panelConfidence, panelRoleInCancer, panelFeatureType, panelIntersection, trait \cr + search \tab /{apiVersion}/analysis/clinical/search \tab include, exclude, limit, skip, count, flattenAnnotations, study, id, uuid, type, disorder, files, sample, individual, proband, probandSamples, family, familyMembers, familyMemberSamples, panels, locked, analystId, priority, flags, creationDate, modificationDate, dueDate, qualityControlSummary, release, snapshot, status, internalStatus, annotation, deleted \cr + queryVariant \tab /{apiVersion}/analysis/clinical/variant/query \tab include, exclude, limit, skip, count, approximateCount, approximateCountSamplingSize, savedFilter, includeInterpretation, id, region, type, study, file, filter, qual, fileData, sample, sampleData, sampleAnnotation, cohort, cohortStatsRef, cohortStatsAlt, cohortStatsMaf, cohortStatsMgf, cohortStatsPass, missingAlleles, missingGenotypes, score, family, familyDisorder, familySegregation, familyMembers, familyProband, gene, ct, xref, biotype, proteinSubstitution, conservation, populationFrequencyAlt, populationFrequencyRef, populationFrequencyMaf, transcriptFlag, geneTraitId, go, expression, proteinKeyword, drug, functionalScore, clinical, clinicalSignificance, clinicalConfirmedStatus, customAnnotation, panel, panelModeOfInheritance, panelConfidence, panelRoleInCancer, panelFeatureType, panelIntersection, trait \cr acl \tab /{apiVersion}/analysis/clinical/{clinicalAnalyses}/acl \tab clinicalAnalyses\link{*}, study, member, silent \cr delete \tab /{apiVersion}/analysis/clinical/{clinicalAnalyses}/delete \tab study, force, clinicalAnalyses\link{*} \cr - update \tab /{apiVersion}/analysis/clinical/{clinicalAnalyses}/update \tab include, exclude, clinicalAnalyses\link{*}, study, commentsAction, flagsAction, filesAction, panelsAction, includeResult, body\link{*} \cr - info \tab /{apiVersion}/analysis/clinical/{clinicalAnalysis}/info \tab include, exclude, clinicalAnalysis\link{*}, study, deleted \cr + update \tab /{apiVersion}/analysis/clinical/{clinicalAnalyses}/update \tab include, exclude, clinicalAnalyses\link{*}, study, commentsAction, flagsAction, analystsAction, filesAction, panelsAction, annotationSetsAction, includeResult, body\link{*} \cr + updateAnnotationSetsAnnotations \tab /{apiVersion}/analysis/clinical/{clinicalAnalysis}/annotationSets/{annotationSet}/annotations/update \tab clinicalAnalysis\link{*}, study, annotationSet\link{*}, action, body \cr + info \tab /{apiVersion}/analysis/clinical/{clinicalAnalysis}/info \tab include, exclude, flattenAnnotations, clinicalAnalysis\link{*}, study, version, deleted \cr createInterpretation \tab /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/create \tab include, exclude, clinicalAnalysis\link{*}, study, setAs, includeResult, body\link{*} \cr clearInterpretation \tab /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/{interpretations}/clear \tab study, interpretations\link{*}, clinicalAnalysis\link{*} \cr deleteInterpretation \tab /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/{interpretations}/delete \tab study, clinicalAnalysis\link{*}, interpretations\link{*}, setAsPrimary \cr revertInterpretation \tab /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/{interpretation}/revert \tab study, clinicalAnalysis\link{*}, interpretation\link{*}, version\link{*} \cr updateInterpretation \tab /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/{interpretation}/update \tab include, exclude, study, primaryFindingsAction, methodsAction, secondaryFindingsAction, commentsAction, panelsAction, setAs, clinicalAnalysis\link{*}, interpretation\link{*}, includeResult, body\link{*} \cr + updateReport \tab /{apiVersion}/analysis/clinical/{clinicalAnalysis}/report/update \tab include, exclude, clinicalAnalysis\link{*}, study, commentsAction, supportingEvidencesAction, filesAction, includeResult, body\link{*} \cr } } \section{Endpoint /{apiVersion}/analysis/clinical/acl/{members}/update}{ @@ -325,6 +364,11 @@ The following table summarises the available \emph{actions} for this client:\tab Update the set of permissions granted for the member. } +\section{Endpoint /{apiVersion}/analysis/clinical/annotationSets/load}{ + +Load annotation sets from a TSV file. +} + \section{Endpoint /{apiVersion}/analysis/clinical/clinical/configuration/update}{ Update Clinical Analysis configuration. @@ -360,6 +404,11 @@ Clinical interpretation information. Run cancer tiering interpretation analysis. } +\section{Endpoint /{apiVersion}/analysis/clinical/interpreter/exomiser/run}{ + +Run exomiser interpretation analysis. +} + \section{Endpoint /{apiVersion}/analysis/clinical/interpreter/team/run}{ Run TEAM interpretation analysis. @@ -375,6 +424,11 @@ Run tiering interpretation analysis. Run Zetta interpretation analysis. } +\section{Endpoint /{apiVersion}/analysis/clinical/load}{ + +Load clinical analyses from a file. +} + \section{Endpoint /{apiVersion}/analysis/clinical/rga/aggregationStats}{ RGA aggregation stats. @@ -420,11 +474,6 @@ RGA variant summary stats. Clinical analysis search. } -\section{Endpoint /{apiVersion}/analysis/clinical/variant/actionable}{ - -Fetch actionable clinical variants. -} - \section{Endpoint /{apiVersion}/analysis/clinical/variant/query}{ Fetch clinical variants. @@ -445,6 +494,11 @@ Delete clinical analyses. Update clinical analysis attributes. } +\section{Endpoint /{apiVersion}/analysis/clinical/{clinicalAnalysis}/annotationSets/{annotationSet}/annotations/update}{ + +Update annotations from an annotationSet. +} + \section{Endpoint /{apiVersion}/analysis/clinical/{clinicalAnalysis}/info}{ Clinical analysis info. @@ -475,6 +529,11 @@ Revert to a previous interpretation version. Update interpretation fields. } +\section{Endpoint /{apiVersion}/analysis/clinical/{clinicalAnalysis}/report/update}{ + +Update clinical analysis report. +} + \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/} diff --git a/opencga-client/src/main/R/man/cohortClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/cohortClient-OpencgaR-method.Rd index 2ef531e7884..dbcd842f025 100644 --- a/opencga-client/src/main/R/man/cohortClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/cohortClient-OpencgaR-method.Rd @@ -6,33 +6,23 @@ \usage{ \S4method{cohortClient}{OpencgaR}( OpencgaR, - members, annotationSet, - cohorts, cohort, + cohorts, + members, endpointName, params = NULL, ... ) } \arguments{ -\item{members}{Comma separated list of user or group ids.} - \item{annotationSet}{AnnotationSet ID to be updated.} -\item{cohorts}{Comma separated list of cohort ids.} - \item{cohort}{Cohort ID.} -\item{creationYear}{Creation year.} - -\item{creationMonth}{Creation month (JANUARY, FEBRUARY...).} - -\item{creationDay}{Creation day.} - -\item{creationDayOfWeek}{Creation day of week (MONDAY, TUESDAY...).} +\item{cohorts}{Comma separated list of cohort ids.} -\item{default}{Calculate default stats.} +\item{members}{Comma separated list of user or group ids.} \item{variableSetId}{Variable set ID or name.} @@ -46,7 +36,7 @@ \item{variable}{Deprecated: Use /generate web service and filter by annotation.} -\item{field}{Field for which to obtain the distinct values.} +\item{field}{Comma separated list of fields for which to obtain the distinct values.} \item{somatic}{Somatic sample.} @@ -54,7 +44,7 @@ \item{fileIds}{Comma separated list of file IDs, paths or UUIDs.} -\item{phenotypes}{Comma separated list of phenotype ids or names.} +\item{phenotypes}{Comma separated list of phenotype ids or 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.} \item{snapshot}{Snapshot value (Latest version of the entry in the specified release).} @@ -64,9 +54,9 @@ \item{count}{Get the total number of results matching the query. Deactivated by default.} -\item{id}{Comma separated list of cohort IDs up to a maximum of 100.} +\item{id}{Comma separated list of cohort 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.} -\item{name}{Comma separated list of cohort names up to a maximum of 100.} +\item{name}{Comma separated list of cohort names 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.} \item{uuid}{Comma separated list of cohort IDs up to a maximum of 100.} @@ -102,15 +92,15 @@ \item{exclude}{Fields excluded in the response, whole JSON path must be provided.} -\item{samplesAction}{Action to be performed if the array of samples is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{samplesAction}{Action to be performed if the array of samples is being updated. Allowed values: \link{'ADD SET REMOVE'}} -\item{annotationSetsAction}{Action to be performed if the array of annotationSets is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{annotationSetsAction}{Action to be performed if the array of annotationSets is being updated. Allowed values: \link{'ADD SET REMOVE'}} \item{includeResult}{Flag indicating to include the created or updated document result in the response.} -\item{study}{Study [\link{user@}project:]study where study and project can be either the ID or UUID.} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} -\item{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: \link{'ADD', 'SET', 'REMOVE', 'RESET', 'REPLACE'}} +\item{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: \link{'ADD SET REMOVE RESET REPLACE'}} \item{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.} } @@ -119,7 +109,6 @@ This function implements the OpenCGA calls for managing Cohorts. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr updateAcl \tab /{apiVersion}/cohorts/acl/{members}/update \tab study, members\link{*}, action\link{*}, body\link{*} \cr - aggregationStats \tab /{apiVersion}/cohorts/aggregationStats \tab study, type, creationYear, creationMonth, creationDay, creationDayOfWeek, numSamples, status, release, annotation, default, field \cr loadAnnotationSets \tab /{apiVersion}/cohorts/annotationSets/load \tab study, variableSetId\link{*}, path\link{*}, parents, annotationSetId, body \cr create \tab /{apiVersion}/cohorts/create \tab include, exclude, study, variableSet, variable, includeResult, body\link{*} \cr distinct \tab /{apiVersion}/cohorts/distinct \tab study, id, name, uuid, type, creationDate, modificationDate, deleted, status, internalStatus, annotation, acl, samples, numSamples, release, field\link{*} \cr @@ -137,11 +126,6 @@ The following table summarises the available \emph{actions} for this client:\tab Update the set of permissions granted for the member. } -\section{Endpoint /{apiVersion}/cohorts/aggregationStats}{ - -Fetch catalog cohort stats. -} - \section{Endpoint /{apiVersion}/cohorts/annotationSets/load}{ Load annotation sets from a TSV file. diff --git a/opencga-client/src/main/R/man/familyClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/familyClient-OpencgaR-method.Rd index 7abe05ded30..9f2f796bc8c 100644 --- a/opencga-client/src/main/R/man/familyClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/familyClient-OpencgaR-method.Rd @@ -6,37 +6,25 @@ \usage{ \S4method{familyClient}{OpencgaR}( OpencgaR, - members, annotationSet, families, family, + members, endpointName, params = NULL, ... ) } \arguments{ -\item{members}{Comma separated list of family members.} - \item{annotationSet}{AnnotationSet ID to be updated.} \item{families}{Comma separated list of family ids.} \item{family}{Family id.} -\item{propagate}{Propagate family permissions to related individuals and samples.} - -\item{creationYear}{Creation year.} - -\item{creationMonth}{Creation month (JANUARY, FEBRUARY...).} - -\item{creationDay}{Creation day.} - -\item{creationDayOfWeek}{Creation day of week (MONDAY, TUESDAY...).} - -\item{numMembers}{Number of members.} +\item{members}{Comma separated list of family members.} -\item{default}{Calculate default stats.} +\item{propagate}{Propagate family permissions to related individuals and samples. Allowed values: \link{'NO YES YES_AND_VARIANT_VIEW'}} \item{variableSetId}{Variable set ID or name.} @@ -46,7 +34,7 @@ \item{annotationSetId}{Annotation set id. If not provided, variableSetId will be used.} -\item{field}{Field for which to obtain the distinct values.} +\item{field}{Comma separated list of fields for which to obtain the distinct values.} \item{limit}{Number of results to be returned.} @@ -54,9 +42,9 @@ \item{count}{Get the total number of results matching the query. Deactivated by default.} -\item{id}{Comma separated list family IDs up to a maximum of 100.} +\item{id}{Comma separated list family 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.} -\item{name}{Comma separated list family names up to a maximum of 100.} +\item{name}{Comma separated list family names 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.} \item{uuid}{Comma separated list family UUIDs up to a maximum of 100.} @@ -64,9 +52,9 @@ \item{samples}{Comma separated list of member's samples.} -\item{phenotypes}{Comma separated list of phenotype ids or names.} +\item{phenotypes}{Comma separated list of phenotype ids or 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.} -\item{disorders}{Comma separated list of disorder ids or names.} +\item{disorders}{Comma separated list of disorder ids or 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.} \item{creationDate}{Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.} @@ -100,15 +88,15 @@ \item{updateRoles}{Update the member roles within the family.} -\item{annotationSetsAction}{Action to be performed if the array of annotationSets is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{updatePedigreeGraph}{Update the family pedigree graph.} -\item{includeResult}{Flag indicating to include the created or updated document result in the response.} +\item{annotationSetsAction}{Action to be performed if the array of annotationSets is being updated. Allowed values: \link{'ADD SET REMOVE'}} -\item{study}{Study [\link{user@}project:]study where study and project can be either the ID or UUID.} +\item{includeResult}{Flag indicating to include the created or updated document result in the response.} -\item{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: \link{'ADD', 'SET', 'REMOVE', 'RESET', 'REPLACE'}} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} -\item{incVersion}{Create a new version of family.} +\item{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: \link{'ADD SET REMOVE RESET REPLACE'}} \item{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.} } @@ -117,7 +105,6 @@ This function implements the OpenCGA calls for managing Families. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr updateAcl \tab /{apiVersion}/families/acl/{members}/update \tab study, members\link{*}, action\link{*}, propagate, body\link{*} \cr - aggregationStats \tab /{apiVersion}/families/aggregationStats \tab study, creationYear, creationMonth, creationDay, creationDayOfWeek, status, phenotypes, release, version, numMembers, expectedSize, annotation, default, field \cr loadAnnotationSets \tab /{apiVersion}/families/annotationSets/load \tab study, variableSetId\link{*}, path\link{*}, parents, annotationSetId, body \cr create \tab /{apiVersion}/families/create \tab include, exclude, study, members, includeResult, body\link{*} \cr distinct \tab /{apiVersion}/families/distinct \tab study, id, name, uuid, members, expectedSize, samples, phenotypes, disorders, creationDate, modificationDate, deleted, internalStatus, status, annotation, acl, release, snapshot, field\link{*} \cr @@ -125,8 +112,8 @@ The following table summarises the available \emph{actions} for this client:\tab acl \tab /{apiVersion}/families/{families}/acl \tab families\link{*}, study, member, silent \cr delete \tab /{apiVersion}/families/{families}/delete \tab study, families\link{*} \cr info \tab /{apiVersion}/families/{families}/info \tab include, exclude, flattenAnnotations, families\link{*}, study, version, deleted \cr - update \tab /{apiVersion}/families/{families}/update \tab include, exclude, families\link{*}, study, incVersion, updateRoles, annotationSetsAction, includeResult, body \cr - updateAnnotationSetsAnnotations \tab /{apiVersion}/families/{family}/annotationSets/{annotationSet}/annotations/update \tab family\link{*}, study, annotationSet\link{*}, action, incVersion, body \cr + update \tab /{apiVersion}/families/{families}/update \tab include, exclude, families\link{*}, study, updateRoles, updatePedigreeGraph, annotationSetsAction, includeResult, body \cr + updateAnnotationSetsAnnotations \tab /{apiVersion}/families/{family}/annotationSets/{annotationSet}/annotations/update \tab family\link{*}, study, annotationSet\link{*}, action, body \cr } } \section{Endpoint /{apiVersion}/families/acl/{members}/update}{ @@ -134,11 +121,6 @@ The following table summarises the available \emph{actions} for this client:\tab Update the set of permissions granted for the member. } -\section{Endpoint /{apiVersion}/families/aggregationStats}{ - -Fetch catalog family stats. -} - \section{Endpoint /{apiVersion}/families/annotationSets/load}{ Load annotation sets from a TSV file. diff --git a/opencga-client/src/main/R/man/fileClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/fileClient-OpencgaR-method.Rd index b744d1f2b14..ebafdfcd8b9 100644 --- a/opencga-client/src/main/R/man/fileClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/fileClient-OpencgaR-method.Rd @@ -6,50 +6,32 @@ \usage{ \S4method{fileClient}{OpencgaR}( OpencgaR, - folder, - members, - file, annotationSet, + file, files, + folder, + members, endpointName, params = NULL, ... ) } \arguments{ -\item{folder}{Folder id or name. Paths must be separated by : instead of /.} - -\item{members}{Comma separated list of user or group ids.} +\item{annotationSet}{AnnotationSet ID to be updated.} \item{file}{File uuid, id, or name.} -\item{annotationSet}{AnnotationSet ID to be updated.} - \item{files}{Comma separated list of file ids, names or paths. Paths must be separated by : instead of /.} -\item{creationYear}{Creation year.} - -\item{creationMonth}{Creation month (JANUARY, FEBRUARY...).} - -\item{creationDay}{Creation day.} - -\item{creationDayOfWeek}{Creation day of week (MONDAY, TUESDAY...).} - -\item{software}{Software.} - -\item{experiment}{Experiment.} - -\item{numSamples}{Number of samples.} - -\item{numRelatedFiles}{Number of related files.} +\item{folder}{Folder id or name. Paths must be separated by : instead of /.} -\item{default}{Calculate default stats.} +\item{members}{Comma separated list of user or group ids.} \item{variableSetId}{Variable set ID or name.} \item{annotationSetId}{Annotation set id. If not provided, variableSetId will be used.} -\item{field}{Field for which to obtain the distinct values.} +\item{field}{Comma separated list of fields for which to obtain the distinct values.} \item{jobDependsOn}{Comma separated list of existing job IDs the job will depend on.} @@ -57,15 +39,21 @@ \item{jobTags}{Job tags.} -\item{id}{Comma separated list of file IDs up to a maximum of 100.} +\item{jobScheduledStartTime}{Time when the job is scheduled to start.} + +\item{jobPriority}{Priority of the job.} + +\item{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.} + +\item{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.} \item{uuid}{Comma separated list file UUIDs up to a maximum of 100.} -\item{name}{Comma separated list of file names.} +\item{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.} -\item{path}{Comma separated list of paths.} +\item{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.} -\item{uri}{Comma separated list of uris.} +\item{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.} \item{type}{File type, either FILE or DIRECTORY.} @@ -87,7 +75,7 @@ \item{modificationDate}{Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.} -\item{tags}{Tags.} +\item{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.} \item{size}{File size.} @@ -101,11 +89,11 @@ \item{release}{Release when it was created.} -\item{filename}{File name to overwrite the input fileName.} +\item{fileName}{File name to overwrite the input fileName.} -\item{fileFormat}{File format.} +\item{fileFormat}{File format. Allowed values: \link{'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'}} -\item{bioformat}{File bioformat.} +\item{bioformat}{File bioformat. Allowed values: \link{'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'}} \item{checksum}{Expected MD5 file checksum.} @@ -125,17 +113,15 @@ \item{deleted}{Boolean to retrieve deleted files.} -\item{sampleIdsAction}{Action to be performed if the array of samples is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{sampleIdsAction}{Action to be performed if the array of samples is being updated. Allowed values: \link{'ADD SET REMOVE'}} -\item{annotationSetsAction}{Action to be performed if the array of annotationSets is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{annotationSetsAction}{Action to be performed if the array of annotationSets is being updated. Allowed values: \link{'ADD SET REMOVE'}} -\item{relatedFilesAction}{Action to be performed if the array of relatedFiles is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{relatedFilesAction}{Action to be performed if the array of relatedFiles is being updated. Allowed values: \link{'ADD SET REMOVE'}} -\item{tagsAction}{Action to be performed if the array of tags is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{tagsAction}{Action to be performed if the array of tags is being updated. Allowed values: \link{'ADD SET REMOVE'}} -\item{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: \link{'ADD', 'SET', 'REMOVE'}} - -\item{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.} +\item{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: \link{'ADD SET REMOVE RESET REPLACE'}} \item{pattern}{String pattern.} @@ -145,6 +131,8 @@ \item{offset}{Starting byte from which the file will be read.} +\item{data}{Parameters to modify.} + \item{lines}{Maximum number of lines to be returned up to a maximum of 1000.} \item{limit}{Number of results to be returned.} @@ -157,7 +145,7 @@ \item{exclude}{Fields excluded in the response, whole JSON path must be provided.} -\item{study}{Study [\link{user@}project:]study where study and project can be either the ID or UUID.} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} \item{maxDepth}{Maximum depth to get files from.} } @@ -166,18 +154,17 @@ This function implements the OpenCGA calls for managing Files. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr updateAcl \tab /{apiVersion}/files/acl/{members}/update \tab study, members\link{*}, action\link{*}, body\link{*} \cr - aggregationStats \tab /{apiVersion}/files/aggregationStats \tab study, name, type, format, bioformat, creationYear, creationMonth, creationDay, creationDayOfWeek, status, release, external, size, software, experiment, numSamples, numRelatedFiles, annotation, default, field \cr loadAnnotationSets \tab /{apiVersion}/files/annotationSets/load \tab study, variableSetId\link{*}, path\link{*}, parents, annotationSetId, body \cr bioformats \tab /{apiVersion}/files/bioformats \tab \cr create \tab /{apiVersion}/files/create \tab study, parents, body\link{*} \cr distinct \tab /{apiVersion}/files/distinct \tab 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\link{*} \cr - fetch \tab /{apiVersion}/files/fetch \tab jobId, jobDescription, jobDependsOn, jobTags, study, body\link{*} \cr + fetch \tab /{apiVersion}/files/fetch \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body\link{*} \cr formats \tab /{apiVersion}/files/formats \tab \cr link \tab /{apiVersion}/files/link \tab study, parents, body\link{*} \cr - runLink \tab /{apiVersion}/files/link/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr - runPostlink \tab /{apiVersion}/files/postlink/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr + runLink \tab /{apiVersion}/files/link/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runPostlink \tab /{apiVersion}/files/postlink/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr search \tab /{apiVersion}/files/search \tab 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 \cr - upload \tab /{apiVersion}/files/upload \tab file, filename, fileFormat, bioformat, checksum, study, relativeFilePath, description, parents \cr + upload \tab /{apiVersion}/files/upload \tab file, fileName, fileFormat, bioformat, checksum, study, relativeFilePath, description, parents \cr acl \tab /{apiVersion}/files/{files}/acl \tab files\link{*}, study, member, silent \cr delete \tab /{apiVersion}/files/{files}/delete \tab study, files\link{*}, skipTrash \cr info \tab /{apiVersion}/files/{files}/info \tab include, exclude, flattenAnnotations, files\link{*}, study, deleted \cr @@ -188,6 +175,7 @@ The following table summarises the available \emph{actions} for this client:\tab grep \tab /{apiVersion}/files/{file}/grep \tab file\link{*}, study, pattern, ignoreCase, maxCount \cr head \tab /{apiVersion}/files/{file}/head \tab file\link{*}, study, offset, lines \cr image \tab /{apiVersion}/files/{file}/image \tab file\link{*}, study \cr + move \tab /{apiVersion}/files/{file}/move \tab include, exclude, file\link{*}, study, body\link{*} \cr refresh \tab /{apiVersion}/files/{file}/refresh \tab file\link{*}, study \cr tail \tab /{apiVersion}/files/{file}/tail \tab file\link{*}, study, lines \cr list \tab /{apiVersion}/files/{folder}/list \tab include, exclude, limit, skip, count, folder\link{*}, study \cr @@ -199,11 +187,6 @@ The following table summarises the available \emph{actions} for this client:\tab Update the set of permissions granted for the member. } -\section{Endpoint /{apiVersion}/files/aggregationStats}{ - -Fetch catalog file stats. -} - \section{Endpoint /{apiVersion}/files/annotationSets/load}{ Load annotation sets from a TSV file. @@ -309,6 +292,11 @@ Show the first lines of a file (up to a limit). Obtain the base64 content of an image. } +\section{Endpoint /{apiVersion}/files/{file}/move}{ + +Move file to a different path. +} + \section{Endpoint /{apiVersion}/files/{file}/refresh}{ Refresh metadata from the selected file or folder. Return updated files. diff --git a/opencga-client/src/main/R/man/ga4ghClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/ga4ghClient-OpencgaR-method.Rd index 37639477ca2..0d6d4d5d88c 100644 --- a/opencga-client/src/main/R/man/ga4ghClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/ga4ghClient-OpencgaR-method.Rd @@ -4,13 +4,13 @@ \alias{ga4ghClient,OpencgaR-method} \title{GA4GHClient methods} \usage{ -\S4method{ga4ghClient}{OpencgaR}(OpencgaR, study, file, endpointName, params = NULL, ...) +\S4method{ga4ghClient}{OpencgaR}(OpencgaR, file, study, endpointName, params = NULL, ...) } \arguments{ -\item{study}{Study [\link{user@}project:]study where study and project can be either the ID or UUID.} - \item{file}{File id, name or path.} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} + \item{referenceName}{Reference sequence name (Example: 'chr1', '1' or 'chrX'.} \item{start}{The start position of the range on the reference, 0-based, inclusive.} diff --git a/opencga-client/src/main/R/man/individualClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/individualClient-OpencgaR-method.Rd index aebbe1780c7..50646638074 100644 --- a/opencga-client/src/main/R/man/individualClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/individualClient-OpencgaR-method.Rd @@ -6,45 +6,25 @@ \usage{ \S4method{individualClient}{OpencgaR}( OpencgaR, + annotationSet, + individual, individuals, members, - individual, - annotationSet, endpointName, params = NULL, ... ) } \arguments{ -\item{individuals}{Comma separated list of individual ids.} - -\item{members}{Comma separated list of user or group ids.} - -\item{individual}{Individual ID, name or UUID.} - \item{annotationSet}{AnnotationSet ID to be updated.} -\item{propagate}{Propagate individual permissions to related samples.} - -\item{hasFather}{Has father.} - -\item{hasMother}{Has mother.} - -\item{population}{Population.} - -\item{creationYear}{Creation year.} - -\item{creationMonth}{Creation month (JANUARY, FEBRUARY...).} - -\item{creationDay}{Creation day.} - -\item{creationDayOfWeek}{Creation day of week (MONDAY, TUESDAY...).} +\item{individual}{Individual ID, name or UUID.} -\item{numSamples}{Number of samples.} +\item{individuals}{Comma separated list of individual ids.} -\item{parentalConsanguinity}{Parental consanguinity.} +\item{members}{Comma separated list of user or group ids.} -\item{default}{Calculate default stats.} +\item{propagate}{Propagate individual permissions to related samples.} \item{variableSetId}{Variable set ID or name.} @@ -54,7 +34,7 @@ \item{annotationSetId}{Annotation set id. If not provided, variableSetId will be used.} -\item{field}{Field for which to obtain the distinct values.} +\item{field}{Comma separated list of fields for which to obtain the distinct values.} \item{limit}{Number of results to be returned.} @@ -62,11 +42,11 @@ \item{count}{Get the total number of results matching the query. Deactivated by default.} -\item{id}{Comma separated list individual IDs up to a maximum of 100.} +\item{id}{Comma separated list individual 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.} \item{uuid}{Comma separated list individual UUIDs up to a maximum of 100.} -\item{name}{Comma separated list individual names up to a maximum of 100.} +\item{name}{Comma separated list individual names 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.} \item{father}{Father ID, name or UUID.} @@ -80,15 +60,15 @@ \item{dateOfBirth}{Individual date of birth.} -\item{ethnicity}{Individual ethnicity.} +\item{ethnicity}{Individual ethnicity. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.} -\item{disorders}{Comma separated list of disorder ids or names.} +\item{disorders}{Comma separated list of disorder ids or 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.} -\item{phenotypes}{Comma separated list of phenotype ids or names.} +\item{phenotypes}{Comma separated list of phenotype ids or 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.} -\item{populationName}{Population name.} +\item{populationName}{Population name. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.} -\item{populationSubpopulation}{Subpopulation name.} +\item{populationSubpopulation}{Subpopulation name. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.} \item{karyotypicSex}{Individual karyotypic sex.} @@ -120,19 +100,17 @@ \item{deleted}{Boolean to retrieve deleted individuals.} -\item{samplesAction}{Action to be performed if the array of samples is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{samplesAction}{Action to be performed if the array of samples is being updated. Allowed values: \link{'ADD SET REMOVE'}} -\item{phenotypesAction}{Action to be performed if the array of phenotypes is being updated \link{SET, ADD, REMOVE}. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{phenotypesAction}{Action to be performed if the array of phenotypes is being updated \link{SET, ADD, REMOVE}. Allowed values: \link{'ADD SET REMOVE'}} -\item{disordersAction}{Action to be performed if the array of disorders is being updated \link{SET, ADD, REMOVE}. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{disordersAction}{Action to be performed if the array of disorders is being updated \link{SET, ADD, REMOVE}. Allowed values: \link{'ADD SET REMOVE'}} -\item{annotationSetsAction}{Action to be performed if the array of annotationSets is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{annotationSetsAction}{Action to be performed if the array of annotationSets is being updated. Allowed values: \link{'ADD SET REMOVE'}} \item{includeResult}{Flag indicating to include the created or updated document result in the response.} -\item{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: \link{'ADD', 'SET', 'REMOVE', 'RESET', 'REPLACE'}} - -\item{incVersion}{Create a new version of individual.} +\item{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: \link{'ADD SET REMOVE RESET REPLACE'}} \item{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.} @@ -142,7 +120,7 @@ \item{flattenAnnotations}{Flatten the annotations?.} -\item{study}{Study [\link{user@}project:]study where study and project can be either the ID or UUID.} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} \item{degree}{Pedigree degree.} } @@ -151,7 +129,6 @@ This function implements the OpenCGA calls for managing Individuals. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr updateAcl \tab /{apiVersion}/individuals/acl/{members}/update \tab study, members\link{*}, action\link{*}, propagate, body\link{*} \cr - aggregationStats \tab /{apiVersion}/individuals/aggregationStats \tab study, hasFather, hasMother, sex, karyotypicSex, ethnicity, population, creationYear, creationMonth, creationDay, creationDayOfWeek, status, lifeStatus, phenotypes, numSamples, parentalConsanguinity, release, version, annotation, default, field \cr loadAnnotationSets \tab /{apiVersion}/individuals/annotationSets/load \tab study, variableSetId\link{*}, path\link{*}, parents, annotationSetId, body \cr create \tab /{apiVersion}/individuals/create \tab include, exclude, study, samples, includeResult, body\link{*} \cr distinct \tab /{apiVersion}/individuals/distinct \tab study, id, uuid, name, familyIds, father, mother, samples, sex, ethnicity, dateOfBirth, disorders, phenotypes, populationName, populationSubpopulation, karyotypicSex, lifeStatus, internalStatus, status, deleted, creationDate, modificationDate, annotation, acl, release, snapshot, field\link{*} \cr @@ -159,8 +136,8 @@ The following table summarises the available \emph{actions} for this client:\tab acl \tab /{apiVersion}/individuals/{individuals}/acl \tab individuals\link{*}, study, member, silent \cr delete \tab /{apiVersion}/individuals/{individuals}/delete \tab force, study, individuals\link{*} \cr info \tab /{apiVersion}/individuals/{individuals}/info \tab include, exclude, flattenAnnotations, individuals\link{*}, study, version, deleted \cr - update \tab /{apiVersion}/individuals/{individuals}/update \tab include, exclude, individuals\link{*}, study, samplesAction, phenotypesAction, disordersAction, annotationSetsAction, incVersion, includeResult, body \cr - updateAnnotationSetsAnnotations \tab /{apiVersion}/individuals/{individual}/annotationSets/{annotationSet}/annotations/update \tab individual\link{*}, study, annotationSet\link{*}, action, incVersion, body \cr + update \tab /{apiVersion}/individuals/{individuals}/update \tab include, exclude, individuals\link{*}, study, samplesAction, phenotypesAction, disordersAction, annotationSetsAction, includeResult, body \cr + updateAnnotationSetsAnnotations \tab /{apiVersion}/individuals/{individual}/annotationSets/{annotationSet}/annotations/update \tab individual\link{*}, study, annotationSet\link{*}, action, body \cr relatives \tab /{apiVersion}/individuals/{individual}/relatives \tab include, exclude, flattenAnnotations, individual\link{*}, study, degree \cr } } @@ -169,11 +146,6 @@ The following table summarises the available \emph{actions} for this client:\tab Update the set of permissions granted for the member. } -\section{Endpoint /{apiVersion}/individuals/aggregationStats}{ - -Fetch catalog individual stats. -} - \section{Endpoint /{apiVersion}/individuals/annotationSets/load}{ Load annotation sets from a TSV file. diff --git a/opencga-client/src/main/R/man/jobClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/jobClient-OpencgaR-method.Rd index 1a6c95506dd..8572e8d31d9 100644 --- a/opencga-client/src/main/R/man/jobClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/jobClient-OpencgaR-method.Rd @@ -4,36 +4,18 @@ \alias{jobClient,OpencgaR-method} \title{JobClient methods} \usage{ -\S4method{jobClient}{OpencgaR}(OpencgaR, members, job, jobs, endpointName, params = NULL, ...) +\S4method{jobClient}{OpencgaR}(OpencgaR, job, jobs, members, endpointName, params = NULL, ...) } \arguments{ -\item{members}{Comma separated list of user or group ids.} - \item{job}{Job ID or UUID.} \item{jobs}{Comma separated list of job IDs or UUIDs up to a maximum of 100.} -\item{action}{Action to be performed \link{ADD, SET, REMOVE or RESET}.} - -\item{toolScope}{Tool scope.} - -\item{toolResource}{Tool resource.} - -\item{executorId}{Executor id.} - -\item{executorFramework}{Executor framework.} - -\item{creationYear}{Creation year.} - -\item{creationMonth}{Creation month (JANUARY, FEBRUARY...).} - -\item{creationDay}{Creation day.} - -\item{creationDayOfWeek}{Creation day of week (MONDAY, TUESDAY...).} +\item{members}{Comma separated list of user or group ids.} -\item{default}{Calculate default stats.} +\item{action}{Action to be performed \link{ADD, SET, REMOVE or RESET}. Allowed values: \link{'SET ADD REMOVE RESET'}} -\item{field}{Field for which to obtain the distinct values.} +\item{field}{Comma separated list of fields for which to obtain the distinct values.} \item{jobId}{Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not provided.} @@ -43,13 +25,15 @@ \item{jobTags}{Job tags.} +\item{jobScheduledStartTime}{Time when the job is scheduled to start.} + \item{skip}{Number of results to skip.} \item{count}{Get the total number of results matching the query. Deactivated by default.} \item{otherStudies}{Flag indicating the entries being queried can belong to any related study, not just the primary one.} -\item{id}{Comma separated list of job IDs up to a maximum of 100.} +\item{id}{Comma separated list of job 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.} \item{uuid}{Comma separated list of job UUIDs up to a maximum of 100.} @@ -81,7 +65,7 @@ \item{userId}{User that created the job.} -\item{toolId}{Tool ID executed by the job.} +\item{toolId}{Tool ID executed by the job. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.} \item{member}{User or group id.} @@ -99,7 +83,7 @@ \item{offset}{Starting byte from which the file will be read.} -\item{study}{Study [\link{user@}project:]study where study and project can be either the ID or UUID.} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} \item{lines}{Maximum number of lines to be returned up to a maximum of 1000.} @@ -110,16 +94,16 @@ This function implements the OpenCGA calls for managing Jobs. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr updateAcl \tab /{apiVersion}/jobs/acl/{members}/update \tab members\link{*}, action\link{*}, body\link{*} \cr - aggregationStats \tab /{apiVersion}/jobs/aggregationStats \tab study, toolId, toolScope, toolType, toolResource, userId, priority, tags, executorId, executorFramework, creationYear, creationMonth, creationDay, creationDayOfWeek, status, release, default, field \cr create \tab /{apiVersion}/jobs/create \tab study, body\link{*} \cr distinct \tab /{apiVersion}/jobs/distinct \tab study, otherStudies, id, uuid, toolId, toolType, userId, priority, status, internalStatus, creationDate, modificationDate, visited, tags, input, output, acl, release, deleted, field\link{*} \cr - retry \tab /{apiVersion}/jobs/retry \tab jobId, jobDescription, jobDependsOn, jobTags, study, body\link{*} \cr + retry \tab /{apiVersion}/jobs/retry \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, study, body\link{*} \cr search \tab /{apiVersion}/jobs/search \tab include, exclude, limit, skip, count, study, otherStudies, id, uuid, toolId, toolType, userId, priority, status, internalStatus, creationDate, modificationDate, visited, tags, input, output, acl, release, deleted \cr top \tab /{apiVersion}/jobs/top \tab limit, study, internalStatus, priority, userId, toolId \cr acl \tab /{apiVersion}/jobs/{jobs}/acl \tab jobs\link{*}, member, silent \cr delete \tab /{apiVersion}/jobs/{jobs}/delete \tab study, jobs\link{*} \cr info \tab /{apiVersion}/jobs/{jobs}/info \tab include, exclude, jobs\link{*}, study, deleted \cr update \tab /{apiVersion}/jobs/{jobs}/update \tab include, exclude, jobs\link{*}, study, includeResult, body \cr + kill \tab /{apiVersion}/jobs/{job}/kill \tab job\link{*}, study \cr headLog \tab /{apiVersion}/jobs/{job}/log/head \tab job\link{*}, study, offset, lines, type \cr tailLog \tab /{apiVersion}/jobs/{job}/log/tail \tab job\link{*}, study, lines, type \cr } @@ -129,11 +113,6 @@ The following table summarises the available \emph{actions} for this client:\tab Update the set of permissions granted for the member. } -\section{Endpoint /{apiVersion}/jobs/aggregationStats}{ - -Fetch catalog job stats. -} - \section{Endpoint /{apiVersion}/jobs/create}{ Register an executed job with POST method. @@ -179,6 +158,11 @@ Get job information. Update some job attributes. } +\section{Endpoint /{apiVersion}/jobs/{job}/kill}{ + +Send a signal to kill a pending or running job. +} + \section{Endpoint /{apiVersion}/jobs/{job}/log/head}{ Show the first lines of a log file (up to a limit). diff --git a/opencga-client/src/main/R/man/metaClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/metaClient-OpencgaR-method.Rd index 459b37a8fd0..7ff0b3f297a 100644 --- a/opencga-client/src/main/R/man/metaClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/metaClient-OpencgaR-method.Rd @@ -8,6 +8,8 @@ } \arguments{ \item{category}{List of categories to get API from.} + +\item{model}{Model description.} } \description{ This function implements the OpenCGA calls for managing Meta. @@ -16,6 +18,7 @@ The following table summarises the available \emph{actions} for this client:\tab about \tab /{apiVersion}/meta/about \tab \cr api \tab /{apiVersion}/meta/api \tab category \cr fail \tab /{apiVersion}/meta/fail \tab \cr + model \tab /{apiVersion}/meta/model \tab model \cr ping \tab /{apiVersion}/meta/ping \tab \cr status \tab /{apiVersion}/meta/status \tab \cr } @@ -35,6 +38,11 @@ API. Ping Opencga webservices. } +\section{Endpoint /{apiVersion}/meta/model}{ + +Opencga model webservices. +} + \section{Endpoint /{apiVersion}/meta/ping}{ Ping Opencga webservices. diff --git a/opencga-client/src/main/R/man/opencgaLogin.Rd b/opencga-client/src/main/R/man/opencgaLogin.Rd index 3d45560964b..bf53a8152f1 100644 --- a/opencga-client/src/main/R/man/opencgaLogin.Rd +++ b/opencga-client/src/main/R/man/opencgaLogin.Rd @@ -12,7 +12,8 @@ opencgaLogin( interactive = FALSE, autoRenew = FALSE, verbose = FALSE, - showToken = FALSE + showToken = FALSE, + organization = NULL ) } \arguments{ @@ -31,17 +32,17 @@ an Opencga class object \dontrun{ con <- initOpencgaR(host = "http://bioinfo.hpc.cam.ac.uk/opencga-prod/", version = "v2") -con <- opencgaLogin(opencga = con, userid = "demouser", passwd = "demouser", showToken = TRUE) +con <- opencgaLogin(opencga = con, userid = "xxx", passwd = "xxx", showToken = TRUE) # Configuration in list format conf <- list(version="v2", rest=list(host="http://bioinfo.hpc.cam.ac.uk/opencga-prod/")) con <- initOpencgaR(opencgaConfig=conf) -con <- opencgaLogin(opencga = con, userid = "demouser", passwd = demouser") +con <- opencgaLogin(opencga = con, userid = "xxx", passwd = xxx") # Configuration in file format ("YAML" or "JSON") conf <- "/path/to/conf/client-configuration.yml" con <- initOpencgaR(opencgaConfig=conf) -con <- opencgaLogin(opencga = con, userid = "demouser", passwd = "demouser") +con <- opencgaLogin(opencga = con, userid = "xxx", passwd = "xxx") } } \description{ diff --git a/opencga-client/src/main/R/man/operationClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/operationClient-OpencgaR-method.Rd index e088d95ff82..5a87c79576c 100644 --- a/opencga-client/src/main/R/man/operationClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/operationClient-OpencgaR-method.Rd @@ -13,15 +13,15 @@ \item{annotationId}{Annotation identifier.} -\item{skipRebuild}{Skip sample index re-build.} - \item{name}{Unique name of the score within the study.} \item{resume}{Resume a previously failed remove.} \item{force}{Force remove of partially indexed scores.} -\item{project}{Project \link{user@}project where project can be either the ID or the alias.} +\item{skipRebuild}{Skip sample index re-build.} + +\item{project}{Project \link{organization@}project where project can be either the ID or the alias.} \item{samples}{Samples to remove. Needs to provide all the samples in the secondary index.} @@ -33,7 +33,13 @@ \item{jobTags}{Job tags.} -\item{study}{Study [\link{user@}project:]study where study and project can be either the ID or UUID.} +\item{jobScheduledStartTime}{Time when the job is scheduled to start.} + +\item{jobPriority}{Priority of the job.} + +\item{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.} + +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} \item{data}{Variant delete study params.} } @@ -42,29 +48,34 @@ This function implements the OpenCGA calls for managing Operations - Variant Sto The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr configureCellbase \tab /{apiVersion}/operation/cellbase/configure \tab project, annotationUpdate, annotationSaveId, body \cr - aggregateVariant \tab /{apiVersion}/operation/variant/aggregate \tab jobId, jobDescription, jobDependsOn, jobTags, study, body \cr - deleteVariantAnnotation \tab /{apiVersion}/operation/variant/annotation/delete \tab jobId, jobDescription, jobDependsOn, jobTags, project, annotationId \cr - indexVariantAnnotation \tab /{apiVersion}/operation/variant/annotation/index \tab jobId, jobDescription, jobDependsOn, jobTags, project, study, body \cr - saveVariantAnnotation \tab /{apiVersion}/operation/variant/annotation/save \tab jobId, jobDescription, jobDependsOn, jobTags, project, body \cr + aggregateVariant \tab /{apiVersion}/operation/variant/aggregate \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr + deleteVariantAnnotation \tab /{apiVersion}/operation/variant/annotation/delete \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, project, annotationId \cr + indexVariantAnnotation \tab /{apiVersion}/operation/variant/annotation/index \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, project, study, body \cr + saveVariantAnnotation \tab /{apiVersion}/operation/variant/annotation/save \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, project, body \cr configureVariant \tab /{apiVersion}/operation/variant/configure \tab project, study, body \cr - deleteVariant \tab /{apiVersion}/operation/variant/delete \tab jobId, jobDescription, jobDependsOn, jobTags, study, body \cr - aggregateVariantFamily \tab /{apiVersion}/operation/variant/family/aggregate \tab jobId, jobDescription, jobDependsOn, jobTags, study, body \cr - indexVariantFamily \tab /{apiVersion}/operation/variant/family/index \tab jobId, jobDescription, jobDependsOn, jobTags, study, body \cr - indexVariant \tab /{apiVersion}/operation/variant/index \tab jobId, jobDescription, jobDependsOn, jobTags, study, body \cr - launcherVariantIndex \tab /{apiVersion}/operation/variant/index/launcher \tab jobId, jobDescription, jobDependsOn, jobTags, study, body \cr - runVariantJulie \tab /{apiVersion}/operation/variant/julie/run \tab jobId, jobDescription, jobDependsOn, jobTags, project, body\link{*} \cr - repairVariantMetadata \tab /{apiVersion}/operation/variant/metadata/repair \tab jobId, jobDescription, jobDependsOn, jobTags, body \cr - synchronizeVariantMetadata \tab /{apiVersion}/operation/variant/metadata/synchronize \tab jobId, jobDescription, jobDependsOn, jobTags, study, body \cr - deleteVariantSample \tab /{apiVersion}/operation/variant/sample/delete \tab jobId, jobDescription, jobDependsOn, jobTags, study, body \cr - indexVariantSample \tab /{apiVersion}/operation/variant/sample/index \tab jobId, jobDescription, jobDependsOn, jobTags, study, body \cr + deleteVariant \tab /{apiVersion}/operation/variant/delete \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr + aggregateVariantFamily \tab /{apiVersion}/operation/variant/family/aggregate \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr + indexVariantFamily \tab /{apiVersion}/operation/variant/family/index \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr + indexVariant \tab /{apiVersion}/operation/variant/index \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr + launcherVariantIndex \tab /{apiVersion}/operation/variant/index/launcher \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr + runVariantJulie \tab /{apiVersion}/operation/variant/julie/run \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, project, body\link{*} \cr + repairVariantMetadata \tab /{apiVersion}/operation/variant/metadata/repair \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body \cr + synchronizeVariantMetadata \tab /{apiVersion}/operation/variant/metadata/synchronize \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr + pruneVariant \tab /{apiVersion}/operation/variant/prune \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body \cr + deleteVariantSample \tab /{apiVersion}/operation/variant/sample/delete \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr + indexVariantSample \tab /{apiVersion}/operation/variant/sample/index \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr variantSampleIndexConfigure \tab /{apiVersion}/operation/variant/sample/index/configure \tab study, skipRebuild, body \cr - deleteVariantScore \tab /{apiVersion}/operation/variant/score/delete \tab jobId, jobDescription, jobDependsOn, jobTags, study, name, resume, force \cr - indexVariantScore \tab /{apiVersion}/operation/variant/score/index \tab jobId, jobDescription, jobDependsOn, jobTags, study, body \cr - secondaryIndexVariant \tab /{apiVersion}/operation/variant/secondaryIndex \tab jobId, jobDescription, jobDependsOn, jobTags, project, study, body \cr - deleteVariantSecondaryIndex \tab /{apiVersion}/operation/variant/secondaryIndex/delete \tab jobId, jobDescription, jobDependsOn, jobTags, study, samples \cr - deleteVariantStats \tab /{apiVersion}/operation/variant/stats/delete \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - indexVariantStats \tab /{apiVersion}/operation/variant/stats/index \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - deleteVariantStudy \tab /{apiVersion}/operation/variant/study/delete \tab jobId, jobDescription, jobDependsOn, jobTags, study, body \cr + deleteVariantScore \tab /{apiVersion}/operation/variant/score/delete \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, name, resume, force \cr + indexVariantScore \tab /{apiVersion}/operation/variant/score/index \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr + variantSecondaryAnnotationIndex \tab /{apiVersion}/operation/variant/secondary/annotation/index \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, project, study, body \cr + variantSecondarySampleIndex \tab /{apiVersion}/operation/variant/secondary/sample/index \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr + configureVariantSecondarySampleIndex \tab /{apiVersion}/operation/variant/secondary/sample/index/configure \tab study, skipRebuild, body \cr + secondaryIndexVariant \tab /{apiVersion}/operation/variant/secondaryIndex \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, project, study, body \cr + deleteVariantSecondaryIndex \tab /{apiVersion}/operation/variant/secondaryIndex/delete \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, samples \cr + setupVariant \tab /{apiVersion}/operation/variant/setup \tab study, body \cr + deleteVariantStats \tab /{apiVersion}/operation/variant/stats/delete \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + indexVariantStats \tab /{apiVersion}/operation/variant/stats/index \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + deleteVariantStudy \tab /{apiVersion}/operation/variant/study/delete \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, body \cr } } \section{Endpoint /{apiVersion}/operation/cellbase/configure}{ @@ -109,7 +120,7 @@ Find variants where not all the samples are present, and fill the empty values. \section{Endpoint /{apiVersion}/operation/variant/family/index}{ -Build the family index. +DEPRECATED: integrated in index (DEPRECATED Build the family index). } \section{Endpoint /{apiVersion}/operation/variant/index}{ @@ -137,6 +148,11 @@ Execute some repairs on Variant Storage Metadata. Advanced users only. Synchronize catalog with variant storage metadata. } +\section{Endpoint /{apiVersion}/operation/variant/prune}{ + +Prune orphan variants from studies in a project. +} + \section{Endpoint /{apiVersion}/operation/variant/sample/delete}{ Remove variant samples from the variant storage. @@ -144,12 +160,12 @@ Remove variant samples from the variant storage. \section{Endpoint /{apiVersion}/operation/variant/sample/index}{ -Build and annotate the sample index. +DEPRECATED You should use the new sample index method instead. } \section{Endpoint /{apiVersion}/operation/variant/sample/index/configure}{ -Update SampleIndex configuration. +DEPRECATED You should use the new sample index configure method. } \section{Endpoint /{apiVersion}/operation/variant/score/delete}{ @@ -162,9 +178,24 @@ Remove a variant score in the database. Index a variant score in the database. } +\section{Endpoint /{apiVersion}/operation/variant/secondary/annotation/index}{ + +Creates a secondary index using a search engine. If samples are provided, sample data will be added to the secondary index. (New!). +} + +\section{Endpoint /{apiVersion}/operation/variant/secondary/sample/index}{ + +Build and annotate the sample index. (New!) . +} + +\section{Endpoint /{apiVersion}/operation/variant/secondary/sample/index/configure}{ + +Update SampleIndex configuration (New!). +} + \section{Endpoint /{apiVersion}/operation/variant/secondaryIndex}{ -Creates a secondary index using a search engine. If samples are provided, sample data will be added to the secondary index. +DEPRECATED you should use the new annotation index method instead. } \section{Endpoint /{apiVersion}/operation/variant/secondaryIndex/delete}{ @@ -172,6 +203,11 @@ Creates a secondary index using a search engine. If samples are provided, sample Remove a secondary index from the search engine for a specific set of samples. } +\section{Endpoint /{apiVersion}/operation/variant/setup}{ + +Execute Variant Setup to allow using the variant engine. This setup is necessary before starting any variant operation. +} + \section{Endpoint /{apiVersion}/operation/variant/stats/delete}{ Deletes the VariantStats of a cohort/s from the database. diff --git a/opencga-client/src/main/R/man/organizationClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/organizationClient-OpencgaR-method.Rd new file mode 100644 index 00000000000..955a65d24eb --- /dev/null +++ b/opencga-client/src/main/R/man/organizationClient-OpencgaR-method.Rd @@ -0,0 +1,124 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/Organization-methods.R +\name{organizationClient,OpencgaR-method} +\alias{organizationClient,OpencgaR-method} +\title{OrganizationClient methods} +\usage{ +\S4method{organizationClient}{OpencgaR}( + OpencgaR, + id, + organization, + user, + endpointName, + params = NULL, + ... +) +} +\arguments{ +\item{id}{Note unique identifier.} + +\item{organization}{Organization id.} + +\item{user}{User ID.} + +\item{creationDate}{Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.} + +\item{modificationDate}{Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.} + +\item{scope}{Scope of the Note.} + +\item{visibility}{Visibility of the Note.} + +\item{uuid}{Unique 32-character identifier assigned automatically by OpenCGA.} + +\item{userId}{User that wrote that Note.} + +\item{tags}{Note tags.} + +\item{version}{Autoincremental version assigned to the registered entry. By default, updates does not create new versions. To enable versioning, users must set the \code{incVersion} flag from the /update web service when updating the document.} + +\item{tagsAction}{Action to be performed if the array of tags is being updated. Allowed values: \link{'ADD SET REMOVE'}} + +\item{authenticationOriginsAction}{Action to be performed if the array of authenticationOrigins is being updated. Allowed values: \link{'ADD SET REMOVE REPLACE'}} + +\item{include}{Fields included in the response, whole JSON path must be provided.} + +\item{exclude}{Fields excluded in the response, whole JSON path must be provided.} + +\item{includeResult}{Flag indicating to include the created or updated document result in the response.} + +\item{adminsAction}{Action to be performed if the array of admins is being updated. Allowed values: \link{'ADD REMOVE'}} + +\item{data}{JSON containing the params to be updated.} +} +\description{ +This function implements the OpenCGA calls for managing Organizations. +The following table summarises the available \emph{actions} for this client:\tabular{llr}{ + endpointName \tab Endpoint WS \tab parameters accepted \cr + create \tab /{apiVersion}/organizations/create \tab include, exclude, includeResult, body\link{*} \cr + createNotes \tab /{apiVersion}/organizations/notes/create \tab include, exclude, includeResult, body\link{*} \cr + searchNotes \tab /{apiVersion}/organizations/notes/search \tab include, exclude, creationDate, modificationDate, id, scope, visibility, uuid, userId, tags, version \cr + deleteNotes \tab /{apiVersion}/organizations/notes/{id}/delete \tab id\link{*}, includeResult \cr + updateNotes \tab /{apiVersion}/organizations/notes/{id}/update \tab include, exclude, id\link{*}, tagsAction, includeResult, body\link{*} \cr + userUpdateStatus \tab /{apiVersion}/organizations/user/{user}/status/update \tab include, exclude, user\link{*}, organization, includeResult, body\link{*} \cr + updateUser \tab /{apiVersion}/organizations/user/{user}/update \tab include, exclude, user\link{*}, organization, includeResult, body\link{*} \cr + updateConfiguration \tab /{apiVersion}/organizations/{organization}/configuration/update \tab include, exclude, organization\link{*}, includeResult, authenticationOriginsAction, body\link{*} \cr + info \tab /{apiVersion}/organizations/{organization}/info \tab include, exclude, organization\link{*} \cr + update \tab /{apiVersion}/organizations/{organization}/update \tab include, exclude, organization\link{*}, includeResult, adminsAction, body\link{*} \cr +} +} +\section{Endpoint /{apiVersion}/organizations/create}{ + +Create a new organization. +} + +\section{Endpoint /{apiVersion}/organizations/notes/create}{ + +Create a new note. +} + +\section{Endpoint /{apiVersion}/organizations/notes/search}{ + +Search for notes of scope ORGANIZATION. +} + +\section{Endpoint /{apiVersion}/organizations/notes/{id}/delete}{ + +Delete note. +} + +\section{Endpoint /{apiVersion}/organizations/notes/{id}/update}{ + +Update a note. +} + +\section{Endpoint /{apiVersion}/organizations/user/{user}/status/update}{ + +Update the user status. +} + +\section{Endpoint /{apiVersion}/organizations/user/{user}/update}{ + +Update the user information. +} + +\section{Endpoint /{apiVersion}/organizations/{organization}/configuration/update}{ + +Update the Organization configuration attributes. +} + +\section{Endpoint /{apiVersion}/organizations/{organization}/info}{ + +Return the organization information. +} + +\section{Endpoint /{apiVersion}/organizations/{organization}/update}{ + +Update some organization attributes. +} + +\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/} +\link{*}: Required parameter +} diff --git a/opencga-client/src/main/R/man/panelClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/panelClient-OpencgaR-method.Rd index 29c09434e15..250423df123 100644 --- a/opencga-client/src/main/R/man/panelClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/panelClient-OpencgaR-method.Rd @@ -11,11 +11,23 @@ \item{panels}{Comma separated list of panel ids.} -\item{action}{Action to be performed \link{ADD, SET, REMOVE or RESET}.} +\item{action}{Action to be performed \link{ADD, SET, REMOVE or RESET}. Allowed values: \link{'SET ADD REMOVE RESET'}} -\item{source}{Comma separated list of sources to import panels from. Current supported sources are 'panelapp' and 'cancer-gene-census'.} +\item{field}{Comma separated list of fields for which to obtain the distinct values.} -\item{field}{Field for which to obtain the distinct values.} +\item{jobId}{Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not provided.} + +\item{jobDependsOn}{Comma separated list of existing job IDs the job will depend on.} + +\item{jobDescription}{Job description.} + +\item{jobTags}{Job tags.} + +\item{jobScheduledStartTime}{Time when the job is scheduled to start.} + +\item{jobPriority}{Priority of the job.} + +\item{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.} \item{limit}{Number of results to be returned.} @@ -23,23 +35,27 @@ \item{count}{Get the total number of results matching the query. Deactivated by default.} -\item{id}{Comma separated list of panel IDs up to a maximum of 100.} +\item{id}{Comma separated list of panel 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.} \item{uuid}{Comma separated list of panel UUIDs up to a maximum of 100.} -\item{name}{Comma separated list of panel names up to a maximum of 100.} +\item{name}{Comma separated list of panel names 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.} -\item{disorders}{Comma separated list of disorder ids or names.} +\item{internalStatus}{Filter by internal status.} -\item{variants}{Comma separated list of variant ids.} +\item{disorders}{Comma separated list of disorder ids or 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.. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.} -\item{genes}{Comma separated list of gene ids.} +\item{variants}{Comma separated list of variant ids. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.} -\item{regions}{Comma separated list of regions.} +\item{genes}{Comma separated list of gene ids. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.} -\item{categories}{Comma separated list of category names.} +\item{source}{Comma separated list of source ids or names.} -\item{tags}{Panel tags.} +\item{regions}{Comma separated list of regions. Also admits basic regular expressions using the operator '~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.} + +\item{categories}{Comma separated list of category 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.} + +\item{tags}{Panel 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.} \item{status}{Filter by status.} @@ -65,9 +81,7 @@ \item{exclude}{Fields excluded in the response, whole JSON path must be provided.} -\item{study}{Study [\link{user@}project:]study where study and project can be either the ID or UUID.} - -\item{incVersion}{Create a new version of panel.} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} \item{includeResult}{Flag indicating to include the created or updated document result in the response.} @@ -78,13 +92,14 @@ This function implements the OpenCGA calls for managing Disease Panels. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr updateAcl \tab /{apiVersion}/panels/acl/{members}/update \tab study, members\link{*}, action\link{*}, body\link{*} \cr - create \tab /{apiVersion}/panels/create \tab include, exclude, study, source, id, includeResult, body \cr - distinct \tab /{apiVersion}/panels/distinct \tab study, id, uuid, name, disorders, variants, genes, regions, categories, tags, deleted, status, creationDate, modificationDate, acl, release, snapshot, field\link{*} \cr - search \tab /{apiVersion}/panels/search \tab include, exclude, limit, skip, count, study, id, uuid, name, disorders, variants, genes, regions, categories, tags, deleted, status, creationDate, modificationDate, acl, release, snapshot \cr + create \tab /{apiVersion}/panels/create \tab include, exclude, study, includeResult, body \cr + distinct \tab /{apiVersion}/panels/distinct \tab study, id, uuid, name, internalStatus, disorders, variants, genes, source, regions, categories, tags, deleted, status, creationDate, modificationDate, acl, release, snapshot, field\link{*} \cr + importPanels \tab /{apiVersion}/panels/import \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body \cr + search \tab /{apiVersion}/panels/search \tab include, exclude, limit, skip, count, study, id, uuid, name, internalStatus, disorders, variants, genes, source, regions, categories, tags, deleted, status, creationDate, modificationDate, acl, release, snapshot \cr acl \tab /{apiVersion}/panels/{panels}/acl \tab panels\link{*}, study, member, silent \cr delete \tab /{apiVersion}/panels/{panels}/delete \tab study, panels\link{*} \cr info \tab /{apiVersion}/panels/{panels}/info \tab include, exclude, panels\link{*}, study, version, deleted \cr - update \tab /{apiVersion}/panels/{panels}/update \tab include, exclude, study, panels\link{*}, incVersion, includeResult, body \cr + update \tab /{apiVersion}/panels/{panels}/update \tab include, exclude, study, panels\link{*}, includeResult, body \cr } } \section{Endpoint /{apiVersion}/panels/acl/{members}/update}{ @@ -102,6 +117,11 @@ Create a panel. Panel distinct method. } +\section{Endpoint /{apiVersion}/panels/import}{ + +Import panels. +} + \section{Endpoint /{apiVersion}/panels/search}{ Panel search. diff --git a/opencga-client/src/main/R/man/projectClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/projectClient-OpencgaR-method.Rd index 430336cf008..217ad69a751 100644 --- a/opencga-client/src/main/R/man/projectClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/projectClient-OpencgaR-method.Rd @@ -4,23 +4,21 @@ \alias{projectClient,OpencgaR-method} \title{ProjectClient methods} \usage{ -\S4method{projectClient}{OpencgaR}(OpencgaR, projects, project, endpointName, params = NULL, ...) +\S4method{projectClient}{OpencgaR}(OpencgaR, project, projects, endpointName, params = NULL, ...) } \arguments{ -\item{projects}{Comma separated list of projects \link{user@}project up to a maximum of 100.} +\item{project}{Project \link{organization@}project where project can be either the ID or the alias.} -\item{project}{Project \link{user@}project where project can be either the ID or the alias.} +\item{projects}{Comma separated list of projects \link{organization@}project up to a maximum of 100.} -\item{owner}{Owner of the project.} +\item{organization}{Project organization.} -\item{id}{Project \link{user@}project where project can be either the ID or the alias.} +\item{id}{Project \link{organization@}project where project can be either the ID or the alias.} \item{name}{Project name.} \item{fqn}{Project fqn.} -\item{organization}{Project organization.} - \item{description}{Project description.} \item{study}{Study id.} @@ -33,20 +31,6 @@ \item{attributes}{Attributes.} -\item{default}{Calculate default stats.} - -\item{fileFields}{List of file fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - -\item{individualFields}{List of individual fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - -\item{familyFields}{List of family fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - -\item{sampleFields}{List of sample fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - -\item{cohortFields}{List of cohort fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - -\item{jobFields}{List of job fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - \item{limit}{Number of results to be returned.} \item{skip}{Number of results to skip.} @@ -64,8 +48,7 @@ This function implements the OpenCGA calls for managing Projects. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr create \tab /{apiVersion}/projects/create \tab include, exclude, includeResult, body\link{*} \cr - search \tab /{apiVersion}/projects/search \tab include, exclude, limit, skip, owner, id, name, fqn, organization, description, study, creationDate, modificationDate, internalStatus, attributes \cr - aggregationStats \tab /{apiVersion}/projects/{projects}/aggregationStats \tab projects\link{*}, default, fileFields, individualFields, familyFields, sampleFields, cohortFields, jobFields \cr + search \tab /{apiVersion}/projects/search \tab include, exclude, limit, skip, organization, id, name, fqn, organization, description, study, creationDate, modificationDate, internalStatus, attributes \cr info \tab /{apiVersion}/projects/{projects}/info \tab include, exclude, projects\link{*} \cr incRelease \tab /{apiVersion}/projects/{project}/incRelease \tab project\link{*} \cr studies \tab /{apiVersion}/projects/{project}/studies \tab include, exclude, limit, skip, project\link{*} \cr @@ -82,11 +65,6 @@ Create a new project. Search projects. } -\section{Endpoint /{apiVersion}/projects/{projects}/aggregationStats}{ - -Fetch catalog project stats. -} - \section{Endpoint /{apiVersion}/projects/{projects}/info}{ Fetch project information. diff --git a/opencga-client/src/main/R/man/sampleClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/sampleClient-OpencgaR-method.Rd index 8c8302651a7..5c4f8b5ead4 100644 --- a/opencga-client/src/main/R/man/sampleClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/sampleClient-OpencgaR-method.Rd @@ -6,37 +6,23 @@ \usage{ \S4method{sampleClient}{OpencgaR}( OpencgaR, - samples, - members, annotationSet, + members, sample, + samples, endpointName, params = NULL, ... ) } \arguments{ -\item{samples}{Comma separated list sample IDs or UUIDs up to a maximum of 100.} +\item{annotationSet}{AnnotationSet ID to be updated.} \item{members}{Comma separated list of user or group ids.} -\item{annotationSet}{AnnotationSet ID to be updated.} - \item{sample}{Sample ID.} -\item{source}{Source.} - -\item{creationYear}{Creation year.} - -\item{creationMonth}{Creation month (JANUARY, FEBRUARY...).} - -\item{creationDay}{Creation day.} - -\item{creationDayOfWeek}{Creation day of week (MONDAY, TUESDAY...).} - -\item{type}{Type.} - -\item{default}{Calculate default stats.} +\item{samples}{Comma separated list sample IDs or UUIDs up to a maximum of 100.} \item{variableSetId}{Variable set ID or name.} @@ -46,7 +32,7 @@ \item{annotationSetId}{Annotation set id. If not provided, variableSetId will be used.} -\item{field}{Field for which to obtain the distinct values.} +\item{field}{Comma separated list of fields for which to obtain the distinct values.} \item{file}{file.} @@ -58,7 +44,7 @@ \item{count}{Get the total number of results matching the query. Deactivated by default.} -\item{id}{Comma separated list sample IDs up to a maximum of 100.} +\item{id}{Comma separated list sample 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.} \item{uuid}{Comma separated list sample UUIDs up to a maximum of 100.} @@ -92,13 +78,13 @@ \item{collectionMethod}{Collection method.} -\item{phenotypes}{Comma separated list of phenotype ids or names.} +\item{phenotypes}{Comma separated list of phenotype ids or 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.} \item{annotation}{Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.} \item{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. .} -\item{internalRgaStatus}{Index status of the sample for the Recessive Gene Analysis.} +\item{internalRgaStatus}{Index status of the sample for the Recessive Gene Analysis. Allowed values: \link{'NOT_INDEXED INDEXED INVALID_PERMISSIONS INVALID_METADATA INVALID'}} \item{release}{Release when it was created.} @@ -152,17 +138,15 @@ \item{exclude}{Fields excluded in the response, whole JSON path must be provided.} -\item{annotationSetsAction}{Action to be performed if the array of annotationSets is being updated. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{annotationSetsAction}{Action to be performed if the array of annotationSets is being updated. Allowed values: \link{'ADD SET REMOVE'}} -\item{phenotypesAction}{Action to be performed if the array of phenotypes is being updated \link{SET, ADD, REMOVE}. Allowed values: \link{'ADD', 'SET', 'REMOVE'}} +\item{phenotypesAction}{Action to be performed if the array of phenotypes is being updated \link{SET, ADD, REMOVE}. Allowed values: \link{'ADD SET REMOVE'}} \item{includeResult}{Flag indicating to include the created or updated document result in the response.} -\item{study}{Study [\link{user@}project:]study where study and project can be either the ID or UUID.} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} -\item{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: \link{'ADD', 'SET', 'REMOVE', 'RESET', 'REPLACE'}} - -\item{incVersion}{Create a new version of sample.} +\item{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: \link{'ADD SET REMOVE RESET REPLACE'}} \item{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.} } @@ -171,7 +155,6 @@ This function implements the OpenCGA calls for managing Samples. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr updateAcl \tab /{apiVersion}/samples/acl/{members}/update \tab study, members\link{*}, action\link{*}, body\link{*} \cr - aggregationStats \tab /{apiVersion}/samples/aggregationStats \tab study, source, creationYear, creationMonth, creationDay, creationDayOfWeek, status, type, phenotypes, release, version, somatic, annotation, default, field \cr loadAnnotationSets \tab /{apiVersion}/samples/annotationSets/load \tab study, variableSetId\link{*}, path\link{*}, parents, annotationSetId, body \cr create \tab /{apiVersion}/samples/create \tab include, exclude, study, includeResult, body\link{*} \cr distinct \tab /{apiVersion}/samples/distinct \tab study, id, uuid, somatic, individualId, fileIds, cohortIds, creationDate, modificationDate, internalStatus, status, processingProduct, processingPreparationMethod, processingExtractionMethod, processingLabSampleId, collectionFrom, collectionType, collectionMethod, phenotypes, annotation, acl, internalRgaStatus, release, snapshot, deleted, statsId, statsVariantCount, statsChromosomeCount, statsTypeCount, statsGenotypeCount, statsTiTvRatio, statsQualityAvg, statsQualityStdDev, statsHeterozygosityRate, statsDepthCount, statsBiotypeCount, statsClinicalSignificanceCount, statsConsequenceTypeCount, field\link{*} \cr @@ -180,8 +163,8 @@ The following table summarises the available \emph{actions} for this client:\tab acl \tab /{apiVersion}/samples/{samples}/acl \tab samples\link{*}, study, member, silent \cr delete \tab /{apiVersion}/samples/{samples}/delete \tab force, emptyFilesAction, deleteEmptyCohorts, study, samples\link{*} \cr info \tab /{apiVersion}/samples/{samples}/info \tab include, exclude, includeIndividual, flattenAnnotations, samples\link{*}, study, version, deleted \cr - update \tab /{apiVersion}/samples/{samples}/update \tab include, exclude, samples\link{*}, study, incVersion, annotationSetsAction, phenotypesAction, includeResult, body \cr - updateAnnotationSetsAnnotations \tab /{apiVersion}/samples/{sample}/annotationSets/{annotationSet}/annotations/update \tab sample\link{*}, study, annotationSet\link{*}, action, incVersion, body \cr + update \tab /{apiVersion}/samples/{samples}/update \tab include, exclude, samples\link{*}, study, annotationSetsAction, phenotypesAction, includeResult, body \cr + updateAnnotationSetsAnnotations \tab /{apiVersion}/samples/{sample}/annotationSets/{annotationSet}/annotations/update \tab sample\link{*}, study, annotationSet\link{*}, action, body \cr } } \section{Endpoint /{apiVersion}/samples/acl/{members}/update}{ @@ -189,11 +172,6 @@ The following table summarises the available \emph{actions} for this client:\tab Update the set of permissions granted for the member. } -\section{Endpoint /{apiVersion}/samples/aggregationStats}{ - -Fetch catalog sample stats. -} - \section{Endpoint /{apiVersion}/samples/annotationSets/load}{ Load annotation sets from a TSV file. diff --git a/opencga-client/src/main/R/man/studyClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/studyClient-OpencgaR-method.Rd index ff2a3334459..e64e72ed5a2 100644 --- a/opencga-client/src/main/R/man/studyClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/studyClient-OpencgaR-method.Rd @@ -6,31 +6,34 @@ \usage{ \S4method{studyClient}{OpencgaR}( OpencgaR, - members, - study, - variableSet, group, + id, + members, studies, + study, templateId, + variableSet, endpointName, params = NULL, ... ) } \arguments{ -\item{members}{Comma separated list of user or group ids.} +\item{group}{Group name.} -\item{study}{Study [\link{user@}project:]study where study and project can be either the ID or UUID.} +\item{id}{Id of the variableSet to be retrieved. If no id is passed, it will show all the variableSets of the study.} -\item{variableSet}{VariableSet id of the VariableSet to be updated.} +\item{members}{Comma separated list of user or group ids.} -\item{group}{Group name.} +\item{studies}{Comma separated list of Studies [\link{organization@}project:]study where study and project can be either the ID or UUID up to a maximum of 100.} -\item{studies}{Comma separated list of Studies [\link{user@}project:]study where study and project can be either the ID or UUID up to a maximum of 100.} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} \item{templateId}{Template id.} -\item{project}{Project \link{user@}project where project can be either the ID or the alias.} +\item{variableSet}{VariableSet id of the VariableSet to be updated.} + +\item{project}{Project \link{organization@}project where project can be either the ID or the alias.} \item{name}{Study name.} @@ -38,10 +41,6 @@ \item{fqn}{Study full qualified name.} -\item{creationDate}{Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.} - -\item{modificationDate}{Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.} - \item{internalStatus}{Filter by internal status.} \item{attributes}{Attributes.} @@ -50,20 +49,6 @@ \item{member}{User or group id.} -\item{default}{Calculate default stats.} - -\item{fileFields}{List of file fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - -\item{individualFields}{List of individual fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - -\item{familyFields}{List of family fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - -\item{sampleFields}{List of sample fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - -\item{cohortFields}{List of cohort fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - -\item{jobFields}{List of job fields separated by semicolons, e.g.: studies;type. For nested fields use >>, e.g.: studies>>biotype;type.} - \item{limit}{Number of results to be returned.} \item{skip}{Number of results to skip.} @@ -72,21 +57,35 @@ \item{operationId}{Audit operation UUID.} -\item{userId}{User ID.} - -\item{resource}{Resource involved.} +\item{resource}{Resource involved. Allowed values: \link{'AUDIT NOTE ORGANIZATION USER PROJECT STUDY FILE SAMPLE JOB INDIVIDUAL COHORT DISEASE_PANEL FAMILY CLINICAL_ANALYSIS INTERPRETATION VARIANT ALIGNMENT CLINICAL EXPRESSION RGA FUNCTIONAL'}} \item{resourceId}{Resource ID.} \item{resourceUuid}{resource UUID.} -\item{status}{Filter by status.} +\item{status}{Filter by status. Allowed values: \link{'SUCCESS ERROR'}} \item{date}{Date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.} \item{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.} -\item{entity}{Entity where the permission rules should be applied to.} +\item{creationDate}{Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.} + +\item{modificationDate}{Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.} + +\item{uuid}{Unique 32-character identifier assigned automatically by OpenCGA.} + +\item{userId}{User that wrote that Note.} + +\item{tags}{Note tags.} + +\item{visibility}{Visibility of the Note.} + +\item{version}{Autoincremental version assigned to the registered entry. By default, updates does not create new versions. To enable versioning, users must set the \code{incVersion} flag from the /update web service when updating the document.} + +\item{tagsAction}{Action to be performed if the array of tags is being updated. Allowed values: \link{'ADD SET REMOVE'}} + +\item{entity}{Entity where the permission rules should be applied to. Allowed values: \link{'SAMPLES FILES COHORTS INDIVIDUALS FAMILIES JOBS CLINICAL_ANALYSES DISEASE_PANELS'}} \item{jobId}{Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not provided.} @@ -96,6 +95,12 @@ \item{jobTags}{Job tags.} +\item{jobScheduledStartTime}{Time when the job is scheduled to start.} + +\item{jobPriority}{Priority of the job.} + +\item{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.} + \item{file}{File to upload.} \item{include}{Fields included in the response, whole JSON path must be provided.} @@ -104,9 +109,7 @@ \item{includeResult}{Flag indicating to include the created or updated document result in the response.} -\item{id}{Id of the variableSet to be retrieved. If no id is passed, it will show all the variableSets of the study.} - -\item{action}{Action to be performed: ADD or REMOVE a variable. Allowed values: \link{'ADD', 'REMOVE'}} +\item{action}{Action to be performed: ADD or REMOVE a variable. Allowed values: \link{'ADD REMOVE'}} \item{data}{JSON containing the variable to be added or removed. For removing, only the variable id will be needed.} } @@ -118,17 +121,20 @@ The following table summarises the available \emph{actions} for this client:\tab create \tab /{apiVersion}/studies/create \tab include, exclude, project, includeResult, body\link{*} \cr search \tab /{apiVersion}/studies/search \tab include, exclude, limit, skip, count, project\link{*}, name, id, alias, fqn, creationDate, modificationDate, internalStatus, status, attributes, release \cr acl \tab /{apiVersion}/studies/{studies}/acl \tab studies\link{*}, member, silent \cr - aggregationStats \tab /{apiVersion}/studies/{studies}/aggregationStats \tab studies\link{*}, default, fileFields, individualFields, familyFields, sampleFields, cohortFields, jobFields \cr info \tab /{apiVersion}/studies/{studies}/info \tab include, exclude, studies\link{*} \cr searchAudit \tab /{apiVersion}/studies/{study}/audit/search \tab include, exclude, limit, skip, count, study\link{*}, operationId, userId, action, resource, resourceId, resourceUuid, status, date \cr groups \tab /{apiVersion}/studies/{study}/groups \tab study\link{*}, id, silent \cr updateGroups \tab /{apiVersion}/studies/{study}/groups/update \tab study\link{*}, action, body\link{*} \cr updateGroupsUsers \tab /{apiVersion}/studies/{study}/groups/{group}/users/update \tab study\link{*}, group\link{*}, action, body\link{*} \cr + createNotes \tab /{apiVersion}/studies/{study}/notes/create \tab include, exclude, study\link{*}, includeResult, body\link{*} \cr + searchNotes \tab /{apiVersion}/studies/{study}/notes/search \tab include, exclude, study\link{*}, creationDate, modificationDate, id, uuid, userId, tags, visibility, version \cr + deleteNotes \tab /{apiVersion}/studies/{study}/notes/{id}/delete \tab study\link{*}, id\link{*}, includeResult \cr + updateNotes \tab /{apiVersion}/studies/{study}/notes/{id}/update \tab include, exclude, study\link{*}, id\link{*}, tagsAction, includeResult, body\link{*} \cr permissionRules \tab /{apiVersion}/studies/{study}/permissionRules \tab study\link{*}, entity\link{*} \cr updatePermissionRules \tab /{apiVersion}/studies/{study}/permissionRules/update \tab study\link{*}, entity\link{*}, action, body\link{*} \cr - runTemplates \tab /{apiVersion}/studies/{study}/templates/run \tab study\link{*}, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr + runTemplates \tab /{apiVersion}/studies/{study}/templates/run \tab study\link{*}, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr uploadTemplates \tab /{apiVersion}/studies/{study}/templates/upload \tab file, study\link{*} \cr - deleteTemplates \tab /{apiVersion}/studies/{study}/templates/{templateId}/delete \tab study, templateId\link{*} \cr + deleteTemplates \tab /{apiVersion}/studies/{study}/templates/{templateId}/delete \tab study\link{*}, templateId\link{*} \cr update \tab /{apiVersion}/studies/{study}/update \tab include, exclude, study\link{*}, includeResult, body\link{*} \cr variableSets \tab /{apiVersion}/studies/{study}/variableSets \tab study\link{*}, id \cr updateVariableSets \tab /{apiVersion}/studies/{study}/variableSets/update \tab study\link{*}, action, body\link{*} \cr @@ -155,11 +161,6 @@ Search studies. Return the acl of the study. If member is provided, it will only return the acl for the member. } -\section{Endpoint /{apiVersion}/studies/{studies}/aggregationStats}{ - -Fetch catalog study stats. -} - \section{Endpoint /{apiVersion}/studies/{studies}/info}{ Fetch study information. @@ -185,6 +186,26 @@ Add or remove a group. Add, set or remove users from an existing group. } +\section{Endpoint /{apiVersion}/studies/{study}/notes/create}{ + +Create a new note. +} + +\section{Endpoint /{apiVersion}/studies/{study}/notes/search}{ + +Search for notes of scope STUDY. +} + +\section{Endpoint /{apiVersion}/studies/{study}/notes/{id}/delete}{ + +Delete note. +} + +\section{Endpoint /{apiVersion}/studies/{study}/notes/{id}/update}{ + +Update a note. +} + \section{Endpoint /{apiVersion}/studies/{study}/permissionRules}{ Fetch permission rules. diff --git a/opencga-client/src/main/R/man/userClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/userClient-OpencgaR-method.Rd index dc0af0ba76a..119962a14a9 100644 --- a/opencga-client/src/main/R/man/userClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/userClient-OpencgaR-method.Rd @@ -13,15 +13,21 @@ \item{users}{Comma separated list of user IDs.} -\item{name}{Unique name (typically the name of the application).} +\item{limit}{Number of results to be returned.} -\item{id}{Filter id. If provided, it will only fetch the specified filter.} +\item{skip}{Number of results to skip.} -\item{action}{Action to be performed: ADD or REMOVE a group. Allowed values: \link{'ADD', 'REMOVE'}} +\item{count}{Get the total number of results matching the query. Deactivated by default.} -\item{limit}{Number of results to be returned.} +\item{authenticationId}{Authentication origin ID.} -\item{skip}{Number of results to skip.} +\item{organization}{Organization id.} + +\item{name}{Unique name (typically the name of the application).} + +\item{id}{Filter id. If provided, it will only fetch the specified filter.} + +\item{action}{Action to be performed: ADD or REMOVE a group. Allowed values: \link{'ADD REMOVE'}} \item{include}{Fields included in the response, whole JSON path must be provided.} @@ -35,20 +41,26 @@ This function implements the OpenCGA calls for managing Users. The following table summarises the available \emph{actions} for this client:\tabular{llr}{ endpointName \tab Endpoint WS \tab parameters accepted \cr + anonymous \tab /{apiVersion}/users/anonymous \tab organization\link{*} \cr create \tab /{apiVersion}/users/create \tab body\link{*} \cr login \tab /{apiVersion}/users/login \tab body \cr password \tab /{apiVersion}/users/password \tab body\link{*} \cr - info \tab /{apiVersion}/users/{users}/info \tab include, exclude, users\link{*} \cr + search \tab /{apiVersion}/users/search \tab include, exclude, limit, skip, count, organization, id, authenticationId \cr + info \tab /{apiVersion}/users/{users}/info \tab include, exclude, organization, users\link{*} \cr configs \tab /{apiVersion}/users/{user}/configs \tab user\link{*}, name \cr updateConfigs \tab /{apiVersion}/users/{user}/configs/update \tab user\link{*}, action, body\link{*} \cr filters \tab /{apiVersion}/users/{user}/filters \tab user\link{*}, id \cr updateFilters \tab /{apiVersion}/users/{user}/filters/update \tab user\link{*}, action, body\link{*} \cr updateFilter \tab /{apiVersion}/users/{user}/filters/{filterId}/update \tab user\link{*}, filterId\link{*}, body\link{*} \cr resetPassword \tab /{apiVersion}/users/{user}/password/reset \tab user\link{*} \cr - projects \tab /{apiVersion}/users/{user}/projects \tab include, exclude, limit, skip, user\link{*} \cr update \tab /{apiVersion}/users/{user}/update \tab include, exclude, user\link{*}, includeResult, body\link{*} \cr } } +\section{Endpoint /{apiVersion}/users/anonymous}{ + +Get an anonymous token to gain access to the system. +} + \section{Endpoint /{apiVersion}/users/create}{ Create a new user. @@ -64,6 +76,11 @@ Get identified and gain access to the system. Change the password of a user. } +\section{Endpoint /{apiVersion}/users/search}{ + +User search method. +} + \section{Endpoint /{apiVersion}/users/{users}/info}{ Return the user information including its projects and studies. @@ -99,11 +116,6 @@ Update a custom filter. Reset password. } -\section{Endpoint /{apiVersion}/users/{user}/projects}{ - -Retrieve the projects of the user. -} - \section{Endpoint /{apiVersion}/users/{user}/update}{ Update some user attributes. diff --git a/opencga-client/src/main/R/man/variantClient-OpencgaR-method.Rd b/opencga-client/src/main/R/man/variantClient-OpencgaR-method.Rd index 2dbe583e738..d9eb7d4dfbd 100644 --- a/opencga-client/src/main/R/man/variantClient-OpencgaR-method.Rd +++ b/opencga-client/src/main/R/man/variantClient-OpencgaR-method.Rd @@ -11,9 +11,9 @@ \item{clinicalAnalysis}{Clinical analysis id.} -\item{modeOfInheritance}{Mode of inheritance.} +\item{modeOfInheritance}{Mode of inheritance. Allowed values: \link{'AUTOSOMAL_DOMINANT AUTOSOMAL_RECESSIVE X_LINKED_DOMINANT X_LINKED_RECESSIVE Y_LINKED MITOCHONDRIAL DE_NOVO MENDELIAN_ERROR COMPOUND_HETEROZYGOUS UNKNOWN'}} -\item{penetrance}{Penetrance.} +\item{penetrance}{Penetrance. Allowed values: \link{'COMPLETE INCOMPLETE UNKNOWN'}} \item{disorder}{Disorder id.} @@ -21,7 +21,9 @@ \item{job}{Job ID or UUID.} -\item{fitting}{Compute the relative proportions of the different mutational signatures demonstrated by the tumour.} +\item{msId}{Signature ID.} + +\item{msDescription}{Signature description.} \item{include}{Fields included in the response, whole JSON path must be provided.} @@ -37,7 +39,7 @@ \item{approximateCountSamplingSize}{Sampling size to get the approximate count. Larger values increase accuracy but also increase execution time.} -\item{id}{List of IDs, these can be rs IDs (dbSNP) or variants in the format chrom:start:ref:alt, e.g. rs116600158,19:7177679:C:T.} +\item{id}{List of variant IDs in the format chrom:start:ref:alt, e.g. 19:7177679:C:T.} \item{reference}{Reference allele.} @@ -89,15 +91,15 @@ \item{gene}{List of genes, most gene IDs are accepted (HGNC, Ensembl gene, ...). This is an alias to 'xref' parameter.} -\item{xref}{List of any external reference, these can be genes, proteins or variants. Accepted IDs include HGNC, Ensembl genes, dbSNP, ClinVar, HPO, Cosmic, ...} +\item{xref}{List of any external reference, these can be genes, proteins or variants. Accepted IDs include HGNC, Ensembl genes, dbSNP, ClinVar, HPO, Cosmic, HGVS ...} \item{proteinSubstitution}{Protein substitution scores include SIFT and PolyPhen. You can query using the score {protein_score}[<|>|<=|>=]{number} or the description {protein_score}[~=|=]{description} e.g. polyphen>0.1,sift=tolerant.} \item{conservation}{Filter by conservation score: {conservation_score}[<|>|<=|>=]{number} e.g. phastCons>0.5,phylop<0.1,gerp>0.1.} -\item{populationFrequencyRef}{Reference Population Frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1kG_phase3:ALL<0.01.} +\item{populationFrequencyRef}{Reference Population Frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1000G:ALL<0.01.} -\item{populationFrequencyMaf}{Population minor allele frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1kG_phase3:ALL<0.01.} +\item{populationFrequencyMaf}{Population minor allele frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1000G:ALL<0.01.} \item{geneTraitId}{List of gene trait association id. e.g. "umls:C0007222" , "OMIM:269600".} @@ -135,7 +137,7 @@ \item{familyDisorder}{Specify the disorder to use for the family segregation.} -\item{familySegregation}{Filter by segregation mode from a given family. Accepted values: \link{ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, mendelianError, compoundHeterozygous }.} +\item{familySegregation}{Filter by segregation mode from a given family. Accepted values: \link{ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, deNovoStrict, mendelianError, compoundHeterozygous }.} \item{familyMembers}{Sub set of the members of a given family.} @@ -167,7 +169,7 @@ \item{transcriptFlag}{List of transcript flags. e.g. canonical, CCDS, basic, LRG, MANE Select, MANE Plus Clinical, EGLH_HaemOnc, TSO500.} -\item{populationFrequencyAlt}{Alternate Population Frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1kG_phase3:ALL<0.01.} +\item{populationFrequencyAlt}{Alternate Population Frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. 1000G:ALL<0.01.} \item{clinical}{Clinical source: clinvar, cosmic.} @@ -179,9 +181,9 @@ \item{sample}{Sample ID.} -\item{project}{Project \link{user@}project where project can be either the ID or the alias.} +\item{project}{Project \link{organization@}project where project can be either the ID or the alias.} -\item{study}{Study [\link{user@}project:]study where study and project can be either the ID or UUID.} +\item{study}{Study [\link{organization@}project:]study where study and project can be either the ID or UUID.} \item{jobId}{Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not provided.} @@ -191,6 +193,12 @@ \item{jobTags}{Job tags.} +\item{jobScheduledStartTime}{Time when the job is scheduled to start.} + +\item{jobPriority}{Priority of the job.} + +\item{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.} + \item{data}{Variant stats params.} } \description{ @@ -203,37 +211,39 @@ The following table summarises the available \emph{actions} for this client:\tab runCircos \tab /{apiVersion}/analysis/variant/circos/run \tab study, body\link{*} \cr deleteCohortStats \tab /{apiVersion}/analysis/variant/cohort/stats/delete \tab study, cohort \cr infoCohortStats \tab /{apiVersion}/analysis/variant/cohort/stats/info \tab study, cohort\link{*} \cr - runCohortStats \tab /{apiVersion}/analysis/variant/cohort/stats/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runExport \tab /{apiVersion}/analysis/variant/export/run \tab include, exclude, project, study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr + runCohortStats \tab /{apiVersion}/analysis/variant/cohort/stats/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runExomiser \tab /{apiVersion}/analysis/variant/exomiser/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runExport \tab /{apiVersion}/analysis/variant/export/run \tab include, exclude, project, study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr genotypesFamily \tab /{apiVersion}/analysis/variant/family/genotypes \tab study, family, clinicalAnalysis, modeOfInheritance\link{*}, penetrance, disorder \cr - runFamilyQc \tab /{apiVersion}/analysis/variant/family/qc/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - deleteFile \tab /{apiVersion}/analysis/variant/file/delete \tab jobId, jobDescription, jobDependsOn, jobTags, study, file, resume \cr - runGatk \tab /{apiVersion}/analysis/variant/gatk/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runGenomePlot \tab /{apiVersion}/analysis/variant/genomePlot/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runGwas \tab /{apiVersion}/analysis/variant/gwas/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runIndex \tab /{apiVersion}/analysis/variant/index/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, body\link{*} \cr - runIndividualQc \tab /{apiVersion}/analysis/variant/individual/qc/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runInferredSex \tab /{apiVersion}/analysis/variant/inferredSex/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr + runFamilyQc \tab /{apiVersion}/analysis/variant/family/qc/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + deleteFile \tab /{apiVersion}/analysis/variant/file/delete \tab jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, study, file, resume \cr + runGatk \tab /{apiVersion}/analysis/variant/gatk/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runGenomePlot \tab /{apiVersion}/analysis/variant/genomePlot/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runGwas \tab /{apiVersion}/analysis/variant/gwas/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runHrDetect \tab /{apiVersion}/analysis/variant/hrDetect/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runIndex \tab /{apiVersion}/analysis/variant/index/run \tab study, jobId, jobDependsOn, jobDescription, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runIndividualQc \tab /{apiVersion}/analysis/variant/individual/qc/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runInferredSex \tab /{apiVersion}/analysis/variant/inferredSex/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr queryKnockoutGene \tab /{apiVersion}/analysis/variant/knockout/gene/query \tab limit, skip, study, job \cr queryKnockoutIndividual \tab /{apiVersion}/analysis/variant/knockout/individual/query \tab limit, skip, study, job \cr - runKnockout \tab /{apiVersion}/analysis/variant/knockout/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runMendelianError \tab /{apiVersion}/analysis/variant/mendelianError/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr + runKnockout \tab /{apiVersion}/analysis/variant/knockout/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runMendelianError \tab /{apiVersion}/analysis/variant/mendelianError/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr metadata \tab /{apiVersion}/analysis/variant/metadata \tab project, study, file, sample, includeStudy, includeFile, includeSample, include, exclude \cr - queryMutationalSignature \tab /{apiVersion}/analysis/variant/mutationalSignature/query \tab study, sample, ct, biotype, fileData, filter, qual, region, gene, panel, panelModeOfInheritance, panelConfidence, panelFeatureType, panelRoleInCancer, panelIntersection, fitting \cr - runMutationalSignature \tab /{apiVersion}/analysis/variant/mutationalSignature/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runPlink \tab /{apiVersion}/analysis/variant/plink/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr + queryMutationalSignature \tab /{apiVersion}/analysis/variant/mutationalSignature/query \tab study, sample, type, ct, biotype, fileData, filter, qual, region, gene, panel, panelModeOfInheritance, panelConfidence, panelFeatureType, panelRoleInCancer, panelIntersection, msId, msDescription \cr + runMutationalSignature \tab /{apiVersion}/analysis/variant/mutationalSignature/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runPlink \tab /{apiVersion}/analysis/variant/plink/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr query \tab /{apiVersion}/analysis/variant/query \tab include, exclude, limit, skip, count, sort, summary, approximateCount, approximateCountSamplingSize, savedFilter, id, region, type, reference, alternate, project, study, file, filter, qual, fileData, sample, genotype, sampleData, sampleAnnotation, sampleMetadata, unknownGenotype, sampleLimit, sampleSkip, cohort, cohortStatsRef, cohortStatsAlt, cohortStatsMaf, cohortStatsMgf, cohortStatsPass, missingAlleles, missingGenotypes, score, family, familyDisorder, familySegregation, familyMembers, familyProband, includeStudy, includeFile, includeSample, includeSampleData, includeGenotype, includeSampleId, annotationExists, gene, ct, xref, biotype, proteinSubstitution, conservation, populationFrequencyAlt, populationFrequencyRef, populationFrequencyMaf, transcriptFlag, geneTraitId, go, expression, proteinKeyword, drug, functionalScore, clinical, clinicalSignificance, clinicalConfirmedStatus, customAnnotation, panel, panelModeOfInheritance, panelConfidence, panelRoleInCancer, panelFeatureType, panelIntersection, trait \cr - runRelatedness \tab /{apiVersion}/analysis/variant/relatedness/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runRvtests \tab /{apiVersion}/analysis/variant/rvtests/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr + runRelatedness \tab /{apiVersion}/analysis/variant/relatedness/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runRvtests \tab /{apiVersion}/analysis/variant/rvtests/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr aggregationStatsSample \tab /{apiVersion}/analysis/variant/sample/aggregationStats \tab savedFilter, region, type, project, study, file, filter, sample, genotype, sampleAnnotation, family, familyDisorder, familySegregation, familyMembers, familyProband, ct, biotype, populationFrequencyAlt, clinical, clinicalSignificance, clinicalConfirmedStatus, field \cr - runSampleEligibility \tab /{apiVersion}/analysis/variant/sample/eligibility/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runSampleQc \tab /{apiVersion}/analysis/variant/sample/qc/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr + runSampleEligibility \tab /{apiVersion}/analysis/variant/sample/eligibility/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runSampleQc \tab /{apiVersion}/analysis/variant/sample/qc/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr querySample \tab /{apiVersion}/analysis/variant/sample/query \tab limit, skip, variant, study, genotype \cr - runSample \tab /{apiVersion}/analysis/variant/sample/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr + runSample \tab /{apiVersion}/analysis/variant/sample/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr querySampleStats \tab /{apiVersion}/analysis/variant/sample/stats/query \tab region, type, study, file, filter, sampleData, ct, biotype, transcriptFlag, populationFrequencyAlt, clinical, clinicalSignificance, clinicalConfirmedStatus, study, filterTranscript, sample\link{*} \cr - runSampleStats \tab /{apiVersion}/analysis/variant/sample/stats/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runStatsExport \tab /{apiVersion}/analysis/variant/stats/export/run \tab project, study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr - runStats \tab /{apiVersion}/analysis/variant/stats/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, body\link{*} \cr + runSampleStats \tab /{apiVersion}/analysis/variant/sample/stats/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runStatsExport \tab /{apiVersion}/analysis/variant/stats/export/run \tab project, study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr + runStats \tab /{apiVersion}/analysis/variant/stats/run \tab study, jobId, jobDescription, jobDependsOn, jobTags, jobScheduledStartTime, jobPriority, jobDryRun, body\link{*} \cr } } \section{Endpoint /{apiVersion}/analysis/variant/aggregationStats}{ @@ -271,6 +281,11 @@ Read cohort variant stats from list of cohorts. Compute cohort variant stats for the selected list of samples. } +\section{Endpoint /{apiVersion}/analysis/variant/exomiser/run}{ + +The Exomiser is a Java program that finds potential disease-causing variants from whole-exome or whole-genome sequencing data. +} + \section{Endpoint /{apiVersion}/analysis/variant/export/run}{ Filter and export variants from the variant storage to a file. @@ -306,6 +321,11 @@ Generate a genome plot for a given sample. Run a Genome Wide Association Study between two cohorts. } +\section{Endpoint /{apiVersion}/analysis/variant/hrDetect/run}{ + +Run HRDetect analysis for a given somatic sample. +} + \section{Endpoint /{apiVersion}/analysis/variant/index/run}{ \link{DEPRECATED} Use operation/variant/index. diff --git a/opencga-client/src/main/R/vignettes/opencgaR.R b/opencga-client/src/main/R/vignettes/opencgaR.R index 82500484c50..8ae99ebfe83 100644 --- a/opencga-client/src/main/R/vignettes/opencgaR.R +++ b/opencga-client/src/main/R/vignettes/opencgaR.R @@ -1,225 +1,230 @@ ## ----install, eval=FALSE, echo=TRUE------------------------------------------- -# ## Install opencgaR -# # install.packages("opencgaR_2.2.0.tar.gz", repos=NULL, type="source") - -## ----message=FALSE, warning=FALSE, include=FALSE------------------------------ -library(opencgaR) -library(glue) -library(dplyr) -library(tidyr) - -## ----eval=TRUE, results='hide'------------------------------------------------ -## Initialise connection using a configuration in R list -conf <- list(version="v2", rest=list(host="https://ws.opencb.org/opencga-prod")) -con <- initOpencgaR(opencgaConfig=conf) - -## ----eval=FALSE, results='hide'----------------------------------------------- -# ## Initialise connection using a configuration file (in YAML or JSON format) -# # conf <- "/path/to/conf/client-configuration.yml" -# # con <- initOpencgaR(opencgaConfig=conf) - -## ---- results='hide'---------------------------------------------------------- -# Log in -con <- opencgaLogin(opencga = con, userid = "demouser", passwd = "demouser", - autoRenew = TRUE, verbose = FALSE, showToken = FALSE) - -## ---- results='hide'---------------------------------------------------------- -projects <- projectClient(OpencgaR = con, endpointName = "search") -getResponseResults(projects)[[1]][,c("id","name", "description")] - -## ---- results='hide'---------------------------------------------------------- -projects <- projectClient(OpencgaR=con, project="population", endpointName="studies") -getResponseResults(projects)[[1]][,c("id","name", "description")] - -## ---- results='hide'---------------------------------------------------------- -study <- "population:1000g" - -# Study name -study_result <- studyClient(OpencgaR = con, studies = study, endpointName = "info") -study_name <- getResponseResults(study_result)[[1]][,"name"] -# Number of samples in this study -count_samples <- sampleClient(OpencgaR = con, endpointName = "search", - params=list(study=study, count=TRUE, limit=0)) -num_samples <- getResponseNumMatches(count_samples) -# Number of individuals -count_individuals <- individualClient(OpencgaR = con, endpointName = "search", - params=list(study=study, count=TRUE, limit=0)) -num_individuals <- getResponseNumMatches(count_individuals) -# Number of clinical cases -count_cases <- clinicalClient(OpencgaR = con, endpointName = "search", - params=list(study=study, count=TRUE, limit=0)) -num_cases <- getResponseNumMatches(count_cases) -# Number of variants -count_variants <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, count=TRUE, limit=0)) -num_variants <- getResponseNumMatches(count_variants) - -to_print <- "Study name: {study_name} - - Number of samples: {num_samples} - - Number of individuals: {num_individuals} - - Number of cases: {num_cases} - - Number of variants: {num_variants}" -glue(to_print) - -## ---- results='hide'---------------------------------------------------------- -# Retrieve the first variant -variant_example <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, limit=1, type="SNV")) -variant_id <- getResponseResults(variant_example)[[1]][,"id"] -glue("Variant example: {variant_id}") - -## ----message=FALSE, warning=FALSE, results='hide'----------------------------- -# Retrieve the samples that have this variant -variant_result <- variantClient(OpencgaR = con, endpointName = "querySample", - params=list(study=study, variant=variant_id)) - -glue("Number of samples with this variant: - {getResponseAttributes(variant_result)$numTotalSamples}") -data_keys <- unlist(getResponseResults(variant_result)[[1]][, "studies"][[1]][, "sampleDataKeys"]) - -df <- getResponseResults(variant_result)[[1]][, "studies"][[1]][, "samples"][[1]] %>% - select(-fileIndex) %>% unnest_wider(data) -colnames(df) <- c("samples", data_keys) -df - -## ---- results='hide', message=FALSE, warning=FALSE, include=FALSE------------- -# Fetch the samples with a specific genotype -genotype <- "0/1,1/1" -variant_result <- variantClient(OpencgaR = con, endpointName = "querySample", - params=list(study=study, variant=variant_id, - genotype=genotype)) -glue("Number of samples with genotype {genotype} in this variant: - {getResponseAttributes(variant_result)$numTotalSamples}") - -## ---- results='hide'---------------------------------------------------------- -# Search for homozygous alternate samples -genotype <- "1/1" -variant_result <- variantClient(OpencgaR = con, endpointName = "querySample", - params=list(study=study, variant=variant_id, - genotype=genotype)) -glue("Number of samples with genotype {genotype} in this variant: - {getResponseAttributes(variant_result)$numTotalSamples}") - -## ---- results='hide'---------------------------------------------------------- -# Search for homozygous alternate samples -region <- "1:62273600-62273700" -variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, region=region, limit=100)) - -glue("Number of variants in region {region}: {getResponseNumResults(variant_result)}") -getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) - -## ---- results='hide'---------------------------------------------------------- -## Filter by gene -genes <- "HCN3,MTOR" -variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, gene=genes, limit=10)) -getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) - -## ---- results='hide'---------------------------------------------------------- -## Filter by xref -snp <- "rs147394986" -variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, xref=snp, limit=5)) -getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) - -## ---- results='hide'---------------------------------------------------------- -## Filter by missense variants and stop_gained -ct <- "missense_variant,stop_gained" -variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, ct=ct, limit=5)) -glue("Number of missense and stop gained variants: {getResponseNumMatches(variant_result)}") -getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) - -## ---- results='hide'---------------------------------------------------------- -## Filter by LoF (alias created containing 9 different CTs) -variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, ct="lof", limit=5)) -glue("Number of LoF variants: {getResponseNumMatches(variant_result)}") -getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) - -## ---- results='hide'---------------------------------------------------------- -## Filter by population alternate frequency -population_frequency_alt <- '1kG_phase3:ALL<0.001' -variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, - populationFrequencyAlt=population_frequency_alt, - limit=5)) -glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") +# ## Install opencgaR +# # install.packages("opencgaR_4.0.0.tar.gz", repos=NULL, type="source") + +## ----message=FALSE, eval=FALSE, warning=FALSE, include=FALSE------------------ +# library(opencgaR) +# library(glue) +# library(dplyr) +# library(tidyr) + +## ----eval=FALSE, results='hide'----------------------------------------------- +# ## Initialise connection using a configuration in R list +# conf <- list(version="v2", rest=list(host="https://test.app.zettagenomics.com/myenv/opencga/")) +# con <- initOpencgaR(opencgaConfig=conf) + +## ----eval=FALSE, results='hide'----------------------------------------------- +# ## Initialise connection using a configuration file (in YAML or JSON format) +# # conf <- "/path/to/conf/client-configuration.yml" +# # con <- initOpencgaR(opencgaConfig=conf) + +## ----eval=FALSE, results='hide'----------------------------------------------- +# # Log in +# con <- opencgaLogin(opencga = con, userid = "userID", passwd = "1234567890", +# organization = "myorg", autoRenew = TRUE, verbose = FALSE, +# showToken = FALSE) + +## ----eval=FALSE, results='hide'----------------------------------------------- +# projects <- projectClient(OpencgaR = con, endpointName = "search") +# getResponseResults(projects)[[1]][,c("id","name", "description")] + +## ----eval=FALSE, results='hide'----------------------------------------------- +# projects <- projectClient(OpencgaR=con, project="population", endpointName="studies") +# getResponseResults(projects)[[1]][,c("id","name", "description")] + +## ----eval=FALSE, results='hide'----------------------------------------------- +# # study <- "test@population:1000G" +# study <- "test@germline:platinum" +# +# # Study name +# study_result <- studyClient(OpencgaR = con, studies = study, endpointName = "info") +# study_name <- getResponseResults(study_result)[[1]][,"name"] +# # Number of samples in this study +# count_samples <- sampleClient(OpencgaR = con, endpointName = "search", +# params=list(study=study, count=TRUE, limit=0)) +# num_samples <- getResponseNumMatches(count_samples) +# # Number of individuals +# count_individuals <- individualClient(OpencgaR = con, endpointName = "search", +# params=list(study=study, count=TRUE, limit=0)) +# num_individuals <- getResponseNumMatches(count_individuals) +# # Number of clinical cases +# count_cases <- clinicalClient(OpencgaR = con, endpointName = "search", +# params=list(study=study, count=TRUE, limit=0)) +# num_cases <- getResponseNumMatches(count_cases) +# # Number of variants +# count_variants <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, count=TRUE, limit=0)) +# num_variants <- getResponseNumMatches(count_variants) +# +# to_print <- "Study name: {study_name} +# - Number of samples: {num_samples} +# - Number of individuals: {num_individuals} +# - Number of cases: {num_cases} +# - Number of variants: {num_variants}" +# glue(to_print) + +## ----eval=FALSE, results='hide'----------------------------------------------- +# # Retrieve the first variant +# variant_example <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, limit=1, type="SNV")) +# variant_id <- getResponseResults(variant_example)[[1]][,"id"] +# glue("Variant example: {variant_id}") + +## ----eval=FALSE, message=FALSE, warning=FALSE, results='hide'----------------- +# # Retrieve the samples that have this variant +# variant_result <- variantClient(OpencgaR = con, endpointName = "querySample", +# params=list(study=study, variant=variant_id)) +# +# glue("Number of samples with this variant: +# {getResponseAttributes(variant_result)$numTotalSamples}") +# data_keys <- unlist(getResponseResults(variant_result)[[1]][, "studies"][[1]][, "sampleDataKeys"]) +# +# df <- getResponseResults(variant_result)[[1]][, "studies"][[1]][, "samples"][[1]] %>% +# select(-fileIndex) %>% unnest_wider(data, names_sep = "") +# colnames(df) <- c("samples", data_keys) +# df + +## ----eval=FALSE, results='hide', message=FALSE, warning=FALSE, include=FALSE---- +# # Fetch the samples with a specific genotype +# genotype <- "0/1,1/1" +# variant_result <- variantClient(OpencgaR = con, endpointName = "querySample", +# params=list(study=study, variant=variant_id, +# genotype=genotype)) +# glue("Number of samples with genotype {genotype} in this variant: +# {getResponseAttributes(variant_result)$numTotalSamples}") + +## ----eval=FALSE, results='hide'----------------------------------------------- +# # Search for homozygous alternate samples +# genotype <- "1/1" +# variant_result <- variantClient(OpencgaR = con, endpointName = "querySample", +# params=list(study=study, variant=variant_id, +# genotype=genotype)) +# glue("Number of samples with genotype {genotype} in this variant: +# {getResponseAttributes(variant_result)$numTotalSamples}") + +## ----eval=FALSE, results='hide'----------------------------------------------- +# # Search for homozygous alternate samples +# region <- "1:62273600-62273700" +# region <- "11:119345500-119345600" +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, region=region, limit=100)) +# +# glue("Number of variants in region {region}: {getResponseNumResults(variant_result)}") # getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) -## ---- results='hide'---------------------------------------------------------- -## Filter by two population alternate frequency -## Remember to use commas for OR and semi-colon for AND -population_frequency_alt <- '1kG_phase3:ALL<0.001;GNOMAD_GENOMES:ALL<0.001' -variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, - populationFrequencyAlt=population_frequency_alt, - limit=5)) -glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") +## ----eval=FALSE, results='hide'----------------------------------------------- +# ## Filter by gene +# genes <- "HCN3,MTOR" +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, gene=genes, limit=10)) +# getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) +## ----eval=FALSE, results='hide'----------------------------------------------- +# ## Filter by xref +# #snp <- "rs147394986" +# hgvs <- "NP_002747.2:p.Arg67Trp" +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, xref=hgvs, limit=5)) # getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) -## ---- results='hide'---------------------------------------------------------- -## Filter by population alternate frequency using a range of values -population_frequency_alt <- '1kG_phase3:ALL>0.001;1kG_phase3:ALL<0.005' -variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, - populationFrequencyAlt=population_frequency_alt, - limit=5)) -glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") +## ----eval=FALSE, results='hide'----------------------------------------------- +# ## Filter by missense variants and stop_gained +# ct <- "missense_variant,stop_gained" +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, ct=ct, limit=5)) +# glue("Number of missense and stop gained variants: {getResponseNumMatches(variant_result)}") +# getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) +## ----eval=FALSE, results='hide'----------------------------------------------- +# ## Filter by LoF (alias created containing 9 different CTs) +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, ct="lof", limit=5)) +# glue("Number of LoF variants: {getResponseNumMatches(variant_result)}") # getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) -## ---- results='hide'---------------------------------------------------------- -## Filter by Consequence Type, Clinical Significance and population frequency -ct <- 'lof,missense_variant' -clinicalSignificance <- 'likely_pathogenic,pathogenic' -populationFrequencyAlt <- '1kG_phase3:ALL<0.01;GNOMAD_GENOMES:ALL<0.01' -variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, limit=5, ct=ct, - clinicalSignificance=clinicalSignificance, - populationFrequencyAlt=population_frequency_alt)) -glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") +## ----eval=FALSE, results='hide'----------------------------------------------- +# ## Filter by population alternate frequency +# population_frequency_alt <- '1000G:ALL<0.001' +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, +# populationFrequencyAlt=population_frequency_alt, +# limit=5)) +# glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") +# # getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) +## ----eval=FALSE, results='hide'----------------------------------------------- +# ## Filter by two population alternate frequency +# ## Remember to use commas for OR and semi-colon for AND +# population_frequency_alt <- '1000G:ALL<0.001;GNOMAD_GENOMES:ALL<0.001' +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, +# populationFrequencyAlt=population_frequency_alt, +# limit=5)) +# glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") +# # getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) -## ---- results='hide'---------------------------------------------------------- -## Filter by cohort ALL frequency -cohort_stats <- paste0(study, ':ALL<0.001') -variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, cohortStatsAlt=cohort_stats, - limit=5)) -glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") +## ----eval=FALSE, results='hide'----------------------------------------------- +# ## Filter by population alternate frequency using a range of values +# population_frequency_alt <- '1000G:ALL>0.001;1000G:ALL<0.005' +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, +# populationFrequencyAlt=population_frequency_alt, +# limit=5)) +# glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") +# +# # getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) +## ----eval=FALSE, results='hide'----------------------------------------------- +# ## Filter by Consequence Type, Clinical Significance and population frequency +# ct <- 'lof,missense_variant' +# clinicalSignificance <- 'likely_pathogenic,pathogenic' +# populationFrequencyAlt <- '1000G:ALL<0.01;GNOMAD_GENOMES:ALL<0.01' +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, limit=5, ct=ct, +# clinicalSignificance=clinicalSignificance, +# populationFrequencyAlt=population_frequency_alt)) +# glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") +# # getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) -## ---- eval=FALSE-------------------------------------------------------------- -# ## Filter by custom cohorts' frequency -# cohort_stats = study + ':MY_COHORT_A<0.001' -# variant_result <- variantClient(OpencgaR = con, endpointName = "query", -# params=list(study=study, cohortStatsAlt=cohort_stats, -# limit=5)) -# glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") -# -# ## Filter by more than one cohort frequency and consequence type -# cohort_stats = study + ':MY_COHORT_A<0.001' + ';' + study + ':MY_COHORT_B<0.001' -# variant_result <- variantClient(OpencgaR = con, endpointName = "query", -# params=list(study=study, cohortStatsAlt=cohort_stats, -# limit=5)) -# glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") - -## ---- results='hide'---------------------------------------------------------- -variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, id=variant_id)) -getResponseResults(variant_result)[[1]]$studies[[1]]$stats[[1]][,c('cohortId', 'alleleCount', - 'altAlleleCount', 'altAlleleFreq')] -glue("Variant example: {variant_id}") - -## ---- results='hide', fig.width=7--------------------------------------------- -## Aggregate by number of LoF variants per gene -variants_agg <- variantClient(OpencgaR = con, endpointName = "aggregationStats", - params=list(study=study, ct='lof', fields="genes")) -df <- getResponseResults(variants_agg)[[1]]$buckets[[1]] -barplot(height = df$count, names.arg = df$value, las=2, cex.names = 0.6) +## ----eval=FALSE, results='hide'----------------------------------------------- +# ## Filter by cohort ALL frequency +# cohort_stats <- paste0(study, ':ALL<0.001') +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, cohortStatsAlt=cohort_stats, +# limit=5)) +# glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") +# +# # getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) + +## ----eval=FALSE, eval=FALSE--------------------------------------------------- +# ## Filter by custom cohorts' frequency +# cohort_stats = study + ':MY_COHORT_A<0.001' +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, cohortStatsAlt=cohort_stats, +# limit=5)) +# glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") +# +# ## Filter by more than one cohort frequency and consequence type +# cohort_stats = study + ':MY_COHORT_A<0.001' + ';' + study + ':MY_COHORT_B<0.001' +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, cohortStatsAlt=cohort_stats, +# limit=5)) +# glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") + +## ----eval=FALSE, results='hide'----------------------------------------------- +# variant_result <- variantClient(OpencgaR = con, endpointName = "query", +# params=list(study=study, id=variant_id)) +# glue("Variant example: {variant_id}") +# getResponseResults(variant_result)[[1]]$studies[[1]]$stats[[1]][,c('cohortId', 'alleleCount', +# 'altAlleleCount', 'altAlleleFreq')] +# + +## ----eval=FALSE, results='hide', fig.width=7---------------------------------- +# ## Aggregate by number of LoF variants per gene +# variants_agg <- variantClient(OpencgaR = con, endpointName = "aggregationStats", +# params=list(study=study, ct='lof', fields="genes")) +# df <- getResponseResults(variants_agg)[[1]]$buckets[[1]] +# barplot(height = df$count, names.arg = df$value, las=2, cex.names = 0.6) diff --git a/opencga-client/src/main/R/vignettes/opencgaR.Rmd b/opencga-client/src/main/R/vignettes/opencgaR.Rmd index d5bf9f48c3e..b9dbaf85837 100644 --- a/opencga-client/src/main/R/vignettes/opencgaR.Rmd +++ b/opencga-client/src/main/R/vignettes/opencgaR.Rmd @@ -15,18 +15,18 @@ output: rmarkdown::html_vignette OpenCGA is an open-source project that aims to provide a **Big Data storage engine and analysis framework for genomic scale data analysis** of hundreds of terabytes or even petabytes. For users, its main features include uploading and downloading files to a repository, storing their information in a generic way (non-dependant of the original file-format) and retrieving this information efficiently. For developers, it will be a platform for supporting the most used bioinformatics file formats and accelerating the development of visualization and analysis applications. -The OpencgaR client provides a user-friendly interface to work with OpenCGA REST Web Services through R and has been implemented following the Bioconductor guidelines for package development which promote high-quality, well documented and inter-operable software. The source code of the R package can be found in [GitHub](https://github.com/opencb/opencga/tree/develop/opencga-client/src/main/R). +The OpencgaR client provides a user-friendly interface to work with OpenCGA REST Web Services through R and has been implemented following the Bioconductor guidelines for package development which promote high-quality, well documented and inter-operable software. The source code of the R package can be found in [GitHub](https://github.com/opencb/opencga/tree/develop/opencga-client/src/main/R). ## Installation and configuration -The R client requires at least R version 3.4, although most of the code is fully compatible with earlier versions. The pre-build R package of the R client can be downloaded from the OpenCGA GitHub Release at https://github.com/opencb/opencga/releases and installed using the `install.packages` function in R. `install.packages` can also install a source package from a remote `.tar.gz` file by providing the URL to such file. +The R client requires at least R version 3.4, although most of the code is fully compatible with earlier versions. The pre-build R package of the R client can be downloaded from the OpenCGA GitHub Release at and installed using the `install.packages` function in R. `install.packages` can also install a source package from a remote `.tar.gz` file by providing the URL to such file. ```{r install, eval=FALSE, echo=TRUE} ## Install opencgaR -# install.packages("opencgaR_2.2.0.tar.gz", repos=NULL, type="source") +# install.packages("opencgaR_4.0.0.tar.gz", repos=NULL, type="source") ``` -```{r message=FALSE, warning=FALSE, include=FALSE} +```{r message=FALSE, eval=FALSE, warning=FALSE, include=FALSE} library(opencgaR) library(glue) library(dplyr) @@ -41,9 +41,9 @@ The ***initOpencgaR*** function accepts either host and version information or a The code below shows different ways to initialise the OpenCGA connection with the REST server. -```{r eval=TRUE, results='hide'} +```{r eval=FALSE, results='hide'} ## Initialise connection using a configuration in R list -conf <- list(version="v2", rest=list(host="https://ws.opencb.org/opencga-prod")) +conf <- list(version="v2", rest=list(host="https://test.app.zettagenomics.com/myenv/opencga/")) con <- initOpencgaR(opencgaConfig=conf) ``` @@ -55,30 +55,32 @@ con <- initOpencgaR(opencgaConfig=conf) Once the connection has been initialised users can login specifying their OpenCGA user ID and password. -```{r, results='hide'} +```{r eval=FALSE, results='hide'} # Log in -con <- opencgaLogin(opencga = con, userid = "demouser", passwd = "demouser", - autoRenew = TRUE, verbose = FALSE, showToken = FALSE) +con <- opencgaLogin(opencga = con, userid = "userID", passwd = "1234567890", + organization = "myorg", autoRenew = TRUE, verbose = FALSE, + showToken = FALSE) ``` # Retrieving basic information about projects, users and studies Retrieving the list of projects accessible to the user: -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} projects <- projectClient(OpencgaR = con, endpointName = "search") getResponseResults(projects)[[1]][,c("id","name", "description")] ``` List the studies accessible in a project -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} projects <- projectClient(OpencgaR=con, project="population", endpointName="studies") getResponseResults(projects)[[1]][,c("id","name", "description")] ``` -```{r, results='hide'} -study <- "population:1000g" +```{r, eval=FALSE, results='hide'} +# study <- "test@population:1000G" +study <- "test@germline:platinum" # Study name study_result <- studyClient(OpencgaR = con, studies = study, endpointName = "info") @@ -114,7 +116,7 @@ glue(to_print) As an example we are going to retrieve a random variant from the database -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} # Retrieve the first variant variant_example <- variantClient(OpencgaR = con, endpointName = "query", params=list(study=study, limit=1, type="SNV")) @@ -124,7 +126,7 @@ glue("Variant example: {variant_id}") ## Fetch the samples containing a specific variant -```{r message=FALSE, warning=FALSE, results='hide'} +```{r eval=FALSE, message=FALSE, warning=FALSE, results='hide'} # Retrieve the samples that have this variant variant_result <- variantClient(OpencgaR = con, endpointName = "querySample", params=list(study=study, variant=variant_id)) @@ -134,14 +136,14 @@ glue("Number of samples with this variant: data_keys <- unlist(getResponseResults(variant_result)[[1]][, "studies"][[1]][, "sampleDataKeys"]) df <- getResponseResults(variant_result)[[1]][, "studies"][[1]][, "samples"][[1]] %>% - select(-fileIndex) %>% unnest_wider(data) + select(-fileIndex) %>% unnest_wider(data, names_sep = "") colnames(df) <- c("samples", data_keys) df ``` ## Fetch samples by genotype -```{r, results='hide', message=FALSE, warning=FALSE, include=FALSE} +```{r, eval=FALSE, results='hide', message=FALSE, warning=FALSE, include=FALSE} # Fetch the samples with a specific genotype genotype <- "0/1,1/1" variant_result <- variantClient(OpencgaR = con, endpointName = "querySample", @@ -151,7 +153,7 @@ glue("Number of samples with genotype {genotype} in this variant: {getResponseAttributes(variant_result)$numTotalSamples}") ``` -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} # Search for homozygous alternate samples genotype <- "1/1" variant_result <- variantClient(OpencgaR = con, endpointName = "querySample", @@ -163,9 +165,10 @@ glue("Number of samples with genotype {genotype} in this variant: ## Retrieve variants by region -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} # Search for homozygous alternate samples region <- "1:62273600-62273700" +region <- "11:119345500-119345600" variant_result <- variantClient(OpencgaR = con, endpointName = "query", params=list(study=study, region=region, limit=100)) @@ -177,11 +180,10 @@ getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation Variants can be filtered by gene using the parameters gene or xref: -- `gene`: only accepts gene IDs -- `xref`: accepts different IDs including gene, transcript, dbSNP, ... -Remember you can pass different IDs using comma as separator. +- `gene`: only accepts gene IDs +- `xref`: accepts different IDs including gene, transcript, dbSNP, ... Remember you can pass different IDs using comma as separator. -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} ## Filter by gene genes <- "HCN3,MTOR" variant_result <- variantClient(OpencgaR = con, endpointName = "query", @@ -189,20 +191,20 @@ variant_result <- variantClient(OpencgaR = con, endpointName = "query", getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) ``` -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} ## Filter by xref -snp <- "rs147394986" +#snp <- "rs147394986" +hgvs <- "NP_002747.2:p.Arg67Trp" variant_result <- variantClient(OpencgaR = con, endpointName = "query", - params=list(study=study, xref=snp, limit=5)) + params=list(study=study, xref=hgvs, limit=5)) getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) ``` - ## Retrieve variants by consequence type -OpenCGA provides a rich variant annotation that includes Ensembl consequence types (https://m.ensembl.org/info/genome/variation/prediction/predicted_data.html). You can filter by consequence type by using parameter `ct`. You can provide a list of consequence type names separated by comma. Also, an alias called `lof` filter by a combination of loss-of-function terms. +OpenCGA provides a rich variant annotation that includes Ensembl consequence types (). You can filter by consequence type by using parameter `ct`. You can provide a list of consequence type names separated by comma. Also, an alias called `lof` filter by a combination of loss-of-function terms. -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} ## Filter by missense variants and stop_gained ct <- "missense_variant,stop_gained" variant_result <- variantClient(OpencgaR = con, endpointName = "query", @@ -211,7 +213,7 @@ glue("Number of missense and stop gained variants: {getResponseNumMatches(varian getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) ``` -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} ## Filter by LoF (alias created containing 9 different CTs) variant_result <- variantClient(OpencgaR = con, endpointName = "query", params=list(study=study, ct="lof", limit=5)) @@ -223,17 +225,17 @@ getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation OpenCGA allows to filter variants by population frequencies, including: -- Minor Allele frequency (MAF) with the parameter `populationFrequencyMaf` -- Alternate Allele frequency (ALT) with the parameter `populationFrequencyAlt` -- Reference Allele frequency with the parameter `populationFrequencyRef` +- Minor Allele frequency (MAF) with the parameter `populationFrequencyMaf` +- Alternate Allele frequency (ALT) with the parameter `populationFrequencyAlt` +- Reference Allele frequency with the parameter `populationFrequencyRef` The population frequency studies indexed in OpenCGA include different sources such as **genomAD** or **1000 Genomes**. The syntax for the query parameter is: `{study}:{population}:{cohort}[<|>|<=|>=]{proportion}`. Note that you can specify several populations separated by comma (OR) or by semi-colon (AND), e.g. for all variants less than 1% in the two studies we should use `1kG_phase3:ALL<0.01;GNOMAD_GENOMES:ALL<0.01` -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} ## Filter by population alternate frequency -population_frequency_alt <- '1kG_phase3:ALL<0.001' +population_frequency_alt <- '1000G:ALL<0.001' variant_result <- variantClient(OpencgaR = con, endpointName = "query", params=list(study=study, populationFrequencyAlt=population_frequency_alt, @@ -242,22 +244,22 @@ glue("Number of variants matching the filter: {getResponseNumMatches(variant_res # getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) ``` -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} ## Filter by two population alternate frequency ## Remember to use commas for OR and semi-colon for AND -population_frequency_alt <- '1kG_phase3:ALL<0.001;GNOMAD_GENOMES:ALL<0.001' +population_frequency_alt <- '1000G:ALL<0.001;GNOMAD_GENOMES:ALL<0.001' variant_result <- variantClient(OpencgaR = con, endpointName = "query", params=list(study=study, populationFrequencyAlt=population_frequency_alt, limit=5)) glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") -# getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) +getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) ``` -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} ## Filter by population alternate frequency using a range of values -population_frequency_alt <- '1kG_phase3:ALL>0.001;1kG_phase3:ALL<0.005' +population_frequency_alt <- '1000G:ALL>0.001;1000G:ALL<0.005' variant_result <- variantClient(OpencgaR = con, endpointName = "query", params=list(study=study, populationFrequencyAlt=population_frequency_alt, @@ -268,28 +270,28 @@ glue("Number of variants matching the filter: {getResponseNumMatches(variant_res ``` ## Complex variant queries + OpenCGA implements a very advanced variant query engine that allows to combine many filters to build very complex and useful queries. In this section you will find some examples. -```{r, results='hide'} +```{r, eval=FALSE, results='hide'} ## Filter by Consequence Type, Clinical Significance and population frequency ct <- 'lof,missense_variant' clinicalSignificance <- 'likely_pathogenic,pathogenic' -populationFrequencyAlt <- '1kG_phase3:ALL<0.01;GNOMAD_GENOMES:ALL<0.01' +populationFrequencyAlt <- '1000G:ALL<0.01;GNOMAD_GENOMES:ALL<0.01' variant_result <- variantClient(OpencgaR = con, endpointName = "query", params=list(study=study, limit=5, ct=ct, clinicalSignificance=clinicalSignificance, populationFrequencyAlt=population_frequency_alt)) glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}") -# getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) +getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation) ``` - ## Filter variants using cohort information -OpenCGA allows users to define cohorts of samples and calculate and index the allele and genotype frequencies among other stats. By default, a cohort called "ALL" containing all samples is defined and the variant stats are calculated. You can filter by the internal cohort stats using the parameter `cohortStatsAlt` and pass the study and the cohort you would like to filter by. Format: `cohortStatsAlt={study}:{cohort}[<|>|<=|>=]{proportion}` -Note that any cohorts created will be shared among the studies belonging to the same project. -```{r, results='hide'} +OpenCGA allows users to define cohorts of samples and calculate and index the allele and genotype frequencies among other stats. By default, a cohort called "ALL" containing all samples is defined and the variant stats are calculated. You can filter by the internal cohort stats using the parameter `cohortStatsAlt` and pass the study and the cohort you would like to filter by. Format: `cohortStatsAlt={study}:{cohort}[<|>|<=|>=]{proportion}` Note that any cohorts created will be shared among the studies belonging to the same project. + +```{r, eval=FALSE, results='hide'} ## Filter by cohort ALL frequency cohort_stats <- paste0(study, ':ALL<0.001') variant_result <- variantClient(OpencgaR = con, endpointName = "query", @@ -301,7 +303,8 @@ glue("Number of variants matching the filter: {getResponseNumMatches(variant_res ``` The following examples are just examples of how queries should be made, they are not intended to be executed since the custom cohorts have not been created. -```{r, eval=FALSE} + +```{r, eval=FALSE, eval=FALSE} ## Filter by custom cohorts' frequency cohort_stats = study + ':MY_COHORT_A<0.001' variant_result <- variantClient(OpencgaR = con, endpointName = "query", @@ -318,23 +321,24 @@ glue("Number of variants matching the filter: {getResponseNumMatches(variant_res ``` ## Retrieve cohort frequencies for a specific variant -```{r, results='hide'} + +```{r, eval=FALSE, results='hide'} variant_result <- variantClient(OpencgaR = con, endpointName = "query", params=list(study=study, id=variant_id)) +glue("Variant example: {variant_id}") getResponseResults(variant_result)[[1]]$studies[[1]]$stats[[1]][,c('cohortId', 'alleleCount', 'altAlleleCount', 'altAlleleFreq')] -glue("Variant example: {variant_id}") + ``` # Aggregated stats + ## Number of LoF variants per gene -```{r, results='hide', fig.width=7} +```{r, eval=FALSE, results='hide', fig.width=7} ## Aggregate by number of LoF variants per gene variants_agg <- variantClient(OpencgaR = con, endpointName = "aggregationStats", params=list(study=study, ct='lof', fields="genes")) df <- getResponseResults(variants_agg)[[1]]$buckets[[1]] barplot(height = df$count, names.arg = df$value, las=2, cex.names = 0.6) ``` - - diff --git a/opencga-client/src/main/R/vignettes/opencgaR.html b/opencga-client/src/main/R/vignettes/opencgaR.html new file mode 100644 index 00000000000..94440b5dd2f --- /dev/null +++ b/opencga-client/src/main/R/vignettes/opencgaR.html @@ -0,0 +1,675 @@ + + + + + + + + + + + + + + + + +Introduction to opencgaR + + + + + + + + + + + + + + + + + + + + + + + + + + +

Introduction to opencgaR

+

Zetta Genomics

+

28 November 2024

+ + + +
+

Introduction

+

OpenCGA is an open-source project that aims to provide a Big +Data storage engine and analysis framework for genomic scale data +analysis of hundreds of terabytes or even petabytes. For users, +its main features include uploading and downloading files to a +repository, storing their information in a generic way (non-dependant of +the original file-format) and retrieving this information efficiently. +For developers, it will be a platform for supporting the most used +bioinformatics file formats and accelerating the development of +visualization and analysis applications.

+

The OpencgaR client provides a user-friendly interface to work with +OpenCGA REST Web Services through R and has been implemented following +the Bioconductor guidelines for package development which promote +high-quality, well documented and inter-operable software. The source +code of the R package can be found in GitHub.

+
+

Installation and configuration

+

The R client requires at least R version 3.4, although most of the +code is fully compatible with earlier versions. The pre-build R package +of the R client can be downloaded from the OpenCGA GitHub Release at https://github.com/opencb/opencga/releases and installed +using the install.packages function in R. +install.packages can also install a source package from a +remote .tar.gz file by providing the URL to such file.

+
## Install opencgaR
+# install.packages("opencgaR_4.0.0.tar.gz", repos=NULL, type="source")
+
+
+
+

Connection and authentication into an OpenCGA instance

+

A set of methods have been implemented to deal with the connectivity +and log into the REST host. Connection to the host is done in two steps +using the functions initOpencgaR and +opencgaLogin for defining the connection +details and login, respectively.

+

The initOpencgaR function accepts either +host and version information or a configuration file (as a +list() or in YAML +or JSON format). The opencgaLogin function +establishes the connection with the host. It requires an opencgaR object +(created using the initOpencgaR function) and the login +details: user and password. User and password can be introduced +interactively through a popup window using +interactive=TRUE, to avoid typing user credentials within +the R script or a config file.

+

The code below shows different ways to initialise the OpenCGA +connection with the REST server.

+
## Initialise connection using a configuration in R list
+conf <- list(version="v2", rest=list(host="https://test.app.zettagenomics.com/myenv/opencga/"))
+con <- initOpencgaR(opencgaConfig=conf)
+
## Initialise connection using a configuration file (in YAML or JSON format)
+# conf <- "/path/to/conf/client-configuration.yml"
+# con <- initOpencgaR(opencgaConfig=conf)
+

Once the connection has been initialised users can login specifying +their OpenCGA user ID and password.

+
# Log in
+con <- opencgaLogin(opencga = con, userid = "userID", passwd = "1234567890", 
+                    organization = "myorg", autoRenew = TRUE, verbose = FALSE, 
+                    showToken = FALSE)
+
+
+

Retrieving basic information about projects, users and studies

+

Retrieving the list of projects accessible to the user:

+
projects <- projectClient(OpencgaR = con, endpointName = "search")
+getResponseResults(projects)[[1]][,c("id","name", "description")]
+

List the studies accessible in a project

+
projects <- projectClient(OpencgaR=con, project="population", endpointName="studies")
+getResponseResults(projects)[[1]][,c("id","name", "description")]
+
# study <- "test@population:1000G"
+study <- "test@germline:platinum"
+
+# Study name
+study_result <- studyClient(OpencgaR = con, studies = study, endpointName = "info")
+study_name <- getResponseResults(study_result)[[1]][,"name"]
+# Number of samples in this study
+count_samples <- sampleClient(OpencgaR = con, endpointName = "search", 
+                              params=list(study=study, count=TRUE, limit=0))
+num_samples <- getResponseNumMatches(count_samples)
+# Number of individuals
+count_individuals <- individualClient(OpencgaR = con, endpointName = "search", 
+                                      params=list(study=study, count=TRUE, limit=0))
+num_individuals <- getResponseNumMatches(count_individuals)
+# Number of clinical cases
+count_cases <- clinicalClient(OpencgaR = con, endpointName = "search", 
+                              params=list(study=study, count=TRUE, limit=0))
+num_cases <- getResponseNumMatches(count_cases)
+# Number of variants
+count_variants <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, count=TRUE, limit=0))
+num_variants <- getResponseNumMatches(count_variants)
+
+to_print <- "Study name: {study_name}
+            - Number of samples: {num_samples}
+            - Number of individuals: {num_individuals}
+            - Number of cases: {num_cases}
+            - Number of variants: {num_variants}"
+glue(to_print)
+
+
+

Extracting information about variants and biomarkers of +interest

+
+

Fetch the samples containing a specific variant

+

As an example we are going to retrieve a random variant from the +database

+
# Retrieve the first variant
+variant_example <- variantClient(OpencgaR = con, endpointName = "query", 
+                                 params=list(study=study, limit=1, type="SNV"))
+variant_id <- getResponseResults(variant_example)[[1]][,"id"]
+glue("Variant example: {variant_id}")
+
+
+

Fetch the samples containing a specific variant

+
# Retrieve the samples that have this variant
+variant_result <- variantClient(OpencgaR = con, endpointName = "querySample", 
+                                params=list(study=study, variant=variant_id))
+
+glue("Number of samples with this variant: 
+     {getResponseAttributes(variant_result)$numTotalSamples}")
+data_keys <- unlist(getResponseResults(variant_result)[[1]][, "studies"][[1]][, "sampleDataKeys"])
+
+df <- getResponseResults(variant_result)[[1]][, "studies"][[1]][, "samples"][[1]] %>% 
+        select(-fileIndex) %>% unnest_wider(data, names_sep = "")
+colnames(df) <- c("samples", data_keys)
+df
+
+
+

Fetch samples by genotype

+
# Search for homozygous alternate samples
+genotype <- "1/1"
+variant_result <- variantClient(OpencgaR = con, endpointName = "querySample", 
+                                params=list(study=study, variant=variant_id, 
+                                            genotype=genotype))
+glue("Number of samples with genotype {genotype} in this variant: 
+     {getResponseAttributes(variant_result)$numTotalSamples}")
+
+
+

Retrieve variants by region

+
# Search for homozygous alternate samples
+region <- "1:62273600-62273700"
+region <- "11:119345500-119345600"
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, region=region, limit=100))
+
+glue("Number of variants in region {region}: {getResponseNumResults(variant_result)}")
+getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation)
+
+
+

Retrieve variants by feature

+

Variants can be filtered by gene using the parameters gene or +xref:

+
    +
  • gene: only accepts gene IDs
  • +
  • xref: accepts different IDs including gene, transcript, +dbSNP, … Remember you can pass different IDs using comma as +separator.
  • +
+
## Filter by gene
+genes <- "HCN3,MTOR"
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, gene=genes, limit=10))
+getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation)
+
## Filter by xref
+#snp <- "rs147394986"
+hgvs <- "NP_002747.2:p.Arg67Trp"
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, xref=hgvs, limit=5))
+getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation)
+
+
+

Retrieve variants by consequence type

+

OpenCGA provides a rich variant annotation that includes Ensembl +consequence types (https://m.ensembl.org/info/genome/variation/prediction/predicted_data.html). +You can filter by consequence type by using parameter ct. +You can provide a list of consequence type names separated by comma. +Also, an alias called lof filter by a combination of +loss-of-function terms.

+
## Filter by missense variants and stop_gained
+ct <- "missense_variant,stop_gained"
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, ct=ct, limit=5))
+glue("Number of missense and stop gained variants: {getResponseNumMatches(variant_result)}")
+getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation)
+
## Filter by LoF (alias created containing 9 different CTs)
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, ct="lof", limit=5))
+glue("Number of LoF variants: {getResponseNumMatches(variant_result)}")
+getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation)
+
+
+

Filter variants by population frequencies

+

OpenCGA allows to filter variants by population frequencies, +including:

+
    +
  • Minor Allele frequency (MAF) with the parameter +populationFrequencyMaf
  • +
  • Alternate Allele frequency (ALT) with the parameter +populationFrequencyAlt
  • +
  • Reference Allele frequency with the parameter +populationFrequencyRef
  • +
+

The population frequency studies indexed in OpenCGA include different +sources such as genomAD or 1000 +Genomes.

+

The syntax for the query parameter is: +{study}:{population}:{cohort}[<|>|<=|>=]{proportion}. +Note that you can specify several populations separated by comma (OR) or +by semi-colon (AND), e.g. for all variants less than 1% in the two +studies we should use +1kG_phase3:ALL<0.01;GNOMAD_GENOMES:ALL<0.01

+
## Filter by population alternate frequency
+population_frequency_alt <- '1000G:ALL<0.001'
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, 
+                                            populationFrequencyAlt=population_frequency_alt, 
+                                            limit=5))
+glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}")
+# getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation)
+
## Filter by two population alternate frequency
+## Remember to use commas for OR and semi-colon for AND
+population_frequency_alt <- '1000G:ALL<0.001;GNOMAD_GENOMES:ALL<0.001'
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, 
+                                            populationFrequencyAlt=population_frequency_alt, 
+                                            limit=5))
+glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}")
+
+getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation)
+
## Filter by population alternate frequency using a range of values
+population_frequency_alt <- '1000G:ALL>0.001;1000G:ALL<0.005'
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, 
+                                            populationFrequencyAlt=population_frequency_alt, 
+                                            limit=5))
+glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}")
+
+# getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation)
+
+
+

Complex variant queries

+

OpenCGA implements a very advanced variant query engine that allows +to combine many filters to build very complex and useful queries. In +this section you will find some examples.

+
## Filter by Consequence Type, Clinical Significance and population frequency
+ct <- 'lof,missense_variant'
+clinicalSignificance <- 'likely_pathogenic,pathogenic'
+populationFrequencyAlt <- '1000G:ALL<0.01;GNOMAD_GENOMES:ALL<0.01'
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, limit=5, ct=ct, 
+                                            clinicalSignificance=clinicalSignificance,
+                                            populationFrequencyAlt=population_frequency_alt))
+glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}")
+
+getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation)
+
+
+

Filter variants using cohort information

+

OpenCGA allows users to define cohorts of samples and calculate and +index the allele and genotype frequencies among other stats. By default, +a cohort called “ALL” containing all samples is defined and the variant +stats are calculated. You can filter by the internal cohort stats using +the parameter cohortStatsAlt and pass the study and the +cohort you would like to filter by. Format: +cohortStatsAlt={study}:{cohort}[<|>|<=|>=]{proportion} +Note that any cohorts created will be shared among the studies belonging +to the same project.

+
## Filter by cohort ALL frequency
+cohort_stats <- paste0(study, ':ALL<0.001')
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, cohortStatsAlt=cohort_stats, 
+                                            limit=5))
+glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}")
+
+# getResponseResults(variant_result)[[1]] %>% select(-names, -studies, -annotation)
+

The following examples are just examples of how queries should be +made, they are not intended to be executed since the custom cohorts have +not been created.

+
## Filter by custom cohorts' frequency
+cohort_stats = study + ':MY_COHORT_A<0.001'
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, cohortStatsAlt=cohort_stats, 
+                                            limit=5))
+glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}")
+
+## Filter by more than one cohort frequency and consequence type
+cohort_stats = study + ':MY_COHORT_A<0.001' + ';' + study + ':MY_COHORT_B<0.001'
+variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, cohortStatsAlt=cohort_stats, 
+                                            limit=5))
+glue("Number of variants matching the filter: {getResponseNumMatches(variant_result)}")
+
+
+

Retrieve cohort frequencies for a specific variant

+
variant_result <- variantClient(OpencgaR = con, endpointName = "query", 
+                                params=list(study=study, id=variant_id))
+glue("Variant example: {variant_id}")
+getResponseResults(variant_result)[[1]]$studies[[1]]$stats[[1]][,c('cohortId', 'alleleCount',
+                                                              'altAlleleCount', 'altAlleleFreq')]
+
+
+
+

Aggregated stats

+
+

Number of LoF variants per gene

+
## Aggregate by number of LoF variants per gene
+variants_agg <- variantClient(OpencgaR = con, endpointName = "aggregationStats", 
+                              params=list(study=study, ct='lof', fields="genes"))
+df <- getResponseResults(variants_agg)[[1]]$buckets[[1]]
+barplot(height = df$count, names.arg = df$value, las=2, cex.names = 0.6)
+
+
+ + + + + + + + + + +