From fa99619b6ec0d316f57fe0ac425471eb8175e918 Mon Sep 17 00:00:00 2001 From: imedina Date: Thu, 19 May 2022 01:54:41 +0100 Subject: [PATCH 01/32] Increment version to 2.3.1-dev --- package.json | 2 +- src/sites/api/conf/config.js | 2 +- src/sites/iva/conf/config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 1cef52558e..09d3d6644f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jsorolla", - "version": "2.3.0", + "version": "2.3.1-dev", "description": "JSorolla is a JavaScript bioinformatic library for data analysis and genomics visualization", "repository": { "type": "git", diff --git a/src/sites/api/conf/config.js b/src/sites/api/conf/config.js index a520c062c1..4170609324 100644 --- a/src/sites/api/conf/config.js +++ b/src/sites/api/conf/config.js @@ -36,7 +36,7 @@ const opencga = { const SUITE = { id: "suite", name: "OpenCB Suite", - version: "v2.3.0", + version: "v2.3.1-dev", logo: "img/iva-white.svg", companyLogo: "", logoAlt: "img/iva.svg", diff --git a/src/sites/iva/conf/config.js b/src/sites/iva/conf/config.js index 34a0d2d05f..0fb59070f1 100644 --- a/src/sites/iva/conf/config.js +++ b/src/sites/iva/conf/config.js @@ -167,7 +167,7 @@ const CATALOG_NAVBAR_MENU = { const SUITE = { id: "suite", name: "OpenCB Suite", - version: "v2.3.0", + version: "v2.3.1-dev", logo: "img/iva-white.svg", companyLogo: "", logoAlt: "img/iva.svg", From 872757790868f9a03f32291c7a1351042cd818fb Mon Sep 17 00:00:00 2001 From: imedina Date: Sun, 22 May 2022 02:14:14 +0100 Subject: [PATCH 02/32] clients: opdate OpenCGA client code with the latest OpenCGA 2.3.0 --- src/core/clients/opencga/api/Admin.js | 10 +- src/core/clients/opencga/api/Alignment.js | 52 ++-- src/core/clients/opencga/api/Clinical.js | 246 +++++++++++------- src/core/clients/opencga/api/Cohort.js | 81 +++--- src/core/clients/opencga/api/DiseasePanel.js | 90 ++++--- src/core/clients/opencga/api/Family.js | 72 ++--- src/core/clients/opencga/api/File.js | 85 +++--- src/core/clients/opencga/api/GA4GH.js | 18 +- src/core/clients/opencga/api/Individual.js | 115 ++++---- src/core/clients/opencga/api/Job.js | 37 +-- src/core/clients/opencga/api/Meta.js | 18 +- src/core/clients/opencga/api/Project.js | 28 +- src/core/clients/opencga/api/Sample.js | 98 ++++--- src/core/clients/opencga/api/Study.js | 79 ++++-- src/core/clients/opencga/api/User.js | 27 +- src/core/clients/opencga/api/Variant.js | 135 +++++++--- .../clients/opencga/api/VariantOperation.js | 150 ++++++++++- 17 files changed, 884 insertions(+), 457 deletions(-) diff --git a/src/core/clients/opencga/api/Admin.js b/src/core/clients/opencga/api/Admin.js index 7746379644..ff3e8ac050 100644 --- a/src/core/clients/opencga/api/Admin.js +++ b/src/core/clients/opencga/api/Admin.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -115,4 +115,4 @@ export default class Admin extends OpenCGAParentClass { return this._post("admin", null, "users", null, "sync", data); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/Alignment.js b/src/core/clients/opencga/api/Alignment.js index 0a74d31152..8fad488987 100644 --- a/src/core/clients/opencga/api/Alignment.js +++ b/src/core/clients/opencga/api/Alignment.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -62,6 +62,21 @@ export default class Alignment extends OpenCGAParentClass { return this._post("analysis", null, "alignment/coverage/index", null, "run", data, params); } + /** Compute gene coverage stats for a given alignment file and a list of genes + * @param {Object} data - Gene coverage stats parameters for a given BAM file and a list of genes. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.study] - study. + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobTags] - Job tags. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + coverageQcGeneCoverageStatsRun(data, params) { + return this._post("analysis", null, "alignment/coverage/qc/geneCoverageStats", null, "run", data, params); + } + /** Query the coverage of an alignment file for regions or genes * @param {String} file - File ID. * @param {Object} [params] - The Object containing the following optional parameters: @@ -113,7 +128,7 @@ export default class Alignment extends OpenCGAParentClass { /** Deeptools is a suite of python tools particularly developed for the efficient analysis of high-throughput sequencing data, such as * ChIP-seq, RNA-seq or MNase-seq. - * @param {Object} data - Deeptools parameters. + * @param {Object} data - Deeptools parameters. Supported Deeptools commands: bamCoverage, bamCompare. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - study. * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not @@ -159,7 +174,7 @@ export default class Alignment extends OpenCGAParentClass { /** Picard is a set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) data and formats such as * SAM/BAM/CRAM and VCF. Supported Picard commands: CollectHsMetrics, CollectWgsMetrics, BedToIntervalList - * @param {Object} data - Picard parameters. + * @param {Object} data - Picard parameters. Supported Picard commands: CollectHsMetrics, CollectWgsMetrics, BedToIntervalList. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - study. * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not @@ -173,24 +188,10 @@ export default class Alignment extends OpenCGAParentClass { return this._post("analysis", null, "alignment/picard", null, "run", data, params); } - /** Compute gene coverage stats for a given alignment file and a list of genes - * @param {Object} data - Gene coverage stats parameters for a given BAM file and a list of genes. - * @param {Object} [params] - The Object containing the following optional parameters: - * @param {String} [params.study] - study. - * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not - * provided. - * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. - * @param {String} [params.jobDescription] - Job description. - * @param {String} [params.jobTags] - Job tags. - * @returns {Promise} Promise object in the form of RestResponse instance. - */ - genecoveragestatsQc(data, params) { - return this._post("analysis", null, "alignment/qc", null, "genecoveragestats", data, params); - } - /** Compute quality control (QC) metrics for a given alignment file (including samtools stats, samtools flag stats, FastQC and HS metrics) - * @param {Object} data - Alignment quality control (QC) parameters. The BAM file is mandatory ever but the BED file and the dictionary - * files are only mandatory for computing hybrid-selection (HS) metrics. + * @param {Object} data - Alignment quality control (QC) parameters. It computes: stats, flag stats, fastqc and hybrid-selection metrics. + * The BAM file is mandatory ever but the BED fileand the dictionary files are only mandatory for computing hybrid-selection (HS) + * metrics. In order to skip some metrics, use the following keywords (separated by commas): stats, flagstats, fastqc and hsmetrics. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - study. * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not @@ -235,7 +236,8 @@ export default class Alignment extends OpenCGAParentClass { /** Samtools is a program for interacting with high-throughput sequencing data in SAM, BAM and CRAM formats. Supported Samtools commands: * sort, index, view, stats, flagstat, dict, faidx, depth, plot-bamstats - * @param {Object} data - Samtoolstools parameters. + * @param {Object} data - Samtools parameters. Supported Samtools commands: sort, index, view, stats, flagstat, dict, faidx, depth, plot- + * bamstats. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - study. * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not @@ -249,4 +251,4 @@ export default class Alignment extends OpenCGAParentClass { return this._post("analysis", null, "alignment/samtools", null, "run", data, params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/Clinical.js b/src/core/clients/opencga/api/Clinical.js index 7bdecf6afd..bb2889c3ed 100644 --- a/src/core/clients/opencga/api/Clinical.js +++ b/src/core/clients/opencga/api/Clinical.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -46,12 +46,26 @@ export default class Clinical extends OpenCGAParentClass { return this._post("analysis", null, "clinical/acl", members, "update", data, {action, ...params}); } + /** Update Clinical Analysis configuration. + * @param {Object} [data] - Configuration params to update. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + updateClinicalConfiguration(data, params) { + return this._post("analysis", null, "clinical/clinical/configuration", null, "update", data, params); + } + /** Create a new clinical analysis * @param {Object} data - JSON containing clinical analysis information. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {Boolean} [params.createDefaultInterpretation] - Flag to create and initialise a default primary interpretation (Id will be - * '{clinicalAnalysisId}.1'). + * @param {Boolean} [params.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. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ create(data, params) { @@ -62,24 +76,31 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} field - Field for which to obtain the distinct values. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [params.id] - Clinical analysis ID. - * @param {String} [params.type] - Clinical analysis type. - * @param {String} [params.priority] - Priority. - * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {String} [params.internalStatus] - Filter by internal status. + * @param {String} [params.id] - Comma separated list of Clinical Analysis IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list of Clinical Analysis UUIDs up to a maximum of 100. + * @param {String} [params.type] - Clinical Analysis type. + * @param {String} [params.disorder] - Clinical Analysis disorder. + * @param {String} [params.files] - Clinical Analysis files. + * @param {String} [params.sample] - Sample associated to the proband or any member of a family. + * @param {String} [params.individual] - Proband or any member of a family. + * @param {String} [params.proband] - Clinical Analysis proband. + * @param {String} [params.probandSamples] - Clinical Analysis proband samples. + * @param {String} [params.family] - Clinical Analysis family. + * @param {String} [params.familyMembers] - Clinical Analysis family members. + * @param {String} [params.familyMemberSamples] - Clinical Analysis family members samples. + * @param {String} [params.panels] - Clinical Analysis panels. + * @param {Boolean} [params.locked] - Locked Clinical Analyses. + * @param {String} [params.analystId] - Clinical Analysis analyst id. + * @param {String} [params.priority] - Clinical Analysis priority. + * @param {String} [params.flags] - Clinical Analysis flags. + * @param {String} [params.creationDate] - Clinical Analysis Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. + * @param {String} [params.modificationDate] - Clinical Analysis Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, + * <201805. + * @param {String} [params.qualityControlSummary] - Clinical Analysis quality control summary. + * @param {String} [params.release] - Release when it was created. * @param {String} [params.status] - Filter by status. - * @param {String} [params.dueDate] - Due date (Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805...). - * @param {String} [params.description] - Description. - * @param {String} [params.family] - Family id. - * @param {String} [params.proband] - Proband id. - * @param {String} [params.sample] - Sample id associated to the proband or any member of a family. - * @param {String} [params.individual] - Proband id or any member id of a family. - * @param {String} [params.analystAssignee] - Clinical analyst assignee. - * @param {String} [params.disorder] - Disorder ID or name. - * @param {String} [params.flags] - Flags. - * @param {String} [params.release] - Release value. - * @param {String} [params.attributes] - Text attributes (Format: sex=male,age>20 ...). + * @param {String} [params.internalStatus] - Filter by internal status. + * @param {Boolean} [params.deleted] - Boolean to retrieve deleted entries. * @returns {Promise} Promise object in the form of RestResponse instance. */ distinct(field, params) { @@ -90,15 +111,20 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} field - Field for which to obtain the distinct values. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [params.id] - Interpretation ID. - * @param {String} [params.clinicalAnalysisId] - Clinical Analysis ID. - * @param {String} [params.analyst] - Clinical analyst ID. - * @param {String} [params.methods] - Interpretation method name. - * @param {String} [params.primaryFindings] - Primary finding IDs. - * @param {String} [params.secondaryFindings] - Secondary finding IDs. - * @param {String} [params.status] - Interpretation status. - * @param {String} [params.creationDate] - Creation date. - * @param {String} [params.modificationDate] - Modification date. + * @param {String} [params.id] - Comma separated list of Interpretation IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list of Interpretation UUIDs up to a maximum of 100. + * @param {String} [params.clinicalAnalysisId] - Clinical Analysis id. + * @param {String} [params.analystId] - Analyst ID. + * @param {String} [params.methodName] - Interpretation method name. + * @param {String} [params.panels] - Interpretation panels. + * @param {String} [params.primaryFindings] - Interpretation primary findings. + * @param {String} [params.secondaryFindings] - Interpretation secondary findings. + * @param {String} [params.creationDate] - Interpretation Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. + * @param {String} [params.modificationDate] - Interpretation Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, + * <201805. + * @param {String} [params.status] - Filter by status. + * @param {String} [params.internalStatus] - Filter by internal status. + * @param {String} [params.release] - Release when it was created. * @returns {Promise} Promise object in the form of RestResponse instance. */ distinctInterpretation(field, params) { @@ -113,15 +139,20 @@ export default class Clinical extends OpenCGAParentClass { * @param {Number} [params.skip] - Number of results to skip. * @param {Boolean} [params.sort] - Sort the results. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [params.id] - Interpretation ID. - * @param {String} [params.clinicalAnalysisId] - Clinical Analysis ID. - * @param {String} [params.analyst] - Clinical analyst ID. - * @param {String} [params.methods] - Interpretation method name. - * @param {String} [params.primaryFindings] - Primary finding IDs. - * @param {String} [params.secondaryFindings] - Secondary finding IDs. - * @param {String} [params.status] - Interpretation status. - * @param {String} [params.creationDate] - Creation date. - * @param {String} [params.modificationDate] - Modification date. + * @param {String} [params.id] - Comma separated list of Interpretation IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list of Interpretation UUIDs up to a maximum of 100. + * @param {String} [params.clinicalAnalysisId] - Clinical Analysis id. + * @param {String} [params.analystId] - Analyst ID. + * @param {String} [params.methodName] - Interpretation method name. + * @param {String} [params.panels] - Interpretation panels. + * @param {String} [params.primaryFindings] - Interpretation primary findings. + * @param {String} [params.secondaryFindings] - Interpretation secondary findings. + * @param {String} [params.creationDate] - Interpretation Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. + * @param {String} [params.modificationDate] - Interpretation Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, + * <201805. + * @param {String} [params.status] - Filter by status. + * @param {String} [params.internalStatus] - Filter by internal status. + * @param {String} [params.release] - Release when it was created. * @returns {Promise} Promise object in the form of RestResponse instance. */ searchInterpretation(params) { @@ -129,7 +160,7 @@ export default class Clinical extends OpenCGAParentClass { } /** Clinical interpretation information - * @param {String} [interpretations] - Comma separated list of clinical interpretation IDs up to a maximum of 100. + * @param {String} interpretations - Comma separated list of clinical interpretation IDs up to a maximum of 100. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. @@ -222,6 +253,7 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} [params.end] - Filter by end position. * @param {String} [params.transcriptId] - Filter by transcript id. * @param {String} [params.variants] - Filter by variant id. + * @param {String} [params.dbSnps] - Filter by DB_SNP id. * @param {String} [params.knockoutType] - Filter by knockout type. * @param {String} [params.filter] - Filter by filter (PASS, NOT_PASS). * @param {String} [params.type] - Filter by variant type. @@ -258,6 +290,7 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} [params.end] - Filter by end position. * @param {String} [params.transcriptId] - Filter by transcript id. * @param {String} [params.variants] - Filter by variant id. + * @param {String} [params.dbSnps] - Filter by DB_SNP id. * @param {String} [params.knockoutType] - Filter by knockout type. * @param {String} [params.filter] - Filter by filter (PASS, NOT_PASS). * @param {String} [params.type] - Filter by variant type. @@ -289,6 +322,7 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} [params.end] - Filter by end position. * @param {String} [params.transcriptId] - Filter by transcript id. * @param {String} [params.variants] - Filter by variant id. + * @param {String} [params.dbSnps] - Filter by DB_SNP id. * @param {String} [params.knockoutType] - Filter by knockout type. * @param {String} [params.filter] - Filter by filter (PASS, NOT_PASS). * @param {String} [params.type] - Filter by variant type. @@ -311,6 +345,8 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} [params.jobDescription] - Job description. * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. * @param {String} [params.jobTags] - Job tags. + * @param {Boolean} [params.auxiliarIndex = "false"] - Index auxiliar collection to improve performance assuming RGA is completely + * indexed. The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ runRgaIndex(data, params) { @@ -337,6 +373,7 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} [params.end] - Filter by end position. * @param {String} [params.transcriptId] - Filter by transcript id. * @param {String} [params.variants] - Filter by variant id. + * @param {String} [params.dbSnps] - Filter by DB_SNP id. * @param {String} [params.knockoutType] - Filter by knockout type. * @param {String} [params.filter] - Filter by filter (PASS, NOT_PASS). * @param {String} [params.type] - Filter by variant type. @@ -368,6 +405,7 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} [params.end] - Filter by end position. * @param {String} [params.transcriptId] - Filter by transcript id. * @param {String} [params.variants] - Filter by variant id. + * @param {String} [params.dbSnps] - Filter by DB_SNP id. * @param {String} [params.knockoutType] - Filter by knockout type. * @param {String} [params.filter] - Filter by filter (PASS, NOT_PASS). * @param {String} [params.type] - Filter by variant type. @@ -404,6 +442,7 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} [params.end] - Filter by end position. * @param {String} [params.transcriptId] - Filter by transcript id. * @param {String} [params.variants] - Filter by variant id. + * @param {String} [params.dbSnps] - Filter by DB_SNP id. * @param {String} [params.knockoutType] - Filter by knockout type. * @param {String} [params.filter] - Filter by filter (PASS, NOT_PASS). * @param {String} [params.type] - Filter by variant type. @@ -435,6 +474,7 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} [params.end] - Filter by end position. * @param {String} [params.transcriptId] - Filter by transcript id. * @param {String} [params.variants] - Filter by variant id. + * @param {String} [params.dbSnps] - Filter by DB_SNP id. * @param {String} [params.knockoutType] - Filter by knockout type. * @param {String} [params.filter] - Filter by filter (PASS, NOT_PASS). * @param {String} [params.type] - Filter by variant type. @@ -457,25 +497,31 @@ export default class Clinical extends OpenCGAParentClass { * @param {Boolean} [params.count = "false"] - Get the total number of results matching the query. Deactivated by default. The default * value is false. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [params.id] - Clinical analysis ID. - * @param {String} [params.type] - Clinical analysis type. - * @param {String} [params.priority] - Priority. - * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {String} [params.internalStatus] - Filter by internal status. + * @param {String} [params.id] - Comma separated list of Clinical Analysis IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list of Clinical Analysis UUIDs up to a maximum of 100. + * @param {String} [params.type] - Clinical Analysis type. + * @param {String} [params.disorder] - Clinical Analysis disorder. + * @param {String} [params.files] - Clinical Analysis files. + * @param {String} [params.sample] - Sample associated to the proband or any member of a family. + * @param {String} [params.individual] - Proband or any member of a family. + * @param {String} [params.proband] - Clinical Analysis proband. + * @param {String} [params.probandSamples] - Clinical Analysis proband samples. + * @param {String} [params.family] - Clinical Analysis family. + * @param {String} [params.familyMembers] - Clinical Analysis family members. + * @param {String} [params.familyMemberSamples] - Clinical Analysis family members samples. + * @param {String} [params.panels] - Clinical Analysis panels. + * @param {Boolean} [params.locked] - Locked Clinical Analyses. + * @param {String} [params.analystId] - Clinical Analysis analyst id. + * @param {String} [params.priority] - Clinical Analysis priority. + * @param {String} [params.flags] - Clinical Analysis flags. + * @param {String} [params.creationDate] - Clinical Analysis Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. + * @param {String} [params.modificationDate] - Clinical Analysis Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, + * <201805. + * @param {String} [params.qualityControlSummary] - Clinical Analysis quality control summary. + * @param {String} [params.release] - Release when it was created. * @param {String} [params.status] - Filter by status. - * @param {String} [params.dueDate] - Due date (Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805...). - * @param {String} [params.description] - Description. - * @param {String} [params.family] - Family id. - * @param {String} [params.proband] - Proband id. - * @param {String} [params.sample] - Sample id associated to the proband or any member of a family. - * @param {String} [params.individual] - Proband id or any member id of a family. - * @param {String} [params.analystAssignee] - Clinical analyst assignee. - * @param {String} [params.disorder] - Disorder ID or name. - * @param {String} [params.flags] - Flags. - * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. - * @param {String} [params.release] - Release value. - * @param {String} [params.attributes] - Text attributes (Format: sex=male,age>20 ...). + * @param {String} [params.internalStatus] - Filter by internal status. + * @param {Boolean} [params.deleted] - Boolean to retrieve deleted entries. * @returns {Promise} Promise object in the form of RestResponse instance. */ search(params) { @@ -520,11 +566,11 @@ export default class Clinical extends OpenCGAParentClass { * [{file}:]{key}{op}{value}[,;]* . 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. * @param {String} [params.sample] - Filter variants by sample genotype. This will automatically set 'includeSample' parameter when not - * provided. This filter accepts multiple 3 form: 1) List of samples: Samples that contain the main variant. Accepts AND (;) and OR (,) + * 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 and MISS e.g. + * 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: [ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, * mendelianError, compoundHeterozygous ]. Value is case insensitive. e.g. HG0097:DeNovo Sample must have parents defined and indexed. . @@ -551,7 +597,8 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} [params.familyProband] - Specify the proband child to use for the family segregation. * @param {String} [params.gene] - List of genes, most gene IDs are accepted (HGNC, Ensembl gene, ...). This is an alias to 'xref' * parameter. - * @param {String} [params.ct] - List of SO consequence types, e.g. missense_variant,stop_lost or SO:0001583,SO:0001578. + * @param {String} [params.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'. * @param {String} [params.xref] - List of any external reference, these can be genes, proteins or variants. Accepted IDs include HGNC, * Ensembl genes, dbSNP, ClinVar, HPO, Cosmic, ... * @param {String} [params.biotype] - List of biotypes, e.g. protein_coding. @@ -565,8 +612,8 @@ export default class Clinical extends OpenCGAParentClass { * 1kG_phase3:ALL<0.01. * @param {String} [params.populationFrequencyMaf] - Population minor allele frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. * 1kG_phase3:ALL<0.01. - * @param {String} [params.transcriptFlag] - List of transcript annotation flags. e.g. CCDS, basic, cds_end_NF, mRNA_end_NF, - * cds_start_NF, mRNA_start_NF, seleno. + * @param {String} [params.transcriptFlag] - List of transcript flags. e.g. canonical, CCDS, basic, LRG, MANE Select, MANE Plus Clinical, + * EGLH_HaemOnc, TSO500. * @param {String} [params.geneTraitId] - List of gene trait association id. e.g. "umls:C0007222" , "OMIM:269600". * @param {String} [params.go] - List of GO (Gene Ontology) terms. e.g. "GO:0002020". * @param {String} [params.expression] - List of tissues of interest. e.g. "lung". @@ -574,9 +621,22 @@ export default class Clinical extends OpenCGAParentClass { * @param {String} [params.drug] - List of drug names. * @param {String} [params.functionalScore] - Functional score: {functional_score}[<|>|<=|>=]{number} e.g. cadd_scaled>5.2 , * cadd_raw<=0.3. + * @param {String} [params.clinical] - Clinical source: clinvar, cosmic. * @param {String} [params.clinicalSignificance] - Clinical significance: benign, likely_benign, likely_pathogenic, pathogenic. + * @param {Boolean} [params.clinicalConfirmedStatus] - Clinical confirmed status. * @param {String} [params.customAnnotation] - Custom annotation: {key}[<|>|<=|>=]{number} or {key}[~=|=]{text}. * @param {String} [params.panel] - Filter by genes from the given disease panel. + * @param {String} [params.panelModeOfInheritance] - Filter genes from specific panels that match certain mode of inheritance. Accepted + * values : [ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, mendelianError, + * compoundHeterozygous ]. + * @param {String} [params.panelConfidence] - Filter genes from specific panels that match certain confidence. Accepted values : [ high, + * medium, low, rejected ]. + * @param {String} [params.panelRoleInCancer] - Filter genes from specific panels that match certain role in cancer. Accepted values : [ + * both, oncogene, tumorSuppressorGene, fusion ]. + * @param {String} [params.panelFeatureType] - Filter elements from specific panels by type. Accepted values : [ gene, region, str, + * variant ]. + * @param {Boolean} [params.panelIntersection] - Intersect panel genes and regions with given genes and regions from que input query. + * This will prevent returning variants from regions out of the panel. * @param {String} [params.trait] - List of traits, based on ClinVar, HPO, COSMIC, i.e.: IDs, histologies, descriptions,... * @returns {Promise} Promise object in the form of RestResponse instance. */ @@ -598,7 +658,7 @@ export default class Clinical extends OpenCGAParentClass { } /** Delete clinical analyses - * @param {String} [clinicalAnalyses] - Comma separated list of clinical analysis IDs or names up to a maximum of 100. + * @param {String} clinicalAnalyses - Comma separated list of clinical analysis IDs or names up to a maximum of 100. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {Boolean} [params.force = "false"] - Force deletion if the ClinicalAnalysis contains interpretations or is locked. The default @@ -610,9 +670,11 @@ export default class Clinical extends OpenCGAParentClass { } /** Update clinical analysis attributes - * @param {String} [clinicalAnalyses] - Comma separated list of clinical analysis IDs. + * @param {String} clinicalAnalyses - Comma separated list of clinical analysis IDs. * @param {Object} data - JSON containing clinical analysis information. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {"ADD"|"REMOVE"|"REPLACE"} [params.commentsAction = "ADD"] - Action to be performed if the array of comments is being updated. * The default value is ADD. @@ -620,6 +682,10 @@ export default class Clinical extends OpenCGAParentClass { * default value is ADD. * @param {"ADD"|"SET"|"REMOVE"} [params.filesAction = "ADD"] - Action to be performed if the array of files is being updated. The * default value is ADD. + * @param {"ADD"|"SET"|"REMOVE"} [params.panelsAction = "ADD"] - Action to be performed if the array of panels is being updated. The + * default value is ADD. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ update(clinicalAnalyses, data, params) { @@ -627,7 +693,7 @@ export default class Clinical extends OpenCGAParentClass { } /** Clinical analysis info - * @param {String} [clinicalAnalysis] - Comma separated list of clinical analysis IDs or names up to a maximum of 100. + * @param {String} clinicalAnalysis - Comma separated list of clinical analysis IDs or names up to a maximum of 100. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. @@ -640,11 +706,15 @@ export default class Clinical extends OpenCGAParentClass { } /** Create a new Interpretation - * @param {String} [clinicalAnalysis] - Clinical analysis ID. + * @param {String} clinicalAnalysis - Clinical analysis ID. * @param {Object} data - JSON containing clinical interpretation information. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - [[user@]project:]study id. * @param {"PRIMARY"|"SECONDARY"} [params.setAs = "SECONDARY"] - Set interpretation as. The default value is SECONDARY. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ createInterpretation(clinicalAnalysis, data, params) { @@ -652,8 +722,8 @@ export default class Clinical extends OpenCGAParentClass { } /** Clear the fields of the main interpretation of the Clinical Analysis - * @param {String} [interpretations] - Interpretation IDs of the Clinical Analysis. - * @param {String} [clinicalAnalysis] - Clinical analysis ID. + * @param {String} interpretations - Interpretation IDs of the Clinical Analysis. + * @param {String} clinicalAnalysis - Clinical analysis ID. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - [[user@]project:]study ID. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -663,8 +733,8 @@ export default class Clinical extends OpenCGAParentClass { } /** Delete interpretation - * @param {String} [clinicalAnalysis] - Clinical analysis ID. - * @param {String} [interpretations] - Interpretation IDs of the Clinical Analysis. + * @param {String} clinicalAnalysis - Clinical analysis ID. + * @param {String} interpretations - Interpretation IDs of the Clinical Analysis. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - [[user@]project:]study ID. * @param {String} [params.setAsPrimary] - Interpretation id to set as primary from the list of secondaries in case of deleting the @@ -675,23 +745,9 @@ export default class Clinical extends OpenCGAParentClass { return this._delete("analysis/clinical", clinicalAnalysis, "interpretation", interpretations, "delete", params); } - /** Merge interpretation - * @param {String} [clinicalAnalysis] - Clinical analysis ID. - * @param {String} [interpretation] - Interpretation ID where it will be merged. - * @param {Object} [data] - JSON containing clinical interpretation to merge from. - * @param {Object} [params] - The Object containing the following optional parameters: - * @param {String} [params.study] - [[user@]project:]study ID. - * @param {String} [params.secondaryInterpretationId] - Secondary Interpretation ID to merge from. - * @param {String} [params.findings] - Comma separated list of findings to merge. If not provided, all findings will be merged. - * @returns {Promise} Promise object in the form of RestResponse instance. - */ - mergeInterpretation(clinicalAnalysis, interpretation, data, params) { - return this._post("analysis/clinical", clinicalAnalysis, "interpretation", interpretation, "merge", data, params); - } - /** Revert to a previous interpretation version - * @param {String} [clinicalAnalysis] - Clinical analysis ID. - * @param {String} [interpretation] - Interpretation ID. + * @param {String} clinicalAnalysis - Clinical analysis ID. + * @param {String} interpretation - Interpretation ID. * @param {Number} version - Version to revert to. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - [[user@]project:]study ID. @@ -702,10 +758,12 @@ export default class Clinical extends OpenCGAParentClass { } /** Update interpretation fields - * @param {String} [clinicalAnalysis] - Clinical analysis ID. - * @param {String} [interpretation] - Interpretation ID. + * @param {String} clinicalAnalysis - Clinical analysis ID. + * @param {String} interpretation - Interpretation ID. * @param {Object} data - JSON containing clinical interpretation information. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - [[user@]project:]study ID. * @param {"ADD"|"SET"|"REMOVE"|"REPLACE"} [params.primaryFindingsAction = "ADD"] - Action to be performed if the array of primary * findings is being updated. The default value is ADD. @@ -715,11 +773,15 @@ export default class Clinical extends OpenCGAParentClass { * findings is being updated. The default value is ADD. * @param {"ADD"|"REMOVE"|"REPLACE"} [params.commentsAction = "ADD"] - 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. The default value is ADD. + * @param {"ADD"|"SET"|"REMOVE"} [params.panelsAction = "ADD"] - Action to be performed if the array of panels is being updated. The + * default value is ADD. * @param {"PRIMARY"|"SECONDARY"} [params.setAs] - Set interpretation as. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ updateInterpretation(clinicalAnalysis, interpretation, data, params) { return this._post("analysis/clinical", clinicalAnalysis, "interpretation", interpretation, "update", data, params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/Cohort.js b/src/core/clients/opencga/api/Cohort.js index 4e321c6b92..60ab56dfb8 100644 --- a/src/core/clients/opencga/api/Cohort.js +++ b/src/core/clients/opencga/api/Cohort.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -84,9 +84,13 @@ export default class Cohort extends OpenCGAParentClass { /** Create a cohort * @param {Object} data - JSON containing cohort information. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {String} [params.variableSet] - Deprecated: Use /generate web service and filter by annotation. * @param {String} [params.variable] - Deprecated: Use /generate web service and filter by annotation. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ create(data, params) { @@ -97,20 +101,20 @@ export default class Cohort extends OpenCGAParentClass { * @param {String} field - Field for which to obtain the distinct values. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} [params.id] - Comma separated list of cohort IDs up to a maximum of 100. + * @param {String} [params.name] - Comma separated list of cohort names up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list of cohort IDs up to a maximum of 100. * @param {String} [params.type] - Cohort type. - * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted cohorts. The default value is false. - * @param {String} [params.internalStatus] - Filter by internal status. - * @param {String} [params.status] - Filter by status. - * @param {String} [params.annotation] - Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit - * http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0. - * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. - * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS - * permissions. Only study owners or administrators can query by this field. . - * @param {String} [params.samples] - Sample list. + * @param {String} [params.creationDate] - creationDate. + * @param {String} [params.modificationDate] - modificationDate. + * @param {Boolean} [params.deleted] - deleted. + * @param {String} [params.status] - status. + * @param {String} [params.internalStatus] - internalStatus. + * @param {String} [params.annotation] - Cohort annotation. + * @param {String} [params.acl] - acl. + * @param {String} [params.samples] - Cohort sample IDs. * @param {String} [params.numSamples] - Number of samples. - * @param {String} [params.release] - Release value. + * @param {String} [params.release] - release. * @returns {Promise} Promise object in the form of RestResponse instance. */ distinct(field, params) { @@ -120,6 +124,8 @@ export default class Cohort extends OpenCGAParentClass { /** Create a cohort based on a sample query * @param {Object} data - JSON containing cohort information. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {String} [params.id] - Comma separated list sample IDs or UUIDs up to a maximum of 100. * @param {Boolean} [params.somatic] - Somatic sample. @@ -137,6 +143,8 @@ export default class Cohort extends OpenCGAParentClass { * permissions. Only study owners or administrators can query by this field. . * @param {String} [params.release] - Release when it was created. * @param {Number} [params.snapshot] - Snapshot value (Latest version of the entry in the specified release). + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ generate(data, params) { @@ -153,21 +161,20 @@ export default class Cohort extends OpenCGAParentClass { * value is false. * @param {Boolean} [params.flattenAnnotations = "false"] - Flatten the annotations?. The default value is false. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [params.name] - DEPRECATED: Name of the cohort. + * @param {String} [params.id] - Comma separated list of cohort IDs up to a maximum of 100. + * @param {String} [params.name] - Comma separated list of cohort names up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list of cohort IDs up to a maximum of 100. * @param {String} [params.type] - Cohort type. - * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted cohorts. The default value is false. - * @param {String} [params.internalStatus] - Filter by internal status. - * @param {String} [params.status] - Filter by status. - * @param {String} [params.annotation] - Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit - * http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0. - * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. - * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS - * permissions. Only study owners or administrators can query by this field. . - * @param {String} [params.samples] - Sample list. + * @param {String} [params.creationDate] - creationDate. + * @param {String} [params.modificationDate] - modificationDate. + * @param {Boolean} [params.deleted] - deleted. + * @param {String} [params.status] - status. + * @param {String} [params.internalStatus] - internalStatus. + * @param {String} [params.annotation] - Cohort annotation. + * @param {String} [params.acl] - acl. + * @param {String} [params.samples] - Cohort sample IDs. * @param {String} [params.numSamples] - Number of samples. - * @param {String} [params.release] - Release value. + * @param {String} [params.release] - release. * @returns {Promise} Promise object in the form of RestResponse instance. */ search(params) { @@ -175,7 +182,7 @@ export default class Cohort extends OpenCGAParentClass { } /** Return the acl of the cohort. If member is provided, it will only return the acl for the member. - * @param {String} cohorts - Comma separated list of cohort names or IDs up to a maximum of 100. + * @param {String} cohorts - Comma separated list of cohort IDs or UUIDs up to a maximum of 100. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {String} [params.member] - User or group id. @@ -188,7 +195,7 @@ export default class Cohort extends OpenCGAParentClass { } /** Delete cohorts - * @param {String} [cohorts] - Comma separated list of cohort ids. + * @param {String} cohorts - Comma separated list of cohort ids. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -198,7 +205,7 @@ export default class Cohort extends OpenCGAParentClass { } /** Get cohort information - * @param {String} cohorts - Comma separated list of cohort names or IDs up to a maximum of 100. + * @param {String} cohorts - Comma separated list of cohort IDs or UUIDs up to a maximum of 100. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. @@ -215,11 +222,15 @@ export default class Cohort extends OpenCGAParentClass { * @param {String} cohorts - Comma separated list of cohort ids. * @param {Object} [data] - body. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {"ADD"|"SET"|"REMOVE"} [params.samplesAction = "ADD"] - Action to be performed if the array of samples is being updated. The * default value is ADD. * @param {"ADD"|"SET"|"REMOVE"} [params.annotationSetsAction = "ADD"] - Action to be performed if the array of annotationSets is being * updated. The default value is ADD. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ update(cohorts, data, params) { @@ -228,7 +239,7 @@ export default class Cohort extends OpenCGAParentClass { /** Update annotations from an annotationSet * @param {String} cohort - Cohort ID. - * @param {String} [annotationSet] - AnnotationSet ID to be updated. + * @param {String} annotationSet - AnnotationSet ID to be updated. * @param {Object} [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. @@ -240,8 +251,8 @@ export default class Cohort extends OpenCGAParentClass { * VariableSet if any. The default value is ADD. * @returns {Promise} Promise object in the form of RestResponse instance. */ - updateAnnotations(cohort, annotationSet, data, params) { + updateAnnotationSetsAnnotations(cohort, annotationSet, data, params) { return this._post("cohorts", cohort, "annotationSets", annotationSet, "annotations/update", data, params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/DiseasePanel.js b/src/core/clients/opencga/api/DiseasePanel.js index 128d31ed8b..7f9fc821be 100644 --- a/src/core/clients/opencga/api/DiseasePanel.js +++ b/src/core/clients/opencga/api/DiseasePanel.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -47,11 +47,11 @@ export default class DiseasePanel extends OpenCGAParentClass { /** Create a panel * @param {Object} [data] - Panel parameters. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [params.source] - Comma separated list of sources to import panels from. Current supported sources are 'panelapp' and - * 'cancer-gene-census'. - * @param {String} [params.id] - Comma separated list of panel IDs to be imported from the defined source.If 'source' is provided and - * 'id' is empty, it will import all the panels from the source. When 'id' is provided, only one 'source' will be allowed. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ create(data, params) { @@ -62,30 +62,46 @@ export default class DiseasePanel extends OpenCGAParentClass { * @param {String} field - Field for which to obtain the distinct values. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [params.name] - Panel name. - * @param {String} [params.phenotypes] - Panel phenotypes. - * @param {String} [params.variants] - Panel variants. - * @param {String} [params.genes] - Panel genes. - * @param {String} [params.regions] - Panel regions. - * @param {String} [params.categories] - Panel categories. + * @param {String} [params.id] - Comma separated list of panel IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list of panel UUIDs up to a maximum of 100. + * @param {String} [params.name] - Comma separated list of panel names up to a maximum of 100. + * @param {String} [params.internalStatus] - Filter by internal status. + * @param {String} [params.disorders] - Comma separated list of disorder ids or names. + * @param {String} [params.variants] - Comma separated list of variant ids. + * @param {String} [params.genes] - Comma separated list of gene ids. + * @param {String} [params.regions] - Comma separated list of regions. + * @param {String} [params.categories] - Comma separated list of category names. * @param {String} [params.tags] - Panel tags. - * @param {String} [params.description] - Panel description. - * @param {String} [params.author] - Panel author. - * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted panels. The default value is false. + * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. * @param {String} [params.status] - Filter by status. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS * permissions. Only study owners or administrators can query by this field. . - * @param {String} [params.release] - Release value (Current release from the moment the samples were first created). - * @param {Number} [params.snapshot] - Snapshot value (Latest version of samples in the specified release). + * @param {String} [params.release] - Release when it was created. + * @param {Number} [params.snapshot] - Snapshot value (Latest version of the entry in the specified release). * @returns {Promise} Promise object in the form of RestResponse instance. */ distinct(field, params) { return this._get("panels", null, null, null, "distinct", {field, ...params}); } + /** Import panels + * @param {Object} [data] - Panel parameters. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobTags] - Job tags. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + importPanels(data, params) { + return this._post("panels", null, null, null, "import", data, params); + } + /** Panel search * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. @@ -95,24 +111,25 @@ export default class DiseasePanel extends OpenCGAParentClass { * @param {Boolean} [params.count = "false"] - Get the total number of results matching the query. Deactivated by default. The default * value is false. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [params.name] - Panel name. - * @param {String} [params.phenotypes] - Panel phenotypes. - * @param {String} [params.variants] - Panel variants. - * @param {String} [params.genes] - Panel genes. - * @param {String} [params.regions] - Panel regions. - * @param {String} [params.categories] - Panel categories. + * @param {String} [params.id] - Comma separated list of panel IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list of panel UUIDs up to a maximum of 100. + * @param {String} [params.name] - Comma separated list of panel names up to a maximum of 100. + * @param {String} [params.internalStatus] - Filter by internal status. + * @param {String} [params.disorders] - Comma separated list of disorder ids or names. + * @param {String} [params.variants] - Comma separated list of variant ids. + * @param {String} [params.genes] - Comma separated list of gene ids. + * @param {String} [params.regions] - Comma separated list of regions. + * @param {String} [params.categories] - Comma separated list of category names. * @param {String} [params.tags] - Panel tags. - * @param {String} [params.description] - Panel description. - * @param {String} [params.author] - Panel author. - * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted panels. The default value is false. + * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. * @param {String} [params.status] - Filter by status. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS * permissions. Only study owners or administrators can query by this field. . - * @param {String} [params.release] - Release value (Current release from the moment the samples were first created). - * @param {Number} [params.snapshot] - Snapshot value (Latest version of samples in the specified release). + * @param {String} [params.release] - Release when it was created. + * @param {Number} [params.snapshot] - Snapshot value (Latest version of the entry in the specified release). * @returns {Promise} Promise object in the form of RestResponse instance. */ search(params) { @@ -133,7 +150,7 @@ export default class DiseasePanel extends OpenCGAParentClass { } /** Delete existing panels - * @param {String} [panels] - Comma separated list of panel ids. + * @param {String} panels - Comma separated list of panel ids. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -143,7 +160,7 @@ export default class DiseasePanel extends OpenCGAParentClass { } /** Panel info - * @param {String} [panels] - Comma separated list of panel IDs up to a maximum of 100. + * @param {String} panels - Comma separated list of panel IDs up to a maximum of 100. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. @@ -158,15 +175,18 @@ export default class DiseasePanel extends OpenCGAParentClass { } /** Update panel attributes - * @param {String} [panels] - Comma separated list of panel ids. + * @param {String} panels - Comma separated list of panel ids. * @param {Object} [data] - Panel parameters. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {Boolean} [params.incVersion = "false"] - Create a new version of panel. The default value is false. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ update(panels, data, params) { return this._post("panels", panels, null, null, "update", data, params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/Family.js b/src/core/clients/opencga/api/Family.js index 6b380e9fd1..bf71d835c8 100644 --- a/src/core/clients/opencga/api/Family.js +++ b/src/core/clients/opencga/api/Family.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -87,8 +87,12 @@ export default class Family extends OpenCGAParentClass { /** Create family and the individual objects if they do not exist * @param {Object} data - JSON containing family information. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {String} [params.members] - Comma separated list of member ids to be associated to the created family. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ create(data, params) { @@ -98,19 +102,18 @@ export default class Family extends OpenCGAParentClass { /** Family distinct method * @param {String} field - Field for which to obtain the distinct values. * @param {Object} [params] - The Object containing the following optional parameters: - * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the id or alias. - * @param {String} [params.name] - Family name. - * @param {Boolean} [params.parentalConsanguinity] - Parental consanguinity. - * @param {String} [params.members] - Comma separated list of individual ids or names. - * @param {String} [params.samples] - Comma separated list sample IDs or UUIDs up to a maximum of 100. + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} [params.id] - Comma separated list family IDs up to a maximum of 100. + * @param {String} [params.name] - Comma separated list family names up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list family UUIDs up to a maximum of 100. + * @param {String} [params.members] - Comma separated list of family members. + * @param {Number} [params.expectedSize] - Expected size of the family (number of members). + * @param {String} [params.samples] - Comma separated list of member's samples. * @param {String} [params.phenotypes] - Comma separated list of phenotype ids or names. * @param {String} [params.disorders] - Comma separated list of disorder ids or names. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted families. The default value is false. - * @param {String} [params.annotationsetName] - DEPRECATED: Use annotation queryParam this way: - * annotationSet[=|==|!|!=]{annotationSetName}. - * @param {String} [params.variableSet] - DEPRECATED: Use annotation queryParam this way: variableSet[=|==|!|!=]{variableSetId}. + * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. * @param {String} [params.internalStatus] - Filter by internal status. * @param {String} [params.status] - Filter by status. * @param {String} [params.annotation] - Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit @@ -118,8 +121,8 @@ export default class Family extends OpenCGAParentClass { * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS * permissions. Only study owners or administrators can query by this field. . - * @param {String} [params.release] - Release value (Current release from the moment the families were first created). - * @param {Number} [params.snapshot] - Snapshot value (Latest version of families in the specified release). + * @param {String} [params.release] - Release when it was created. + * @param {Number} [params.snapshot] - Snapshot value (Latest version of the entry in the specified release). * @returns {Promise} Promise object in the form of RestResponse instance. */ distinct(field, params) { @@ -135,19 +138,18 @@ export default class Family extends OpenCGAParentClass { * @param {Boolean} [params.count = "false"] - Get the total number of results matching the query. Deactivated by default. The default * value is false. * @param {Boolean} [params.flattenAnnotations = "false"] - Flatten the annotations?. The default value is false. - * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the id or alias. - * @param {String} [params.name] - Family name. - * @param {Boolean} [params.parentalConsanguinity] - Parental consanguinity. - * @param {String} [params.members] - Comma separated list of individual ids or names. - * @param {String} [params.samples] - Comma separated list sample IDs or UUIDs up to a maximum of 100. + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} [params.id] - Comma separated list family IDs up to a maximum of 100. + * @param {String} [params.name] - Comma separated list family names up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list family UUIDs up to a maximum of 100. + * @param {String} [params.members] - Comma separated list of family members. + * @param {Number} [params.expectedSize] - Expected size of the family (number of members). + * @param {String} [params.samples] - Comma separated list of member's samples. * @param {String} [params.phenotypes] - Comma separated list of phenotype ids or names. * @param {String} [params.disorders] - Comma separated list of disorder ids or names. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted families. The default value is false. - * @param {String} [params.annotationsetName] - DEPRECATED: Use annotation queryParam this way: - * annotationSet[=|==|!|!=]{annotationSetName}. - * @param {String} [params.variableSet] - DEPRECATED: Use annotation queryParam this way: variableSet[=|==|!|!=]{variableSetId}. + * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. * @param {String} [params.internalStatus] - Filter by internal status. * @param {String} [params.status] - Filter by status. * @param {String} [params.annotation] - Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit @@ -155,8 +157,8 @@ export default class Family extends OpenCGAParentClass { * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS * permissions. Only study owners or administrators can query by this field. . - * @param {String} [params.release] - Release value (Current release from the moment the families were first created). - * @param {Number} [params.snapshot] - Snapshot value (Latest version of families in the specified release). + * @param {String} [params.release] - Release when it was created. + * @param {Number} [params.snapshot] - Snapshot value (Latest version of the entry in the specified release). * @returns {Promise} Promise object in the form of RestResponse instance. */ search(params) { @@ -177,7 +179,7 @@ export default class Family extends OpenCGAParentClass { } /** Delete existing families - * @param {String} [families] - Comma separated list of family ids. + * @param {String} families - Comma separated list of family ids. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -206,13 +208,14 @@ export default class Family extends OpenCGAParentClass { * @param {String} families - Comma separated list of family ids. * @param {Object} [data] - body. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {Boolean} [params.incVersion = "false"] - Create a new version of family. The default value is false. * @param {Boolean} [params.updateRoles = "false"] - Update the member roles within the family. The default value is false. - * @param {Boolean} [params.updateIndividualVersion = "false"] - Update all the individual references from the family to point to their - * latest versions. The default value is false. * @param {"ADD"|"SET"|"REMOVE"} [params.annotationSetsAction = "ADD"] - Action to be performed if the array of annotationSets is being * updated. The default value is ADD. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ update(families, data, params) { @@ -221,7 +224,7 @@ export default class Family extends OpenCGAParentClass { /** Update annotations from an annotationSet * @param {String} family - Family id. - * @param {String} [annotationSet] - AnnotationSet ID to be updated. + * @param {String} annotationSet - AnnotationSet ID to be updated. * @param {Object} [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. @@ -231,13 +234,10 @@ export default class Family extends OpenCGAParentClass { * 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. The default value is ADD. - * @param {Boolean} [params.incVersion = "false"] - Create a new version of family. The default value is false. - * @param {Boolean} [params.updateSampleVersion = "false"] - Update all the individual references from the family to point to their - * latest versions. The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ - updateAnnotations(family, annotationSet, data, params) { + updateAnnotationSetsAnnotations(family, annotationSet, data, params) { return this._post("families", family, "annotationSets", annotationSet, "annotations/update", data, params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/File.js b/src/core/clients/opencga/api/File.js index dcae202857..2ae2194170 100644 --- a/src/core/clients/opencga/api/File.js +++ b/src/core/clients/opencga/api/File.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -90,7 +90,7 @@ export default class File extends OpenCGAParentClass { } /** List of accepted file bioformats - * + * * @returns {Promise} Promise object in the form of RestResponse instance. */ bioformats() { @@ -101,6 +101,7 @@ export default class File extends OpenCGAParentClass { * @param {Object} data - File parameters. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {Boolean} [params.parents] - Create the parent directories if they do not exist. * @returns {Promise} Promise object in the form of RestResponse instance. */ create(data, params) { @@ -111,13 +112,19 @@ export default class File extends OpenCGAParentClass { * @param {String} field - Field for which to obtain the distinct values. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} [params.id] - Comma separated list of file IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list file UUIDs up to a maximum of 100. * @param {String} [params.name] - Comma separated list of file names. * @param {String} [params.path] - Comma separated list of paths. + * @param {String} [params.uri] - Comma separated list of uris. * @param {String} [params.type] - File type, either FILE or DIRECTORY. * @param {String} [params.bioformat] - Comma separated Bioformat values. For existing Bioformats see files/bioformats. * @param {String} [params.format] - Comma separated Format values. For existing Formats see files/formats. + * @param {Boolean} [params.external] - Boolean field indicating whether to filter by external or non external files. * @param {String} [params.status] - Filter by status. * @param {String} [params.internalStatus] - Filter by internal status. + * @param {String} [params.internalVariantIndexStatus] - Filter by internal variant index status. + * @param {String} [params.softwareName] - Software name. * @param {String} [params.directory] - Directory under which we want to look for files or folders. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. @@ -131,7 +138,7 @@ export default class File extends OpenCGAParentClass { * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS * permissions. Only study owners or administrators can query by this field. . - * @param {String} [params.attributes] - Text attributes (Format: sex=male,age>20 ...). + * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. * @param {String} [params.release] - Release when it was created. * @returns {Promise} Promise object in the form of RestResponse instance. */ @@ -142,6 +149,11 @@ export default class File extends OpenCGAParentClass { /** Download an external file to catalog and register it * @param {Object} data - Fetch parameters. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobTags] - Job tags. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @returns {Promise} Promise object in the form of RestResponse instance. */ @@ -150,7 +162,7 @@ export default class File extends OpenCGAParentClass { } /** List of accepted file formats - * + * * @returns {Promise} Promise object in the form of RestResponse instance. */ formats() { @@ -208,14 +220,19 @@ export default class File extends OpenCGAParentClass { * value is false. * @param {Boolean} [params.flattenAnnotations = "false"] - Boolean indicating to flatten the annotations. The default value is false. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} [params.id] - Comma separated list of file IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list file UUIDs up to a maximum of 100. * @param {String} [params.name] - Comma separated list of file names. * @param {String} [params.path] - Comma separated list of paths. + * @param {String} [params.uri] - Comma separated list of uris. * @param {String} [params.type] - File type, either FILE or DIRECTORY. * @param {String} [params.bioformat] - Comma separated Bioformat values. For existing Bioformats see files/bioformats. * @param {String} [params.format] - Comma separated Format values. For existing Formats see files/formats. + * @param {Boolean} [params.external] - Boolean field indicating whether to filter by external or non external files. * @param {String} [params.status] - Filter by status. * @param {String} [params.internalStatus] - Filter by internal status. - * @param {String} [params.internalIndexStatus] - Filter by internal index status. + * @param {String} [params.internalVariantIndexStatus] - Filter by internal variant index status. + * @param {String} [params.softwareName] - Software name. * @param {String} [params.directory] - Directory under which we want to look for files or folders. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. @@ -230,7 +247,6 @@ export default class File extends OpenCGAParentClass { * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS * permissions. Only study owners or administrators can query by this field. . * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. - * @param {String} [params.attributes] - Text attributes (Format: sex=male,age>20 ...). * @param {String} [params.release] - Release when it was created. * @returns {Promise} Promise object in the form of RestResponse instance. */ @@ -239,11 +255,20 @@ export default class File extends OpenCGAParentClass { } /** Resource to upload a file by chunks - * + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {InputStream} [params.file] - File to upload. + * @param {String} [params.filename] - File name to overwrite the input fileName. + * @param {String} [params.fileFormat] - File format. + * @param {String} [params.bioformat] - File bioformat. + * @param {String} [params.checksum] - Expected MD5 file checksum. + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} [params.relativeFilePath] - Path within catalog where the file will be located (default: root folder). + * @param {String} [params.description] - description. + * @param {Boolean} [params.parents] - Create the parent directories if they do not exist. * @returns {Promise} Promise object in the form of RestResponse instance. */ - upload() { - return this._post("files", null, null, null, "upload"); + upload(params) { + return this._post("files", null, null, null, "upload", params); } /** Return the acl defined for the file or folder. If member is provided, it will only return the acl for the member. @@ -261,7 +286,7 @@ export default class File extends OpenCGAParentClass { } /** Delete existing files and folders - * @param {String} [files] - Comma separated list of file ids, names or paths. + * @param {String} files - Comma separated list of file ids, names or paths. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {Boolean} [params.skipTrash = "false"] - Skip trash and delete the files/folders from disk directly (CANNOT BE RECOVERED). The @@ -273,7 +298,7 @@ export default class File extends OpenCGAParentClass { } /** File info - * @param {String} [files] - Comma separated list of file IDs or names up to a maximum of 100. + * @param {String} files - Comma separated list of file IDs or names up to a maximum of 100. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. @@ -287,7 +312,7 @@ export default class File extends OpenCGAParentClass { } /** Unlink linked files and folders - * @param {String} [files] - Comma separated list of file ids, names or paths. + * @param {String} files - Comma separated list of file ids, names or paths. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -297,9 +322,11 @@ export default class File extends OpenCGAParentClass { } /** Update some file attributes - * @param {String} [files] - Comma separated list of file ids, names or paths. Paths must be separated by : instead of /. + * @param {String} files - Comma separated list of file ids, names or paths. Paths must be separated by : instead of /. * @param {Object} data - Parameters to modify. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {"ADD"|"SET"|"REMOVE"} [params.sampleIdsAction = "ADD"] - Action to be performed if the array of samples is being updated. The * default value is ADD. @@ -317,7 +344,7 @@ export default class File extends OpenCGAParentClass { /** Update annotations from an annotationSet * @param {String} file - File id, name or path. Paths must be separated by : instead of /. - * @param {String} [annotationSet] - AnnotationSet ID to be updated. + * @param {String} annotationSet - AnnotationSet ID to be updated. * @param {Object} [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. @@ -329,12 +356,12 @@ export default class File extends OpenCGAParentClass { * VariableSet if any. The default value is ADD. * @returns {Promise} Promise object in the form of RestResponse instance. */ - updateAnnotations(file, annotationSet, data, params) { + updateAnnotationSetsAnnotations(file, annotationSet, data, params) { return this._post("files", file, "annotationSets", annotationSet, "annotations/update", data, params); } /** Download file - * @param {String} [file] - File id, name or path. Paths must be separated by : instead of /. + * @param {String} file - File id, name or path. Paths must be separated by : instead of /. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -344,7 +371,7 @@ export default class File extends OpenCGAParentClass { } /** Filter lines of the file containing the pattern - * @param {String} [file] - File uuid, id, or name. + * @param {String} file - File uuid, id, or name. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {String} [params.pattern] - String pattern. @@ -357,11 +384,11 @@ export default class File extends OpenCGAParentClass { } /** Show the first lines of a file (up to a limit) - * @param {String} [file] - File uuid, id, or name. + * @param {String} file - File uuid, id, or name. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {Number} [params.offset] - Starting byte from which the file will be read. - * @param {Number} [params.lines = "20"] - Maximum number of lines to be returned. The default value is 20. + * @param {Number} [params.lines = "20"] - Maximum number of lines to be returned up to a maximum of 1000. The default value is 20. * @returns {Promise} Promise object in the form of RestResponse instance. */ head(file, params) { @@ -369,7 +396,7 @@ export default class File extends OpenCGAParentClass { } /** Obtain the base64 content of an image - * @param {String} [file] - File ID. + * @param {String} file - File ID. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -379,7 +406,7 @@ export default class File extends OpenCGAParentClass { } /** Refresh metadata from the selected file or folder. Return updated files. - * @param {String} [file] - File id, name or path. Paths must be separated by : instead of /. + * @param {String} file - File id, name or path. Paths must be separated by : instead of /. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -389,10 +416,10 @@ export default class File extends OpenCGAParentClass { } /** Show the last lines of a file (up to a limit) - * @param {String} [file] - File uuid, id, or name. + * @param {String} file - File uuid, id, or name. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {Number} [params.lines = "20"] - Maximum number of lines to be returned. The default value is 20. + * @param {Number} [params.lines = "20"] - Maximum number of lines to be returned up to a maximum of 1000. The default value is 20. * @returns {Promise} Promise object in the form of RestResponse instance. */ tail(file, params) { @@ -400,7 +427,7 @@ export default class File extends OpenCGAParentClass { } /** List all the files inside the folder - * @param {String} [folder] - Folder ID, name or path. + * @param {String} folder - Folder ID, name or path. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. @@ -416,7 +443,7 @@ export default class File extends OpenCGAParentClass { } /** Obtain a tree view of the files and folders within a folder - * @param {String} [folder] - Folder id or name. Paths must be separated by : instead of /. + * @param {String} folder - Folder id or name. Paths must be separated by : instead of /. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. @@ -428,4 +455,4 @@ export default class File extends OpenCGAParentClass { return this._get("files", folder, null, null, "tree", params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/GA4GH.js b/src/core/clients/opencga/api/GA4GH.js index d9f7a26015..9c02320ef7 100644 --- a/src/core/clients/opencga/api/GA4GH.js +++ b/src/core/clients/opencga/api/GA4GH.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -33,7 +33,7 @@ export default class GA4GH extends OpenCGAParentClass { } /** Description - * + * * @returns {Promise} Promise object in the form of RestResponse instance. */ searchReads() { @@ -41,8 +41,8 @@ export default class GA4GH extends OpenCGAParentClass { } /** Fetch alignment files using HTSget protocol - * @param {String} [file] - File id, name or path. - * @param {String} [study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} file - File id, name or path. + * @param {String} study - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.referenceName] - Reference sequence name (Example: 'chr1', '1' or 'chrX'. * @param {Number} [params.start] - The start position of the range on the reference, 0-based, inclusive. @@ -72,11 +72,11 @@ export default class GA4GH extends OpenCGAParentClass { } /** Description - * + * * @returns {Promise} Promise object in the form of RestResponse instance. */ searchVariants() { return this._post("ga4gh", null, "variants", null, "search"); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/Individual.js b/src/core/clients/opencga/api/Individual.js index 632e4083d3..b2f4cbd7f0 100644 --- a/src/core/clients/opencga/api/Individual.js +++ b/src/core/clients/opencga/api/Individual.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -95,8 +95,12 @@ export default class Individual extends OpenCGAParentClass { /** Create individual * @param {Object} data - JSON containing individual information. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {String} [params.samples] - Comma separated list of sample ids to be associated to the created individual. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ create(data, params) { @@ -106,35 +110,35 @@ export default class Individual extends OpenCGAParentClass { /** Individual distinct method * @param {String} field - Field for which to obtain the distinct values. * @param {Object} [params] - The Object containing the following optional parameters: - * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the id or alias. - * @param {String} [params.name] - name. - * @param {String} [params.father] - father. - * @param {String} [params.mother] - mother. - * @param {String} [params.samples] - Comma separated list sample IDs or UUIDs up to a maximum of 100. - * @param {String} [params.sex] - sex. - * @param {String} [params.ethnicity] - ethnicity. + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} [params.id] - Comma separated list individual IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list individual UUIDs up to a maximum of 100. + * @param {String} [params.name] - Comma separated list individual names up to a maximum of 100. + * @param {String} [params.familyIds] - Comma separated list of family ids the individuals may belong to. + * @param {String} [params.father] - Father ID, name or UUID. + * @param {String} [params.mother] - Mother ID, name or UUID. + * @param {String} [params.samples] - Sample ID, name or UUID. + * @param {String} [params.sex] - Individual sex. + * @param {String} [params.ethnicity] - Individual ethnicity. + * @param {String} [params.dateOfBirth] - Individual date of birth. * @param {String} [params.disorders] - Comma separated list of disorder ids or names. - * @param {String} [params.population.name] - Population name. - * @param {String} [params.population.subpopulation] - Subpopulation name. - * @param {String} [params.population.description] - Population description. * @param {String} [params.phenotypes] - Comma separated list of phenotype ids or names. - * @param {String} [params.karyotypicSex] - Karyotypic sex. - * @param {String} [params.lifeStatus] - Life status. - * @param {String} [params.affectationStatus] - Affectation status. + * @param {String} [params.populationName] - Population name. + * @param {String} [params.populationSubpopulation] - Subpopulation name. + * @param {String} [params.karyotypicSex] - Individual karyotypic sex. + * @param {String} [params.lifeStatus] - Individual life status. * @param {String} [params.internalStatus] - Filter by internal status. * @param {String} [params.status] - Filter by status. + * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {String} [params.annotationsetName] - DEPRECATED: Use annotation queryParam this way: - * annotationSet[=|==|!|!=]{annotationSetName}. - * @param {String} [params.variableSet] - DEPRECATED: Use annotation queryParam this way: variableSet[=|==|!|!=]{variableSetId}. * @param {String} [params.annotation] - Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit * http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0. * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS * permissions. Only study owners or administrators can query by this field. . - * @param {String} [params.release] - Release value (Current release from the moment the individuals were first created). - * @param {Number} [params.snapshot] - Snapshot value (Latest version of individuals in the specified release). + * @param {String} [params.release] - Release when it was created. + * @param {Number} [params.snapshot] - Snapshot value (Latest version of the entry in the specified release). * @returns {Promise} Promise object in the form of RestResponse instance. */ distinct(field, params) { @@ -150,36 +154,35 @@ export default class Individual extends OpenCGAParentClass { * @param {Boolean} [params.count = "false"] - Get the total number of results matching the query. Deactivated by default. The default * value is false. * @param {Boolean} [params.flattenAnnotations = "false"] - Flatten the annotations?. The default value is false. - * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the id or alias. - * @param {String} [params.name] - name. - * @param {String} [params.father] - father. - * @param {String} [params.mother] - mother. - * @param {String} [params.samples] - Comma separated list sample IDs or UUIDs up to a maximum of 100. - * @param {String} [params.sex] - sex. - * @param {String} [params.ethnicity] - ethnicity. + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} [params.id] - Comma separated list individual IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list individual UUIDs up to a maximum of 100. + * @param {String} [params.name] - Comma separated list individual names up to a maximum of 100. + * @param {String} [params.father] - Father ID, name or UUID. + * @param {String} [params.mother] - Mother ID, name or UUID. + * @param {String} [params.samples] - Sample ID, name or UUID. + * @param {String} [params.familyIds] - Comma separated list of family ids the individuals may belong to. + * @param {String} [params.sex] - Individual sex. + * @param {String} [params.dateOfBirth] - Individual date of birth. + * @param {String} [params.ethnicity] - Individual ethnicity. * @param {String} [params.disorders] - Comma separated list of disorder ids or names. - * @param {String} [params.population.name] - Population name. - * @param {String} [params.population.subpopulation] - Subpopulation name. - * @param {String} [params.population.description] - Population description. * @param {String} [params.phenotypes] - Comma separated list of phenotype ids or names. - * @param {String} [params.karyotypicSex] - Karyotypic sex. - * @param {String} [params.lifeStatus] - Life status. - * @param {String} [params.affectationStatus] - Affectation status. + * @param {String} [params.populationName] - Population name. + * @param {String} [params.populationSubpopulation] - Subpopulation name. + * @param {String} [params.karyotypicSex] - Individual karyotypic sex. + * @param {String} [params.lifeStatus] - Individual life status. * @param {String} [params.internalStatus] - Filter by internal status. * @param {String} [params.status] - Filter by status. - * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted individuals. The default value is false. + * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {String} [params.annotationsetName] - DEPRECATED: Use annotation queryParam this way: - * annotationSet[=|==|!|!=]{annotationSetName}. - * @param {String} [params.variableSet] - DEPRECATED: Use annotation queryParam this way: variableSet[=|==|!|!=]{variableSetId}. * @param {String} [params.annotation] - Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit * http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0. * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS * permissions. Only study owners or administrators can query by this field. . - * @param {String} [params.release] - Release value (Current release from the moment the individuals were first created). - * @param {Number} [params.snapshot] - Snapshot value (Latest version of individuals in the specified release). + * @param {String} [params.release] - Release when it was created. + * @param {Number} [params.snapshot] - Snapshot value (Latest version of the entry in the specified release). * @returns {Promise} Promise object in the form of RestResponse instance. */ search(params) { @@ -187,7 +190,7 @@ export default class Individual extends OpenCGAParentClass { } /** Return the acl of the individual. If member is provided, it will only return the acl for the member. - * @param {String} individuals - Comma separated list of individual names or IDs up to a maximum of 100. + * @param {String} individuals - Comma separated list of individual IDs, names or UUIDs up to a maximum of 100. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {String} [params.member] - User or group id. @@ -200,7 +203,7 @@ export default class Individual extends OpenCGAParentClass { } /** Delete existing individuals - * @param {String} [individuals] - Comma separated list of individual ids. + * @param {String} individuals - Comma separated list of individual ids. * @param {Object} [params] - The Object containing the following optional parameters: * @param {Boolean} [params.force = "false"] - Force the deletion of individuals that already belong to families. The default value is * false. @@ -212,7 +215,7 @@ export default class Individual extends OpenCGAParentClass { } /** Get individual information - * @param {String} individuals - Comma separated list of individual names or IDs up to a maximum of 100. + * @param {String} individuals - Comma separated list of individual IDs, names or UUIDs up to a maximum of 100. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. @@ -231,14 +234,19 @@ export default class Individual extends OpenCGAParentClass { * @param {String} individuals - Comma separated list of individual ids. * @param {Object} [data] - body. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {"ADD"|"SET"|"REMOVE"} [params.samplesAction = "ADD"] - Action to be performed if the array of samples is being updated. The * default value is ADD. + * @param {"ADD"|"SET"|"REMOVE"} [params.phenotypesAction = "ADD"] - Action to be performed if the array of phenotypes is being updated + * [SET, ADD, REMOVE]. The default value is ADD. + * @param {"ADD"|"SET"|"REMOVE"} [params.disordersAction = "ADD"] - Action to be performed if the array of disorders is being updated + * [SET, ADD, REMOVE]. The default value is ADD. * @param {"ADD"|"SET"|"REMOVE"} [params.annotationSetsAction = "ADD"] - Action to be performed if the array of annotationSets is being * updated. The default value is ADD. - * @param {Boolean} [params.incVersion = "false"] - Create a new version of individual. The default value is false. - * @param {Boolean} [params.updateSampleVersion = "false"] - Update all the sample references from the individual to point to their - * latest versions. The default value is false. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ update(individuals, data, params) { @@ -246,8 +254,8 @@ export default class Individual extends OpenCGAParentClass { } /** Update annotations from an annotationSet - * @param {String} individual - Individual ID or UUID. - * @param {String} [annotationSet] - AnnotationSet ID to be updated. + * @param {String} individual - Individual ID, name or UUID. + * @param {String} annotationSet - AnnotationSet ID to be updated. * @param {Object} [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. @@ -257,17 +265,14 @@ export default class Individual extends OpenCGAParentClass { * 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. The default value is ADD. - * @param {Boolean} [params.incVersion = "false"] - Create a new version of individual. The default value is false. - * @param {Boolean} [params.updateSampleVersion = "false"] - Update all the sample references from the individual to point to their - * latest versions. The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ - updateAnnotations(individual, annotationSet, data, params) { + updateAnnotationSetsAnnotations(individual, annotationSet, data, params) { return this._post("individuals", individual, "annotationSets", annotationSet, "annotations/update", data, params); } /** Get individual relatives - * @param {String} individual - Individual ID or UUID. + * @param {String} individual - Individual ID, name or UUID. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. @@ -280,4 +285,4 @@ export default class Individual extends OpenCGAParentClass { return this._get("individuals", individual, null, null, "relatives", params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/Job.js b/src/core/clients/opencga/api/Job.js index 713e10ed4c..12bcf979d4 100644 --- a/src/core/clients/opencga/api/Job.js +++ b/src/core/clients/opencga/api/Job.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -85,11 +85,13 @@ export default class Job extends OpenCGAParentClass { * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {Boolean} [params.otherStudies = "false"] - Flag indicating the entries being queried can belong to any related study, not just * the primary one. The default value is false. - * @param {String} [params.id] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not - * provided. + * @param {String} [params.id] - Comma separated list of job IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list of job UUIDs up to a maximum of 100. * @param {String} [params.toolId] - Tool ID executed by the job. + * @param {String} [params.toolType] - Tool type executed by the job [OPERATION, ANALYSIS]. * @param {String} [params.userId] - User that created the job. * @param {String} [params.priority] - Priority of the job. + * @param {String} [params.status] - Filter by status. * @param {String} [params.internalStatus] - Filter by internal status. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. @@ -97,12 +99,11 @@ export default class Job extends OpenCGAParentClass { * @param {String} [params.tags] - Job tags. * @param {String} [params.input] - Comma separated list of file IDs used as input. * @param {String} [params.output] - Comma separated list of file IDs used as output. - * @param {String} [params.execution.start] - Execution start date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {String} [params.execution.end] - Execution end date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS * permissions. Only study owners or administrators can query by this field. . * @param {String} [params.release] - Release when it was created. + * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ distinct(field, params) { @@ -135,11 +136,13 @@ export default class Job extends OpenCGAParentClass { * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {Boolean} [params.otherStudies = "false"] - Flag indicating the entries being queried can belong to any related study, not just * the primary one. The default value is false. - * @param {String} [params.id] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not - * provided. + * @param {String} [params.id] - Comma separated list of job IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list of job UUIDs up to a maximum of 100. * @param {String} [params.toolId] - Tool ID executed by the job. + * @param {String} [params.toolType] - Tool type executed by the job [OPERATION, ANALYSIS]. * @param {String} [params.userId] - User that created the job. * @param {String} [params.priority] - Priority of the job. + * @param {String} [params.status] - Filter by status. * @param {String} [params.internalStatus] - Filter by internal status. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. @@ -147,8 +150,6 @@ export default class Job extends OpenCGAParentClass { * @param {String} [params.tags] - Job tags. * @param {String} [params.input] - Comma separated list of file IDs used as input. * @param {String} [params.output] - Comma separated list of file IDs used as output. - * @param {String} [params.execution.start] - Execution start date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. - * @param {String} [params.execution.end] - Execution end date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.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. . @@ -187,7 +188,7 @@ export default class Job extends OpenCGAParentClass { } /** Delete existing jobs - * @param {String} [jobs] - Comma separated list of job ids. + * @param {String} jobs - Comma separated list of job ids. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -213,7 +214,11 @@ export default class Job extends OpenCGAParentClass { * @param {String} jobs - Comma separated list of job IDs or UUIDs up to a maximum of 100. * @param {Object} [data] - body. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ update(jobs, data, params) { @@ -225,7 +230,7 @@ export default class Job extends OpenCGAParentClass { * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {Number} [params.offset] - Starting byte from which the file will be read. - * @param {Number} [params.lines = "20"] - Maximum number of lines to be returned. The default value is 20. + * @param {Number} [params.lines = "20"] - Maximum number of lines to be returned up to a maximum of 1000. The default value is 20. * @param {String} [params.type] - Log file to be shown (stdout or stderr). * @returns {Promise} Promise object in the form of RestResponse instance. */ @@ -237,7 +242,7 @@ export default class Job extends OpenCGAParentClass { * @param {String} job - Job ID or UUID. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {Number} [params.lines = "20"] - Maximum number of lines to be returned. The default value is 20. + * @param {Number} [params.lines = "20"] - Maximum number of lines to be returned up to a maximum of 1000. The default value is 20. * @param {String} [params.type] - Log file to be shown (stdout or stderr). * @returns {Promise} Promise object in the form of RestResponse instance. */ @@ -245,4 +250,4 @@ export default class Job extends OpenCGAParentClass { return this._get("jobs", job, "log", null, "tail", params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/Meta.js b/src/core/clients/opencga/api/Meta.js index 0e1e66a435..c754651bc7 100644 --- a/src/core/clients/opencga/api/Meta.js +++ b/src/core/clients/opencga/api/Meta.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -33,7 +33,7 @@ export default class Meta extends OpenCGAParentClass { } /** Returns info about current OpenCGA code. - * + * * @returns {Promise} Promise object in the form of RestResponse instance. */ about() { @@ -50,7 +50,7 @@ export default class Meta extends OpenCGAParentClass { } /** Ping Opencga webservices. - * + * * @returns {Promise} Promise object in the form of RestResponse instance. */ fail() { @@ -58,7 +58,7 @@ export default class Meta extends OpenCGAParentClass { } /** Ping Opencga webservices. - * + * * @returns {Promise} Promise object in the form of RestResponse instance. */ ping() { @@ -66,11 +66,11 @@ export default class Meta extends OpenCGAParentClass { } /** Database status. - * + * * @returns {Promise} Promise object in the form of RestResponse instance. */ status() { return this._get("meta", null, null, null, "status"); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/Project.js b/src/core/clients/opencga/api/Project.js index 0293f33c73..5a04ce07ce 100644 --- a/src/core/clients/opencga/api/Project.js +++ b/src/core/clients/opencga/api/Project.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -34,10 +34,15 @@ export default class Project extends OpenCGAParentClass { /** Create a new project * @param {Object} data - JSON containing the mandatory parameters. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ - create(data) { - return this._post("projects", null, null, null, "create", data); + create(data, params) { + return this._post("projects", null, null, null, "create", data, params); } /** Search projects @@ -121,10 +126,15 @@ export default class Project extends OpenCGAParentClass { * @param {String} project - Project [user@]project where project can be either the ID or the alias. * @param {Object} data - JSON containing the params to be updated. It will be only possible to update organism fields not previously * defined. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ - update(project, data) { - return this._post("projects", project, null, null, "update", data); + update(project, data, params) { + return this._post("projects", project, null, null, "update", data, params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/Sample.js b/src/core/clients/opencga/api/Sample.js index cde0a61688..4909095cdc 100644 --- a/src/core/clients/opencga/api/Sample.js +++ b/src/core/clients/opencga/api/Sample.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -88,8 +88,11 @@ export default class Sample extends OpenCGAParentClass { /** Create sample * @param {Object} data - JSON containing sample information. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [params.individual] - DEPRECATED: It should be passed in the body. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ create(data, params) { @@ -100,23 +103,47 @@ export default class Sample extends OpenCGAParentClass { * @param {String} field - Field for which to obtain the distinct values. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [params.id] - Comma separated list sample IDs or UUIDs up to a maximum of 100. + * @param {String} [params.id] - Comma separated list sample IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list sample UUIDs up to a maximum of 100. * @param {Boolean} [params.somatic] - Somatic sample. * @param {String} [params.individualId] - Individual ID or UUID. * @param {String} [params.fileIds] - Comma separated list of file IDs, paths or UUIDs. + * @param {String} [params.cohortIds] - Comma separated list of cohort IDs. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.internalStatus] - Filter by internal status. * @param {String} [params.status] - Filter by status. + * @param {String} [params.processingProduct] - Processing product. + * @param {String} [params.processingPreparationMethod] - Processing preparation method. + * @param {String} [params.processingExtractionMethod] - Processing extraction method. + * @param {String} [params.processingLabSampleId] - Processing lab sample id. + * @param {String} [params.collectionFrom] - Collection from. + * @param {String} [params.collectionType] - Collection type. + * @param {String} [params.collectionMethod] - Collection method. * @param {String} [params.phenotypes] - Comma separated list of phenotype ids or names. * @param {String} [params.annotation] - Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit * http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0. * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS * permissions. Only study owners or administrators can query by this field. . - * @param {String} [params.attributes] - Text attributes (Format: sex=male,age>20 ...). + * @param {String} [params.internalRgaStatus] - Index status of the sample for the Recessive Gene Analysis. * @param {String} [params.release] - Release when it was created. * @param {Number} [params.snapshot] - Snapshot value (Latest version of the entry in the specified release). + * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. + * @param {String} [params.statsId] - Sample variant stats Id. If this field is not provided and the user filters by other stats fields, + * it will automatically be set to ALL. + * @param {String} [params.statsVariantCount] - Sample variant stats VariantCount. + * @param {String} [params.statsChromosomeCount] - Sample variant stats ChromosomeCount. + * @param {String} [params.statsTypeCount] - Sample variant stats TypeCount. + * @param {String} [params.statsGenotypeCount] - Sample variant stats GenotypeCount. + * @param {String} [params.statsTiTvRatio] - Sample variant stats TiTvRatio. + * @param {String} [params.statsQualityAvg] - Sample variant stats QualityAvg. + * @param {String} [params.statsQualityStdDev] - Sample variant stats QualityStdDev. + * @param {String} [params.statsHeterozygosityRate] - Sample variant stats HeterozygosityRate. + * @param {String} [params.statsDepthCount] - Sample variant stats DepthCount. + * @param {String} [params.statsBiotypeCount] - Sample variant stats BiotypeCount. + * @param {String} [params.statsClinicalSignificanceCount] - Sample variant stats ClinicalSignificanceCount. + * @param {String} [params.statsConsequenceTypeCount] - Sample variant stats ConsequenceTypeCount. * @returns {Promise} Promise object in the form of RestResponse instance. */ distinct(field, params) { @@ -145,38 +172,47 @@ export default class Sample extends OpenCGAParentClass { * @param {Boolean} [params.includeIndividual = "false"] - Include Individual object as an attribute. The default value is false. * @param {Boolean} [params.flattenAnnotations = "false"] - Flatten the annotations?. The default value is false. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [params.id] - Comma separated list sample IDs or UUIDs up to a maximum of 100. + * @param {String} [params.id] - Comma separated list sample IDs up to a maximum of 100. + * @param {String} [params.uuid] - Comma separated list sample UUIDs up to a maximum of 100. * @param {Boolean} [params.somatic] - Somatic sample. * @param {String} [params.individualId] - Individual ID or UUID. * @param {String} [params.fileIds] - Comma separated list of file IDs, paths or UUIDs. + * @param {String} [params.cohortIds] - Comma separated list of cohort IDs. * @param {String} [params.creationDate] - Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.modificationDate] - Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805. * @param {String} [params.internalStatus] - Filter by internal status. * @param {String} [params.status] - Filter by status. + * @param {String} [params.processingProduct] - Processing product. + * @param {String} [params.processingPreparationMethod] - Processing preparation method. + * @param {String} [params.processingExtractionMethod] - Processing extraction method. + * @param {String} [params.processingLabSampleId] - Processing lab sample id. + * @param {String} [params.collectionFrom] - Collection from. + * @param {String} [params.collectionType] - Collection type. + * @param {String} [params.collectionMethod] - Collection method. * @param {String} [params.phenotypes] - Comma separated list of phenotype ids or names. * @param {String} [params.annotation] - Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit * http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0. * @param {String} [params.acl] - Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. * Example: acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS * permissions. Only study owners or administrators can query by this field. . - * @param {String} [params.attributes] - Text attributes (Format: sex=male,age>20 ...). + * @param {String} [params.internalRgaStatus] - Index status of the sample for the Recessive Gene Analysis. * @param {String} [params.release] - Release when it was created. * @param {Number} [params.snapshot] - Snapshot value (Latest version of the entry in the specified release). * @param {Boolean} [params.deleted = "false"] - Boolean to retrieve deleted entries. The default value is false. - * @param {String} [params.stats.id] - Sample variant stats id. If filtering by other stats fields and not provided, it will be - * automatically set to ALL. - * @param {String} [params.stats.variantCount] - Sample variant stats variantCount. - * @param {String} [params.stats.chromosomeCount] - Sample variant stats chromosomeCount. - * @param {String} [params.stats.typeCount] - Sample variant stats typeCount. - * @param {String} [params.stats.genotypeCount] - Sample variant stats genotypeCount. - * @param {String} [params.stats.tiTvRatio] - Sample variant stats tiTvRatio. - * @param {String} [params.stats.qualityAvg] - Sample variant stats qualityAvg. - * @param {String} [params.stats.qualityStdDev] - Sample variant stats qualityStdDev. - * @param {String} [params.stats.heterozygosityRate] - Sample variant stats heterozygosityRate. - * @param {String} [params.stats.depthCount] - Sample variant stats depthCount. - * @param {String} [params.stats.biotypeCount] - Sample variant stats biotypeCount. - * @param {String} [params.stats.clinicalSignificanceCount] - Sample variant stats clinicalSignificanceCount. - * @param {String} [params.stats.consequenceTypeCount] - Sample variant stats consequenceTypeCount. + * @param {String} [params.statsId] - Sample variant stats Id. If this field is not provided and the user filters by other stats fields, + * it will automatically be set to ALL. + * @param {String} [params.statsVariantCount] - Sample variant stats VariantCount. + * @param {String} [params.statsChromosomeCount] - Sample variant stats ChromosomeCount. + * @param {String} [params.statsTypeCount] - Sample variant stats TypeCount. + * @param {String} [params.statsGenotypeCount] - Sample variant stats GenotypeCount. + * @param {String} [params.statsTiTvRatio] - Sample variant stats TiTvRatio. + * @param {String} [params.statsQualityAvg] - Sample variant stats QualityAvg. + * @param {String} [params.statsQualityStdDev] - Sample variant stats QualityStdDev. + * @param {String} [params.statsHeterozygosityRate] - Sample variant stats HeterozygosityRate. + * @param {String} [params.statsDepthCount] - Sample variant stats DepthCount. + * @param {String} [params.statsBiotypeCount] - Sample variant stats BiotypeCount. + * @param {String} [params.statsClinicalSignificanceCount] - Sample variant stats ClinicalSignificanceCount. + * @param {String} [params.statsConsequenceTypeCount] - Sample variant stats ConsequenceTypeCount. * @returns {Promise} Promise object in the form of RestResponse instance. */ search(params) { @@ -197,7 +233,7 @@ export default class Sample extends OpenCGAParentClass { } /** Delete samples - * @param {String} [samples] - Comma separated list sample IDs or UUIDs up to a maximum of 100. + * @param {String} samples - Comma separated list sample IDs or UUIDs up to a maximum of 100. * @param {Object} [params] - The Object containing the following optional parameters: * @param {Boolean} [params.force = "false"] - Force the deletion of samples even if they are associated to files, individuals or * cohorts. The default value is false. @@ -233,10 +269,15 @@ export default class Sample extends OpenCGAParentClass { * @param {String} samples - Comma separated list sample IDs or UUIDs up to a maximum of 100. * @param {Object} [data] - body. * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {Boolean} [params.incVersion = "false"] - Create a new version of sample. The default value is false. * @param {"ADD"|"SET"|"REMOVE"} [params.annotationSetsAction = "ADD"] - Action to be performed if the array of annotationSets is being * updated. The default value is ADD. + * @param {"ADD"|"SET"|"REMOVE"} [params.phenotypesAction = "ADD"] - Action to be performed if the array of phenotypes is being updated + * [SET, ADD, REMOVE]. The default value is ADD. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ update(samples, data, params) { @@ -245,7 +286,7 @@ export default class Sample extends OpenCGAParentClass { /** Update annotations from an annotationSet * @param {String} sample - Sample ID. - * @param {String} [annotationSet] - AnnotationSet ID to be updated. + * @param {String} annotationSet - AnnotationSet ID to be updated. * @param {Object} [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. @@ -255,11 +296,10 @@ export default class Sample extends OpenCGAParentClass { * 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. The default value is ADD. - * @param {Boolean} [params.incVersion = "false"] - Create a new version of sample. The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ - updateAnnotations(sample, annotationSet, data, params) { + updateAnnotationSetsAnnotations(sample, annotationSet, data, params) { return this._post("samples", sample, "annotationSets", annotationSet, "annotations/update", data, params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/Study.js b/src/core/clients/opencga/api/Study.js index 5dcfa13588..362fc4db54 100644 --- a/src/core/clients/opencga/api/Study.js +++ b/src/core/clients/opencga/api/Study.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -45,8 +45,11 @@ export default class Study extends OpenCGAParentClass { /** Create a new study * @param {Object} data - study. * @param {Object} [params] - The Object containing the following optional parameters: - * @param {String} [params.projectId] - Deprecated: Project id. + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @param {String} [params.project] - Project [user@]project where project can be either the ID or the alias. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ create(data, params) { @@ -159,7 +162,7 @@ export default class Study extends OpenCGAParentClass { } /** Add or remove a group - * @param {String} [study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} study - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {Object} data - JSON containing the parameters. * @param {Object} [params] - The Object containing the following optional parameters: * @param {"ADD"|"REMOVE"} [params.action = "ADD"] - Action to be performed: ADD or REMOVE a group. The default value is ADD. @@ -170,15 +173,15 @@ export default class Study extends OpenCGAParentClass { } /** Add, set or remove users from an existing group - * @param {String} [study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [group] - Group name. + * @param {String} study - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} group - Group name. * @param {Object} data - JSON containing the parameters. * @param {Object} [params] - The Object containing the following optional parameters: * @param {"ADD"|"SET"|"REMOVE"} [params.action = "ADD"] - Action to be performed: ADD, SET or REMOVE users to/from a group. The default * value is ADD. * @returns {Promise} Promise object in the form of RestResponse instance. */ - updateUsers(study, group, data, params) { + updateGroupsUsers(study, group, data, params) { return this._post("studies", study, "groups", group, "users/update", data, params); } @@ -192,7 +195,7 @@ export default class Study extends OpenCGAParentClass { } /** Add or remove a permission rule - * @param {String} [study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} study - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {Object} data - JSON containing the permission rule to be created or removed. * @param {String} entity - Entity where the permission rules should be applied to. * @param {Object} [params] - The Object containing the following optional parameters: @@ -206,13 +209,52 @@ export default class Study extends OpenCGAParentClass { return this._post("studies", study, "permissionRules", null, "update", data, {entity, ...params}); } + /** Execute template + * @param {String} study - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {Object} data - Template loader parameters. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobTags] - Job tags. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + runTemplates(study, data, params) { + return this._post("studies", study, "templates", null, "run", data, params); + } + + /** Resource to upload a zipped template + * @param {String} study - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {InputStream} [params.file] - File to upload. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + uploadTemplates(study, params) { + return this._post("studies", study, "templates", null, "upload", params); + } + + /** Delete template + * @param {String} [study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} templateId - Template id. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + deleteTemplates(study, templateId) { + return this._delete("studies", study, "templates", templateId, "delete"); + } + /** Update some study attributes * @param {String} study - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {Object} data - JSON containing the params to be updated. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ - update(study, data) { - return this._post("studies", study, null, null, "update", data); + update(study, data, params) { + return this._post("studies", study, null, null, "update", data, params); } /** Fetch variableSets from a study @@ -227,10 +269,11 @@ export default class Study extends OpenCGAParentClass { } /** Add or remove a variableSet - * @param {String} [study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} study - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {Object} data - JSON containing the VariableSet to be created or removed. * @param {Object} [params] - The Object containing the following optional parameters: - * @param {"ADD"|"REMOVE"} [params.action = "ADD"] - Action to be performed: ADD or REMOVE a variableSet. The default value is ADD. + * @param {"ADD"|"REMOVE"|"FORCE_REMOVE"} [params.action = "ADD"] - Action to be performed: ADD, REMOVE or FORCE_REMOVE a variableSet. + * The default value is ADD. * @returns {Promise} Promise object in the form of RestResponse instance. */ updateVariableSets(study, data, params) { @@ -238,15 +281,15 @@ export default class Study extends OpenCGAParentClass { } /** Add or remove variables to a VariableSet - * @param {String} [study] - Study [[user@]project:]study where study and project can be either the ID or UUID. - * @param {String} [variableSet] - VariableSet id of the VariableSet to be updated. + * @param {String} study - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} variableSet - VariableSet id of the VariableSet to be updated. * @param {Object} data - JSON containing the variable to be added or removed. For removing, only the variable id will be needed. * @param {Object} [params] - The Object containing the following optional parameters: * @param {"ADD"|"REMOVE"} [params.action = "ADD"] - Action to be performed: ADD or REMOVE a variable. The default value is ADD. * @returns {Promise} Promise object in the form of RestResponse instance. */ - updateVariables(study, variableSet, data, params) { + updateVariableSetsVariables(study, variableSet, data, params) { return this._post("studies", study, "variableSets", variableSet, "variables/update", data, params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/User.js b/src/core/clients/opencga/api/User.js index bac01febbb..26c026f293 100644 --- a/src/core/clients/opencga/api/User.js +++ b/src/core/clients/opencga/api/User.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -120,6 +120,14 @@ export default class User extends OpenCGAParentClass { return this._post("users", user, "filters", filterId, "update", data); } + /** Reset password + * @param {String} user - User ID. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + resetPassword(user) { + return this._get("users", user, "password", null, "reset"); + } + /** Retrieve the projects of the user * @param {String} user - User ID. * @param {Object} [params] - The Object containing the following optional parameters: @@ -136,10 +144,15 @@ export default class User extends OpenCGAParentClass { /** Update some user attributes * @param {String} user - User ID. * @param {Object} data - JSON containing the params to be updated. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. + * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. + * @param {Boolean} [params.includeResult = "false"] - Flag indicating to include the created or updated document result in the response. + * The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. */ - update(user, data) { - return this._post("users", user, null, null, "update", data); + update(user, data, params) { + return this._post("users", user, null, null, "update", data, params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/Variant.js b/src/core/clients/opencga/api/Variant.js index 452928af48..a49e30b43b 100644 --- a/src/core/clients/opencga/api/Variant.js +++ b/src/core/clients/opencga/api/Variant.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -54,7 +54,8 @@ export default class Variant extends OpenCGAParentClass { * @param {Boolean} [params.annotationExists] - Return only annotated variants. * @param {String} [params.gene] - List of genes, most gene IDs are accepted (HGNC, Ensembl gene, ...). This is an alias to 'xref' * parameter. - * @param {String} [params.ct] - List of SO consequence types, e.g. missense_variant,stop_lost or SO:0001583,SO:0001578. + * @param {String} [params.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'. * @param {String} [params.xref] - List of any external reference, these can be genes, proteins or variants. Accepted IDs include HGNC, * Ensembl genes, dbSNP, ClinVar, HPO, Cosmic, ... * @param {String} [params.biotype] - List of biotypes, e.g. protein_coding. @@ -68,8 +69,8 @@ export default class Variant extends OpenCGAParentClass { * 1kG_phase3:ALL<0.01. * @param {String} [params.populationFrequencyMaf] - Population minor allele frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. * 1kG_phase3:ALL<0.01. - * @param {String} [params.transcriptFlag] - List of transcript annotation flags. e.g. CCDS, basic, cds_end_NF, mRNA_end_NF, - * cds_start_NF, mRNA_start_NF, seleno. + * @param {String} [params.transcriptFlag] - List of transcript flags. e.g. canonical, CCDS, basic, LRG, MANE Select, MANE Plus Clinical, + * EGLH_HaemOnc, TSO500. * @param {String} [params.geneTraitId] - List of gene trait association id. e.g. "umls:C0007222" , "OMIM:269600". * @param {String} [params.go] - List of GO (Gene Ontology) terms. e.g. "GO:0002020". * @param {String} [params.expression] - List of tissues of interest. e.g. "lung". @@ -77,7 +78,9 @@ export default class Variant extends OpenCGAParentClass { * @param {String} [params.drug] - List of drug names. * @param {String} [params.functionalScore] - Functional score: {functional_score}[<|>|<=|>=]{number} e.g. cadd_scaled>5.2 , * cadd_raw<=0.3. + * @param {String} [params.clinical] - Clinical source: clinvar, cosmic. * @param {String} [params.clinicalSignificance] - Clinical significance: benign, likely_benign, likely_pathogenic, pathogenic. + * @param {Boolean} [params.clinicalConfirmedStatus] - Clinical confirmed status. * @param {String} [params.customAnnotation] - Custom annotation: {key}[<|>|<=|>=]{number} or {key}[~=|=]{text}. * @param {String} [params.trait] - List of traits, based on ClinVar, HPO, COSMIC, i.e.: IDs, histologies, descriptions,... * @param {String} [params.field] - List of facet fields separated by semicolons, e.g.: studies;type. For nested faceted fields use >>, @@ -130,7 +133,7 @@ export default class Variant extends OpenCGAParentClass { /** Delete cohort variant stats from a cohort. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - study. - * @param {String} [params.cohort] - Cohort ID or name. + * @param {String} [params.cohort] - Cohort ID or UUID. * @returns {Promise} Promise object in the form of RestResponse instance. */ deleteCohortStats(params) { @@ -138,7 +141,7 @@ export default class Variant extends OpenCGAParentClass { } /** Read cohort variant stats from list of cohorts. - * @param {String} cohort - Comma separated list of cohort names or IDs up to a maximum of 100. + * @param {String} cohort - Comma separated list of cohort IDs or UUIDs up to a maximum of 100. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - study. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -210,7 +213,7 @@ export default class Variant extends OpenCGAParentClass { return this._post("analysis", null, "variant/family/qc", null, "run", data, params); } - /** Remove variant files from the variant storage + /** [DEPRECATED] Use operation/variant/delete * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not * provided. @@ -226,8 +229,8 @@ export default class Variant extends OpenCGAParentClass { return this._delete("analysis", null, "variant/file", null, "delete", params); } - /** GATK is a Genome Analysis Toolkit for variant discovery in high-throughput sequencing data. - * @param {Object} data - gatk params. + /** GATK is a Genome Analysis Toolkit for variant discovery in high-throughput sequencing data. Supported Gatk commands: HaplotypeCaller + * @param {Object} data - Gatk parameters. Supported Gatk commands: HaplotypeCaller. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - study. * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not @@ -241,6 +244,23 @@ export default class Variant extends OpenCGAParentClass { return this._post("analysis", null, "variant/gatk", null, "run", data, params); } + /** Generate a genome plot for a given sample. + * @param {Object} data - Genome plot analysis params to customize the plot. The configuration file includes the title, the plot density + * (i.e., the number of points to display), the general query and the list of tracks. Currently, the supported track types are: COPY- + * NUMBER, INDEL, REARRANGEMENT and SNV. In addition, each track can contain a specific query. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobTags] - Job tags. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + runGenomePlot(data, params) { + return this._post("analysis", null, "variant/genomePlot", null, "run", data, params); + } + /** Run a Genome Wide Association Study between two cohorts. * @param {Object} data - Gwas analysis params. * @param {Object} [params] - The Object containing the following optional parameters: @@ -256,7 +276,7 @@ export default class Variant extends OpenCGAParentClass { return this._post("analysis", null, "variant/gwas", null, "run", data, params); } - /** Index variant files into the variant storage + /** [DEPRECATED] Use operation/variant/index * @param {Object} data - Variant index params. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. @@ -355,24 +375,26 @@ export default class Variant extends OpenCGAParentClass { return this._post("analysis", null, "variant/mendelianError", null, "run", data, params); } - /** + /** * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.project] - Project [user@]project where project can be either the ID or the alias. * @param {String} [params.study] - Filter variants from the given studies, these can be either the numeric ID or the alias with the * format user@project:study. * @param {String} [params.file] - Filter variants from the files specified. This will set includeFile parameter when not provided. * @param {String} [params.sample] - Filter variants by sample genotype. This will automatically set 'includeSample' parameter when not - * provided. This filter accepts multiple 3 form: 1) List of samples: Samples that contain the main variant. Accepts AND (;) and OR (,) + * 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 and MISS e.g. + * 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: [ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, * mendelianError, compoundHeterozygous ]. Value is case insensitive. e.g. HG0097:DeNovo Sample must have parents defined and indexed. . * @param {String} [params.includeStudy] - List of studies to include in the result. Accepts 'all' and 'none'. - * @param {String} [params.includeFile] - List of files to be returned. Accepts 'all' and 'none'. - * @param {String} [params.includeSample] - List of samples to be included in the result. Accepts 'all' and 'none'. + * @param {String} [params.includeFile] - List of files to be returned. Accepts 'all' and 'none'. If undefined, automatically includes + * files used for filtering. If none, no file is included. + * @param {String} [params.includeSample] - List of samples to be included in the result. Accepts 'all' and 'none'. If undefined, + * automatically includes samples used for filtering. If none, no sample is included. * @param {String} [params.include] - Fields included in the response, whole JSON path must be provided. * @param {String} [params.exclude] - Fields excluded in the response, whole JSON path must be provided. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -386,7 +408,8 @@ export default class Variant extends OpenCGAParentClass { * @param {String} [params.study] - Filter variants from the given studies, these can be either the numeric ID or the alias with the * format user@project:study. * @param {String} [params.sample] - Sample name. - * @param {String} [params.ct] - List of SO consequence types, e.g. missense_variant,stop_lost or SO:0001583,SO:0001578. + * @param {String} [params.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'. * @param {String} [params.biotype] - List of biotypes, e.g. protein_coding. * @param {String} [params.fileData] - Filter by file data (i.e. FILTER, QUAL and INFO columns from VCF file). * [{file}:]{key}{op}{value}[,;]* . If no file is specified, will use all files from "file" filter. e.g. AN>200 or @@ -400,6 +423,17 @@ export default class Variant extends OpenCGAParentClass { * @param {String} [params.gene] - List of genes, most gene IDs are accepted (HGNC, Ensembl gene, ...). This is an alias to 'xref' * parameter. * @param {String} [params.panel] - Filter by genes from the given disease panel. + * @param {String} [params.panelModeOfInheritance] - Filter genes from specific panels that match certain mode of inheritance. Accepted + * values : [ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, mendelianError, + * compoundHeterozygous ]. + * @param {String} [params.panelConfidence] - Filter genes from specific panels that match certain confidence. Accepted values : [ high, + * medium, low, rejected ]. + * @param {String} [params.panelFeatureType] - Filter elements from specific panels by type. Accepted values : [ gene, region, str, + * variant ]. + * @param {String} [params.panelRoleInCancer] - Filter genes from specific panels that match certain role in cancer. Accepted values : [ + * both, oncogene, tumorSuppressorGene, fusion ]. + * @param {Boolean} [params.panelIntersection] - Intersect panel genes and regions with given genes and regions from que input query. + * This will prevent returning variants from regions out of the panel. * @param {Boolean} [params.fitting = "false"] - Compute the relative proportions of the different mutational signatures demonstrated by * the tumour. The default value is false. * @returns {Promise} Promise object in the form of RestResponse instance. @@ -471,18 +505,18 @@ export default class Variant extends OpenCGAParentClass { * [{file}:]{key}{op}{value}[,;]* . 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. * @param {String} [params.sample] - Filter variants by sample genotype. This will automatically set 'includeSample' parameter when not - * provided. This filter accepts multiple 3 form: 1) List of samples: Samples that contain the main variant. Accepts AND (;) and OR (,) + * 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 and MISS e.g. + * 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: [ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, * mendelianError, compoundHeterozygous ]. Value is case insensitive. e.g. HG0097:DeNovo Sample must have parents defined and indexed. . * @param {String} [params.genotype] - Samples with a specific genotype: {samp_1}:{gt_1}(,{gt_n})*(;{samp_n}:{gt_1}(,{gt_n})*)* 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 and MISS e.g. + * 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. This will automatically set 'includeSample' parameter when not provided. * @param {String} [params.sampleData] - Filter by any SampleData field from samples. [{sample}:]{key}{op}{value}[,;]* . 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 @@ -511,8 +545,10 @@ export default class Variant extends OpenCGAParentClass { * @param {String} [params.familyMembers] - Sub set of the members of a given family. * @param {String} [params.familyProband] - Specify the proband child to use for the family segregation. * @param {String} [params.includeStudy] - List of studies to include in the result. Accepts 'all' and 'none'. - * @param {String} [params.includeFile] - List of files to be returned. Accepts 'all' and 'none'. - * @param {String} [params.includeSample] - List of samples to be included in the result. Accepts 'all' and 'none'. + * @param {String} [params.includeFile] - List of files to be returned. Accepts 'all' and 'none'. If undefined, automatically includes + * files used for filtering. If none, no file is included. + * @param {String} [params.includeSample] - List of samples to be included in the result. Accepts 'all' and 'none'. If undefined, + * automatically includes samples used for filtering. If none, no sample is included. * @param {String} [params.includeSampleData] - List of Sample Data keys (i.e. FORMAT column from VCF file) from Sample Data to include * in the output. e.g: DP,AD. Accepts 'all' and 'none'. * @param {String} [params.includeGenotype] - Include genotypes, apart of other formats defined with includeFormat. @@ -520,7 +556,8 @@ export default class Variant extends OpenCGAParentClass { * @param {Boolean} [params.annotationExists] - Return only annotated variants. * @param {String} [params.gene] - List of genes, most gene IDs are accepted (HGNC, Ensembl gene, ...). This is an alias to 'xref' * parameter. - * @param {String} [params.ct] - List of SO consequence types, e.g. missense_variant,stop_lost or SO:0001583,SO:0001578. + * @param {String} [params.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'. * @param {String} [params.xref] - List of any external reference, these can be genes, proteins or variants. Accepted IDs include HGNC, * Ensembl genes, dbSNP, ClinVar, HPO, Cosmic, ... * @param {String} [params.biotype] - List of biotypes, e.g. protein_coding. @@ -534,8 +571,8 @@ export default class Variant extends OpenCGAParentClass { * 1kG_phase3:ALL<0.01. * @param {String} [params.populationFrequencyMaf] - Population minor allele frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. * 1kG_phase3:ALL<0.01. - * @param {String} [params.transcriptFlag] - List of transcript annotation flags. e.g. CCDS, basic, cds_end_NF, mRNA_end_NF, - * cds_start_NF, mRNA_start_NF, seleno. + * @param {String} [params.transcriptFlag] - List of transcript flags. e.g. canonical, CCDS, basic, LRG, MANE Select, MANE Plus Clinical, + * EGLH_HaemOnc, TSO500. * @param {String} [params.geneTraitId] - List of gene trait association id. e.g. "umls:C0007222" , "OMIM:269600". * @param {String} [params.go] - List of GO (Gene Ontology) terms. e.g. "GO:0002020". * @param {String} [params.expression] - List of tissues of interest. e.g. "lung". @@ -543,9 +580,22 @@ export default class Variant extends OpenCGAParentClass { * @param {String} [params.drug] - List of drug names. * @param {String} [params.functionalScore] - Functional score: {functional_score}[<|>|<=|>=]{number} e.g. cadd_scaled>5.2 , * cadd_raw<=0.3. + * @param {String} [params.clinical] - Clinical source: clinvar, cosmic. * @param {String} [params.clinicalSignificance] - Clinical significance: benign, likely_benign, likely_pathogenic, pathogenic. + * @param {Boolean} [params.clinicalConfirmedStatus] - Clinical confirmed status. * @param {String} [params.customAnnotation] - Custom annotation: {key}[<|>|<=|>=]{number} or {key}[~=|=]{text}. * @param {String} [params.panel] - Filter by genes from the given disease panel. + * @param {String} [params.panelModeOfInheritance] - Filter genes from specific panels that match certain mode of inheritance. Accepted + * values : [ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, mendelianError, + * compoundHeterozygous ]. + * @param {String} [params.panelConfidence] - Filter genes from specific panels that match certain confidence. Accepted values : [ high, + * medium, low, rejected ]. + * @param {String} [params.panelRoleInCancer] - Filter genes from specific panels that match certain role in cancer. Accepted values : [ + * both, oncogene, tumorSuppressorGene, fusion ]. + * @param {String} [params.panelFeatureType] - Filter elements from specific panels by type. Accepted values : [ gene, region, str, + * variant ]. + * @param {Boolean} [params.panelIntersection] - Intersect panel genes and regions with given genes and regions from que input query. + * This will prevent returning variants from regions out of the panel. * @param {String} [params.trait] - List of traits, based on ClinVar, HPO, COSMIC, i.e.: IDs, histologies, descriptions,... * @returns {Promise} Promise object in the form of RestResponse instance. */ @@ -568,8 +618,8 @@ export default class Variant extends OpenCGAParentClass { return this._post("analysis", null, "variant/relatedness", null, "run", data, params); } - /** Rvtests is a flexible software package for genetic association studies - * @param {Object} data - rvtest params. + /** Rvtests is a flexible software package for genetic association studies. Supported RvTests commands: rvtest, vcf2kinship + * @param {Object} data - RvTests parameters. Supported RvTests commands: rvtest, vcf2kinship. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - study. * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not @@ -597,18 +647,18 @@ export default class Variant extends OpenCGAParentClass { * @param {String} [params.filter] - Specify the FILTER for any of the files. If 'file' filter is provided, will match the file and the * filter. e.g.: PASS,LowGQX. * @param {String} [params.sample] - Filter variants by sample genotype. This will automatically set 'includeSample' parameter when not - * provided. This filter accepts multiple 3 form: 1) List of samples: Samples that contain the main variant. Accepts AND (;) and OR (,) + * 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 and MISS e.g. + * 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: [ autosomalDominant, autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, * mendelianError, compoundHeterozygous ]. Value is case insensitive. e.g. HG0097:DeNovo Sample must have parents defined and indexed. . * @param {String} [params.genotype] - Samples with a specific genotype: {samp_1}:{gt_1}(,{gt_n})*(;{samp_n}:{gt_1}(,{gt_n})*)* 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 and MISS e.g. + * 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. This will automatically set 'includeSample' parameter when not provided. * @param {String} [params.sampleAnnotation] - Selects some samples using metadata information from Catalog. e.g. * age>20;phenotype=hpo:123,hpo:456;name=smith. @@ -619,11 +669,14 @@ export default class Variant extends OpenCGAParentClass { * autosomalRecessive, XLinkedDominant, XLinkedRecessive, YLinked, mitochondrial, deNovo, mendelianError, compoundHeterozygous ]. * @param {String} [params.familyMembers] - Sub set of the members of a given family. * @param {String} [params.familyProband] - Specify the proband child to use for the family segregation. - * @param {String} [params.ct] - List of SO consequence types, e.g. missense_variant,stop_lost or SO:0001583,SO:0001578. + * @param {String} [params.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'. * @param {String} [params.biotype] - List of biotypes, e.g. protein_coding. * @param {String} [params.populationFrequencyAlt] - Alternate Population Frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. * 1kG_phase3:ALL<0.01. + * @param {String} [params.clinical] - Clinical source: clinvar, cosmic. * @param {String} [params.clinicalSignificance] - Clinical significance: benign, likely_benign, likely_pathogenic, pathogenic. + * @param {Boolean} [params.clinicalConfirmedStatus] - Clinical confirmed status. * @param {String} [params.field] - List of facet fields separated by semicolons, e.g.: studies;type. For nested faceted fields use >>, * e.g.: chromosome>>type . Accepted values: chromosome, type, genotype, consequenceType, biotype, clinicalSignificance, dp, qual, * filter. @@ -648,9 +701,9 @@ export default class Variant extends OpenCGAParentClass { return this._post("analysis", null, "variant/sample/eligibility", null, "run", data, params); } - /** Run quality control (QC) for a given sample. It includes variant stats and gene coverage stats; and for somatic samples, mutational - * signature - * @param {Object} data - Sample QC analysis params. + /** Run quality control (QC) for a given sample. It includes variant stats, and if the sample is somatic, mutational signature and genome + * plot are calculated. + * @param {Object} data - Sample QC analysis params. Mutational signature and genome plot are calculated for somatic samples only. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not @@ -706,11 +759,17 @@ export default class Variant extends OpenCGAParentClass { * @param {String} [params.sampleData] - Filter by any SampleData field from samples. [{sample}:]{key}{op}{value}[,;]* . 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. - * @param {String} [params.ct] - List of SO consequence types, e.g. missense_variant,stop_lost or SO:0001583,SO:0001578. + * @param {String} [params.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'. * @param {String} [params.biotype] - List of biotypes, e.g. protein_coding. + * @param {String} [params.transcriptFlag] - List of transcript flags. e.g. canonical, CCDS, basic, LRG, MANE Select, MANE Plus Clinical, + * EGLH_HaemOnc, TSO500. * @param {String} [params.populationFrequencyAlt] - Alternate Population Frequency: {study}:{population}[<|>|<=|>=]{number}. e.g. * 1kG_phase3:ALL<0.01. + * @param {String} [params.clinical] - Clinical source: clinvar, cosmic. * @param {String} [params.clinicalSignificance] - Clinical significance: benign, likely_benign, likely_pathogenic, pathogenic. + * @param {Boolean} [params.clinicalConfirmedStatus] - Clinical confirmed status. + * @param {Boolean} [params.filterTranscript] - Do filter transcripts when obtaining transcript counts. * @returns {Promise} Promise object in the form of RestResponse instance. */ querySampleStats(sample, params) { @@ -764,4 +823,4 @@ export default class Variant extends OpenCGAParentClass { return this._post("analysis", null, "variant/stats", null, "run", data, params); } -} +} \ No newline at end of file diff --git a/src/core/clients/opencga/api/VariantOperation.js b/src/core/clients/opencga/api/VariantOperation.js index 4413d7bde3..ac77e44795 100644 --- a/src/core/clients/opencga/api/VariantOperation.js +++ b/src/core/clients/opencga/api/VariantOperation.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * WARNING: AUTOGENERATED CODE - * + * * This code was generated by a tool. - * Autogenerated on: 2021-04-30 10:42:30 - * + * Autogenerated on: 2022-05-20 02:30:03 + * * Manual changes to this file may cause unexpected behavior in your application. - * Manual changes to this file will be overwritten if the code is regenerated. + * Manual changes to this file will be overwritten if the code is regenerated. * **/ @@ -32,6 +32,18 @@ export default class VariantOperation extends OpenCGAParentClass { super(config); } + /** Update Cellbase configuration + * @param {Object} [data] - New cellbase configuration. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.project] - Project [user@]project where project can be either the ID or the alias. + * @param {Boolean} [params.annotationUpdate] - Create and load variant annotations into the database. + * @param {String} [params.annotationSaveId] - Save a copy of the current variant annotation at the database. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + configureCellbase(data, params) { + return this._post("operation", null, "cellbase", null, "configure", data, params); + } + /** Find variants where not all the samples are present, and fill the empty values, excluding HOM-REF (0/0) values. * @param {Object} [data] - Variant aggregate params. * @param {Object} [params] - The Object containing the following optional parameters: @@ -104,6 +116,21 @@ export default class VariantOperation extends OpenCGAParentClass { return this._post("operation", null, "variant", null, "configure", data, params); } + /** Remove variant files from the variant storage + * @param {Object} [data] - Variant delete file params. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobTags] - Job tags. + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + deleteVariant(data, params) { + return this._post("operation", null, "variant", null, "delete", data, params); + } + /** Find variants where not all the samples are present, and fill the empty values. * @param {Object} [data] - Variant aggregate family params. * @param {Object} [params] - The Object containing the following optional parameters: @@ -119,7 +146,7 @@ export default class VariantOperation extends OpenCGAParentClass { return this._post("operation", null, "variant/family", null, "aggregate", data, params); } - /** Build the family index + /** DEPRECATED: integrated in index (DEPRECATED Build the family index) * @param {Object} [data] - Variant family index params. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not @@ -134,6 +161,21 @@ export default class VariantOperation extends OpenCGAParentClass { return this._post("operation", null, "variant/family", null, "index", data, params); } + /** Index variant files into the variant storage + * @param {Object} [data] - Variant index params. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobTags] - Job tags. + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + indexVariant(data, params) { + return this._post("operation", null, "variant", null, "index", data, params); + } + /** Detect non-indexed VCF files in the study, and submit a job for indexing them. * @param {Object} [data] - . * @param {Object} [params] - The Object containing the following optional parameters: @@ -193,7 +235,22 @@ export default class VariantOperation extends OpenCGAParentClass { return this._post("operation", null, "variant/metadata", null, "synchronize", data, params); } - /** Build and annotate the sample index + /** Remove variant samples from the variant storage + * @param {Object} [data] - Variant delete sample params. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobTags] - Job tags. + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + deleteVariantSample(data, params) { + return this._post("operation", null, "variant/sample", null, "delete", data, params); + } + + /** DEPRECATED You should use the new sample index method instead. * @param {Object} [data] - Variant sample index params. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not @@ -208,13 +265,14 @@ export default class VariantOperation extends OpenCGAParentClass { return this._post("operation", null, "variant/sample", null, "index", data, params); } - /** Update SampleIndex configuration + /** DEPRECATED You should use the new sample index configure method. * @param {Object} [data] - New SampleIndexConfiguration. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {Boolean} [params.skipRebuild] - Skip sample index re-build. * @returns {Promise} Promise object in the form of RestResponse instance. */ - configureSampleIndex(data, params) { + variantSampleIndexConfigure(data, params) { return this._post("operation", null, "variant/sample/index", null, "configure", data, params); } @@ -257,7 +315,49 @@ export default class VariantOperation extends OpenCGAParentClass { return this._post("operation", null, "variant/score", null, "index", data, params); } - /** Creates a secondary index using a search engine. If samples are provided, sample data will be added to the secondary index. + /** Creates a secondary index using a search engine. If samples are provided, sample data will be added to the secondary index. (New!) + * @param {Object} [data] - Variant secondary index params. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobTags] - Job tags. + * @param {String} [params.project] - Project [user@]project where project can be either the ID or the alias. + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + variantSecondaryAnnotationIndex(data, params) { + return this._post("operation", null, "variant/secondary/annotation", null, "index", data, params); + } + + /** Build and annotate the sample index. (New!) + * @param {Object} [data] - Variant sample index params. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobTags] - Job tags. + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + variantSecondarySampleIndex(data, params) { + return this._post("operation", null, "variant/secondary/sample", null, "index", data, params); + } + + /** Update SampleIndex configuration (New!) + * @param {Object} [data] - New SampleIndexConfiguration. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {Boolean} [params.skipRebuild] - Skip sample index re-build. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + configureVariantSecondarySampleIndex(data, params) { + return this._post("operation", null, "variant/secondary/sample/index", null, "configure", data, params); + } + + /** DEPRECATED you should use the new annotation index method instead. * @param {Object} [data] - Variant secondary index params. * @param {Object} [params] - The Object containing the following optional parameters: * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not @@ -288,6 +388,21 @@ export default class VariantOperation extends OpenCGAParentClass { return this._delete("operation", null, "variant/secondaryIndex", null, "delete", params); } + /** Deletes the VariantStats of a cohort/s from the database + * @param {Object} data - Variant stats delete params. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobTags] - Job tags. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + deleteVariantStats(data, params) { + return this._post("operation", null, "variant/stats", null, "delete", data, params); + } + /** Compute variant stats for any cohort and any set of variants and index the result in the variant storage database. * @param {Object} data - Variant stats params. * @param {Object} [params] - The Object containing the following optional parameters: @@ -303,4 +418,19 @@ export default class VariantOperation extends OpenCGAParentClass { return this._post("operation", null, "variant/stats", null, "index", data, params); } -} + /** Remove whole study from the variant storage + * @param {Object} [data] - Variant delete study params. + * @param {Object} [params] - The Object containing the following optional parameters: + * @param {String} [params.jobId] - Job ID. It must be a unique string within the study. An ID will be autogenerated automatically if not + * provided. + * @param {String} [params.jobDescription] - Job description. + * @param {String} [params.jobDependsOn] - Comma separated list of existing job IDs the job will depend on. + * @param {String} [params.jobTags] - Job tags. + * @param {String} [params.study] - Study [[user@]project:]study where study and project can be either the ID or UUID. + * @returns {Promise} Promise object in the form of RestResponse instance. + */ + deleteVariantStudy(data, params) { + return this._post("operation", null, "variant/study", null, "delete", data, params); + } + +} \ No newline at end of file From 85bc7082ac5e547e842a3e3e436e0ca649d5d03f Mon Sep 17 00:00:00 2001 From: imedina Date: Sun, 22 May 2022 04:01:31 +0100 Subject: [PATCH 03/32] ci/cd: make Docker organisation configurable --- .github/workflows/develop.yml | 2 ++ .github/workflows/release.yml | 2 ++ .../interpretation/variant-interpreter-browser-cancer.js | 5 +++++ .../variant/interpretation/variant-interpreter-browser-rd.js | 5 +++++ 4 files changed, 14 insertions(+) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index a2a4e9a973..7300bba81c 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -16,9 +16,11 @@ jobs: secrets: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} + DOCKER_ORGANISATION: ${{ secrets.DOCKER_ORGANISATION }} deploy: needs: build + if: github.repository == "opencb/jsorolla" uses: opencb/jsorolla/.github/workflows/deploy-jsorolla-workflow.yml@develop with: version: ${{ needs.build.outputs.version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94b4cf65bd..6830fc3575 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,7 @@ jobs: secrets: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} + DOCKER_ORGANISATION: ${{ secrets.DOCKER_ORGANISATION }} release: needs: [build, docker] @@ -25,6 +26,7 @@ jobs: deploy: needs: build + if: github.repository == "opencb/jsorolla" uses: opencb/jsorolla/.github/workflows/deploy-jsorolla-workflow.yml@develop with: version: ${{ needs.build.outputs.version }} diff --git a/src/webcomponents/variant/interpretation/variant-interpreter-browser-cancer.js b/src/webcomponents/variant/interpretation/variant-interpreter-browser-cancer.js index ddde0574d6..b756a05717 100644 --- a/src/webcomponents/variant/interpretation/variant-interpreter-browser-cancer.js +++ b/src/webcomponents/variant/interpretation/variant-interpreter-browser-cancer.js @@ -187,6 +187,11 @@ class VariantInterpreterBrowserCancer extends LitElement { .filter(file => file.format.toUpperCase() === "VCF"); } + // 6. Read defaultFilter from study internal configuration + if (this.opencgaSession.study.internal?.configuration?.clinical?.interpretation?.defaultFilter) { + this.query = {...this.query, ...this.opencgaSession.study.internal.configuration.clinical.interpretation.defaultFilter}; + } + // Create _config again since getDefaultConfig() uses this.files this._config = this.getDefaultConfig(); diff --git a/src/webcomponents/variant/interpretation/variant-interpreter-browser-rd.js b/src/webcomponents/variant/interpretation/variant-interpreter-browser-rd.js index 8285791836..47c41f7481 100644 --- a/src/webcomponents/variant/interpretation/variant-interpreter-browser-rd.js +++ b/src/webcomponents/variant/interpretation/variant-interpreter-browser-rd.js @@ -205,6 +205,11 @@ class VariantInterpreterBrowserRd extends LitElement { .filter(file => file.format.toUpperCase() === "VCF"); } + // 5. Read defaultFilter from study internal configuration + if (this.opencgaSession.study.internal?.configuration?.clinical?.interpretation?.defaultFilter) { + this.query = {...this.query, ...this.opencgaSession.study.internal.configuration.clinical.interpretation.defaultFilter}; + } + // Create _config again since getDefaultConfig() uses this.files this._config = this.getDefaultConfig(); From a54eb35e7b8e024ad244288aede3f9c58737ada0 Mon Sep 17 00:00:00 2001 From: imedina Date: Sun, 22 May 2022 04:09:59 +0100 Subject: [PATCH 04/32] ci/cd: add CLI param --organisation --- .github/workflows/docker-jsorolla-workflow.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-jsorolla-workflow.yml b/.github/workflows/docker-jsorolla-workflow.yml index 8079c897fa..be8ffdedf5 100644 --- a/.github/workflows/docker-jsorolla-workflow.yml +++ b/.github/workflows/docker-jsorolla-workflow.yml @@ -7,7 +7,7 @@ on: required: true DOCKER_HUB_PASSWORD: required: true - + jobs: docker-jsorolla-workflow: name: Publish JSorolla Docker @@ -22,5 +22,4 @@ jobs: with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} - - run: python3 ./docker/docker-build.py push --images app - + - run: python3 ./docker/docker-build.py push --organisation ${{ secrets.DOCKER_ORGANISATION }} --images ${{ secrets.DOCKER_IMAGES_JSOROLLA }} From ac1368125a99c2a122e702d7fe69202ffb2f7802 Mon Sep 17 00:00:00 2001 From: imedina Date: Sun, 22 May 2022 04:12:29 +0100 Subject: [PATCH 05/32] ci/cd: add secret params --- .github/workflows/develop.yml | 1 + .github/workflows/docker-jsorolla-workflow.yml | 4 ++++ .github/workflows/release.yml | 1 + 3 files changed, 6 insertions(+) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 7300bba81c..437ed3ba81 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -17,6 +17,7 @@ jobs: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} DOCKER_ORGANISATION: ${{ secrets.DOCKER_ORGANISATION }} + DOCKER_IMAGES_JSOROLLA: ${{ secrets.DOCKER_IMAGES_JSOROLLA }} deploy: needs: build diff --git a/.github/workflows/docker-jsorolla-workflow.yml b/.github/workflows/docker-jsorolla-workflow.yml index be8ffdedf5..11f9beeb6a 100644 --- a/.github/workflows/docker-jsorolla-workflow.yml +++ b/.github/workflows/docker-jsorolla-workflow.yml @@ -7,6 +7,10 @@ on: required: true DOCKER_HUB_PASSWORD: required: true + DOCKER_ORGANISATION: + required: true + DOCKER_IMAGES_JSOROLLA: + required: true jobs: docker-jsorolla-workflow: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6830fc3575..bc5406665d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,7 @@ jobs: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} DOCKER_ORGANISATION: ${{ secrets.DOCKER_ORGANISATION }} + DOCKER_IMAGES_JSOROLLA: ${{ secrets.DOCKER_IMAGES_JSOROLLA }} release: needs: [build, docker] From 695dce7eaf94150bf3214de762d2202a826f6d25 Mon Sep 17 00:00:00 2001 From: imedina Date: Sun, 22 May 2022 04:20:32 +0100 Subject: [PATCH 06/32] ci/cd: fix Actions condition --- .github/workflows/develop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 437ed3ba81..ee3cab1ed5 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -21,7 +21,7 @@ jobs: deploy: needs: build - if: github.repository == "opencb/jsorolla" + if: ${{ github.repository == 'opencb/jsorolla' }} uses: opencb/jsorolla/.github/workflows/deploy-jsorolla-workflow.yml@develop with: version: ${{ needs.build.outputs.version }} From 10e1b854ae4e932c7b955274a529491c5893bdbf Mon Sep 17 00:00:00 2001 From: imedina Date: Mon, 23 May 2022 01:25:42 +0100 Subject: [PATCH 07/32] ci/cd: more fixes and secrets rename --- .github/workflows/build-jsorolla-workflow.yml | 10 ++++++++-- .github/workflows/develop.yml | 2 +- .github/workflows/docker-jsorolla-workflow.yml | 4 ++-- .github/workflows/release.yml | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-jsorolla-workflow.yml b/.github/workflows/build-jsorolla-workflow.yml index 7c1de7d99b..b33216fbef 100644 --- a/.github/workflows/build-jsorolla-workflow.yml +++ b/.github/workflows/build-jsorolla-workflow.yml @@ -14,7 +14,14 @@ jobs: outputs: version: ${{ steps.package.outputs.version }} steps: - - uses: actions/checkout@v2 + - name: "Checkout JSorolla" + uses: actions/checkout@v2 + - name: "Checkout private custom sites repo inside JSorolla" + uses: actions/checkout@v2 + if: ${{ github.repository != 'opencb/jsorolla' }} + with: + repository: ${{ secrets.JSOROLLA_CUSTOM_SITES_REPOSITORY }} + path: custom-sites - uses: actions/setup-node@v2 with: node-version: "16" @@ -44,4 +51,3 @@ jobs: # TODO: we should rename the iva-VERSION.tar.gz file as jsorolla-VERSION.tar.gz path: iva-${{ steps.package.outputs.version }}.tar.gz retention-days: 1 - \ No newline at end of file diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index ee3cab1ed5..98626a72cd 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -16,7 +16,7 @@ jobs: secrets: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} - DOCKER_ORGANISATION: ${{ secrets.DOCKER_ORGANISATION }} + DOCKER_HUB_ORGANISATION: ${{ secrets.DOCKER_HUB_ORGANISATION }} DOCKER_IMAGES_JSOROLLA: ${{ secrets.DOCKER_IMAGES_JSOROLLA }} deploy: diff --git a/.github/workflows/docker-jsorolla-workflow.yml b/.github/workflows/docker-jsorolla-workflow.yml index 11f9beeb6a..282b5a92d4 100644 --- a/.github/workflows/docker-jsorolla-workflow.yml +++ b/.github/workflows/docker-jsorolla-workflow.yml @@ -7,7 +7,7 @@ on: required: true DOCKER_HUB_PASSWORD: required: true - DOCKER_ORGANISATION: + DOCKER_HUB_ORGANISATION: required: true DOCKER_IMAGES_JSOROLLA: required: true @@ -26,4 +26,4 @@ jobs: with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} - - run: python3 ./docker/docker-build.py push --organisation ${{ secrets.DOCKER_ORGANISATION }} --images ${{ secrets.DOCKER_IMAGES_JSOROLLA }} + - run: python3 ./docker/docker-build.py push --organisation ${{ secrets.DOCKER_HUB_ORGANISATION }} --images ${{ secrets.DOCKER_IMAGES_JSOROLLA }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc5406665d..70bfdb0d22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: secrets: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} - DOCKER_ORGANISATION: ${{ secrets.DOCKER_ORGANISATION }} + DOCKER_HUB_ORGANISATION: ${{ secrets.DOCKER_HUB_ORGANISATION }} DOCKER_IMAGES_JSOROLLA: ${{ secrets.DOCKER_IMAGES_JSOROLLA }} release: From a945c25776ab9dec8664553dcc3ec52dfa32338b Mon Sep 17 00:00:00 2001 From: imedina Date: Mon, 23 May 2022 01:33:56 +0100 Subject: [PATCH 08/32] ci/cd: fix Docker deploy --- .github/workflows/docker-jsorolla-workflow.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-jsorolla-workflow.yml b/.github/workflows/docker-jsorolla-workflow.yml index 282b5a92d4..72192a3437 100644 --- a/.github/workflows/docker-jsorolla-workflow.yml +++ b/.github/workflows/docker-jsorolla-workflow.yml @@ -17,7 +17,14 @@ jobs: name: Publish JSorolla Docker runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - name: "Checkout JSorolla" + uses: actions/checkout@v2 + - name: "Checkout private custom sites repo inside JSorolla" + uses: actions/checkout@v2 + if: ${{ github.repository != 'opencb/jsorolla' }} + with: + repository: ${{ secrets.JSOROLLA_CUSTOM_SITES_REPOSITORY }} + path: custom-sites - uses: actions/download-artifact@v2 with: name: jsorolla-build From 33b138bd8726683dabc17b7aa0e18b66da5b9ef0 Mon Sep 17 00:00:00 2001 From: imedina Date: Mon, 23 May 2022 01:48:39 +0100 Subject: [PATCH 09/32] ci/cd: print Docker deploy logs --- docker/docker-build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/docker-build.py b/docker/docker-build.py index bd03a5d3d4..1b206b85f7 100755 --- a/docker/docker-build.py +++ b/docker/docker-build.py @@ -159,6 +159,10 @@ def delete(): if not os.path.isdir('custom-sites'): error("Custom sites folder does not exist (required if images is set to 'all')") # Get all folders in 'custom-sites' + arr = os.listdir('.') + print(arr) + arr = os.listdir('custom-sites') + print(arr) images = [d for d in os.listdir("custom-sites") if os.path.isdir(os.path.join("custom-sites", d)) and not d.startswith(".")] else: images = args.images.split(",") From 58972cf99ee4f7862659a3b7392904ff595c0aed Mon Sep 17 00:00:00 2001 From: imedina Date: Mon, 23 May 2022 02:00:30 +0100 Subject: [PATCH 10/32] ci/cd: increment checkout version --- .github/workflows/docker-jsorolla-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-jsorolla-workflow.yml b/.github/workflows/docker-jsorolla-workflow.yml index 72192a3437..933151b822 100644 --- a/.github/workflows/docker-jsorolla-workflow.yml +++ b/.github/workflows/docker-jsorolla-workflow.yml @@ -18,9 +18,9 @@ jobs: runs-on: ubuntu-20.04 steps: - name: "Checkout JSorolla" - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: "Checkout private custom sites repo inside JSorolla" - uses: actions/checkout@v2 + uses: actions/checkout@v3 if: ${{ github.repository != 'opencb/jsorolla' }} with: repository: ${{ secrets.JSOROLLA_CUSTOM_SITES_REPOSITORY }} From bbf049d15b2819424188ec2095ad5f84fe7be182 Mon Sep 17 00:00:00 2001 From: imedina Date: Mon, 23 May 2022 02:20:47 +0100 Subject: [PATCH 11/32] ci/cd: fix Docker deploy --- .github/workflows/build-jsorolla-workflow.yml | 12 ++++++------ .github/workflows/docker-jsorolla-workflow.yml | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-jsorolla-workflow.yml b/.github/workflows/build-jsorolla-workflow.yml index b33216fbef..698966fe2a 100644 --- a/.github/workflows/build-jsorolla-workflow.yml +++ b/.github/workflows/build-jsorolla-workflow.yml @@ -16,12 +16,12 @@ jobs: steps: - name: "Checkout JSorolla" uses: actions/checkout@v2 - - name: "Checkout private custom sites repo inside JSorolla" - uses: actions/checkout@v2 - if: ${{ github.repository != 'opencb/jsorolla' }} - with: - repository: ${{ secrets.JSOROLLA_CUSTOM_SITES_REPOSITORY }} - path: custom-sites +# - name: "Checkout private custom sites repo inside JSorolla" +# uses: actions/checkout@v2 +# if: ${{ github.repository != 'opencb/jsorolla' }} +# with: +# repository: ${{ secrets.JSOROLLA_CUSTOM_SITES_REPOSITORY }} +# path: custom-sites - uses: actions/setup-node@v2 with: node-version: "16" diff --git a/.github/workflows/docker-jsorolla-workflow.yml b/.github/workflows/docker-jsorolla-workflow.yml index 933151b822..02887cfe9d 100644 --- a/.github/workflows/docker-jsorolla-workflow.yml +++ b/.github/workflows/docker-jsorolla-workflow.yml @@ -18,13 +18,14 @@ jobs: runs-on: ubuntu-20.04 steps: - name: "Checkout JSorolla" - uses: actions/checkout@v3 + uses: actions/checkout@v2 - name: "Checkout private custom sites repo inside JSorolla" - uses: actions/checkout@v3 + uses: actions/checkout@v2 if: ${{ github.repository != 'opencb/jsorolla' }} with: repository: ${{ secrets.JSOROLLA_CUSTOM_SITES_REPOSITORY }} path: custom-sites + ref: main - uses: actions/download-artifact@v2 with: name: jsorolla-build From cc12ef934c7370aeeb67bbb59bb3440d1a39f404 Mon Sep 17 00:00:00 2001 From: Josemi Date: Mon, 23 May 2022 13:06:39 +0200 Subject: [PATCH 12/32] wc: merge variants with user fields in primaryFindings #TASK-861 --- .../variant-interpreter-grid.js | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/webcomponents/variant/interpretation/variant-interpreter-grid.js b/src/webcomponents/variant/interpretation/variant-interpreter-grid.js index 768e519fd3..ab7f83bd79 100644 --- a/src/webcomponents/variant/interpretation/variant-interpreter-grid.js +++ b/src/webcomponents/variant/interpretation/variant-interpreter-grid.js @@ -300,6 +300,33 @@ export default class VariantInterpreterGrid extends LitElement { }, responseHandler: response => { const result = this.gridCommons.responseHandler(response, $(this.table).bootstrapTable("getOptions")); + + // Merge response rows with user information (comments, status, ...) stored in primaryFindings + if (this.clinicalAnalysis?.interpretation?.primaryFindings?.length > 0) { + result.response.rows = result.response.rows.map(row => { + if (!this.checkedVariants.has(row.id)) { + return row; + } + + // Merge row with comments and other user properties + const savedVariant = this.checkedVariants.get(row.id); + return { + ...row, + comments: savedVariant.comments, + status: savedVariant.status, + attributes: savedVariant.attributes, + discussion: savedVariant.discussion, + evidences: row.evidences.map((evidence, index) => ({ + ...evidence, + review: savedVariant.evidences[index], + })), + }; + }); + for (const variant of this.clinicalAnalysis.interpretation.primaryFindings) { + this.checkedVariants.set(variant.id, variant); + } + } + return result.response; }, onClickRow: (row, selectedElement, field) => this.gridCommons.onClickRow(row.id, row, selectedElement), From 29ab605fe0998117f6f55125ad46889e8d6bef9b Mon Sep 17 00:00:00 2001 From: imedina Date: Tue, 24 May 2022 01:12:10 +0100 Subject: [PATCH 13/32] ci/cd: fix Docker build missing param --- .github/workflows/develop.yml | 1 + .github/workflows/docker-jsorolla-workflow.yml | 2 ++ .github/workflows/release.yml | 1 + docker/docker-build.py | 4 ---- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 98626a72cd..86790b711a 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -18,6 +18,7 @@ jobs: DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} DOCKER_HUB_ORGANISATION: ${{ secrets.DOCKER_HUB_ORGANISATION }} DOCKER_IMAGES_JSOROLLA: ${{ secrets.DOCKER_IMAGES_JSOROLLA }} + JSOROLLA_CUSTOM_SITES_REPOSITORY: ${{ secrets.JSOROLLA_CUSTOM_SITES_REPOSITORY }} deploy: needs: build diff --git a/.github/workflows/docker-jsorolla-workflow.yml b/.github/workflows/docker-jsorolla-workflow.yml index 02887cfe9d..095df533d1 100644 --- a/.github/workflows/docker-jsorolla-workflow.yml +++ b/.github/workflows/docker-jsorolla-workflow.yml @@ -11,6 +11,8 @@ on: required: true DOCKER_IMAGES_JSOROLLA: required: true + JSOROLLA_CUSTOM_SITES_REPOSITORY: + required: true jobs: docker-jsorolla-workflow: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70bfdb0d22..b14173a48f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,7 @@ jobs: DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} DOCKER_HUB_ORGANISATION: ${{ secrets.DOCKER_HUB_ORGANISATION }} DOCKER_IMAGES_JSOROLLA: ${{ secrets.DOCKER_IMAGES_JSOROLLA }} + JSOROLLA_CUSTOM_SITES_REPOSITORY: ${{ secrets.JSOROLLA_CUSTOM_SITES_REPOSITORY }} release: needs: [build, docker] diff --git a/docker/docker-build.py b/docker/docker-build.py index 1b206b85f7..bd03a5d3d4 100755 --- a/docker/docker-build.py +++ b/docker/docker-build.py @@ -159,10 +159,6 @@ def delete(): if not os.path.isdir('custom-sites'): error("Custom sites folder does not exist (required if images is set to 'all')") # Get all folders in 'custom-sites' - arr = os.listdir('.') - print(arr) - arr = os.listdir('custom-sites') - print(arr) images = [d for d in os.listdir("custom-sites") if os.path.isdir(os.path.join("custom-sites", d)) and not d.startswith(".")] else: images = args.images.split(",") From 1c947e8954e1e65d41857a1f8dbf90ce009132fc Mon Sep 17 00:00:00 2001 From: imedina Date: Tue, 24 May 2022 01:50:07 +0100 Subject: [PATCH 14/32] ci/cd: add GitHub PAT to clone private repo --- .github/workflows/develop.yml | 1 + .github/workflows/docker-jsorolla-workflow.yml | 5 ++++- .github/workflows/release.yml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 86790b711a..cea16fd607 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -19,6 +19,7 @@ jobs: DOCKER_HUB_ORGANISATION: ${{ secrets.DOCKER_HUB_ORGANISATION }} DOCKER_IMAGES_JSOROLLA: ${{ secrets.DOCKER_IMAGES_JSOROLLA }} JSOROLLA_CUSTOM_SITES_REPOSITORY: ${{ secrets.JSOROLLA_CUSTOM_SITES_REPOSITORY }} + GH_PRIVATE_TOKEN: ${{ secrets.GH_PRIVATE_TOKEN }} deploy: needs: build diff --git a/.github/workflows/docker-jsorolla-workflow.yml b/.github/workflows/docker-jsorolla-workflow.yml index 095df533d1..f8b18d0f4a 100644 --- a/.github/workflows/docker-jsorolla-workflow.yml +++ b/.github/workflows/docker-jsorolla-workflow.yml @@ -13,6 +13,8 @@ on: required: true JSOROLLA_CUSTOM_SITES_REPOSITORY: required: true + GH_PRIVATE_TOKEN: + required: true jobs: docker-jsorolla-workflow: @@ -25,9 +27,10 @@ jobs: uses: actions/checkout@v2 if: ${{ github.repository != 'opencb/jsorolla' }} with: + token: ${{ secrets.GH_PRIVATE_TOKEN }} repository: ${{ secrets.JSOROLLA_CUSTOM_SITES_REPOSITORY }} - path: custom-sites ref: main + path: custom-sites - uses: actions/download-artifact@v2 with: name: jsorolla-build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b14173a48f..b6bad9aaae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,7 @@ jobs: DOCKER_HUB_ORGANISATION: ${{ secrets.DOCKER_HUB_ORGANISATION }} DOCKER_IMAGES_JSOROLLA: ${{ secrets.DOCKER_IMAGES_JSOROLLA }} JSOROLLA_CUSTOM_SITES_REPOSITORY: ${{ secrets.JSOROLLA_CUSTOM_SITES_REPOSITORY }} + GH_PRIVATE_TOKEN: ${{ secrets.GH_PRIVATE_TOKEN }} release: needs: [build, docker] From ba24ad87e2c6f5fe43f9530b5fb9485975209b62 Mon Sep 17 00:00:00 2001 From: imedina Date: Tue, 24 May 2022 02:24:08 +0100 Subject: [PATCH 15/32] ci/cd: add RUN true to avoid some possible issue with multiple copy commands --- docker/iva-app/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/iva-app/Dockerfile b/docker/iva-app/Dockerfile index 1e8c430b83..6923534ff7 100644 --- a/docker/iva-app/Dockerfile +++ b/docker/iva-app/Dockerfile @@ -26,6 +26,8 @@ COPY ./build/iva /usr/local/apache2/htdocs/iva COPY ./${SITE}/iva/conf /usr/local/apache2/htdocs/iva/conf/ COPY ./${SITE}/iva/img /usr/local/apache2/htdocs/iva/img/ +RUN true + ## API COPY ./build/api /usr/local/apache2/htdocs/api COPY ./${SITE}/api/conf /usr/local/apache2/htdocs/api/conf/ From 02ae2e68fdaa054e2cf4035e90592223cc89e64f Mon Sep 17 00:00:00 2001 From: Josemi Date: Tue, 24 May 2022 17:08:16 +0200 Subject: [PATCH 16/32] wc: remove unused loop after variants merge #TASK-861 --- .../variant/interpretation/variant-interpreter-grid.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/webcomponents/variant/interpretation/variant-interpreter-grid.js b/src/webcomponents/variant/interpretation/variant-interpreter-grid.js index ab7f83bd79..09af580be1 100644 --- a/src/webcomponents/variant/interpretation/variant-interpreter-grid.js +++ b/src/webcomponents/variant/interpretation/variant-interpreter-grid.js @@ -322,9 +322,6 @@ export default class VariantInterpreterGrid extends LitElement { })), }; }); - for (const variant of this.clinicalAnalysis.interpretation.primaryFindings) { - this.checkedVariants.set(variant.id, variant); - } } return result.response; From 1277dbcc39563d2a4b5111e53730e9d7002522b6 Mon Sep 17 00:00:00 2001 From: imedina Date: Fri, 27 May 2022 03:16:35 +0100 Subject: [PATCH 17/32] wc: add CellBase v4 compatibility in Ontology filter --- src/core/clients/cellbase/cellbase-client.js | 2 +- .../commons/filters/ontology-autocomplete-filter.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/clients/cellbase/cellbase-client.js b/src/core/clients/cellbase/cellbase-client.js index b50de7ad29..0ec71274c3 100644 --- a/src/core/clients/cellbase/cellbase-client.js +++ b/src/core/clients/cellbase/cellbase-client.js @@ -72,7 +72,7 @@ export class CellBaseClient { }) .catch(e => { console.error(e); - globalEvent("signingInError", {value: "Cellbase host not available."}); + // globalEvent("signingInError", {value: "Cellbase host not available."}); globalEvent("hostInit", {host: "cellbase", value: "NOT AVAILABLE"}); }); } diff --git a/src/webcomponents/commons/filters/ontology-autocomplete-filter.js b/src/webcomponents/commons/filters/ontology-autocomplete-filter.js index c9b0a8a067..644b9ba7cf 100644 --- a/src/webcomponents/commons/filters/ontology-autocomplete-filter.js +++ b/src/webcomponents/commons/filters/ontology-autocomplete-filter.js @@ -19,6 +19,9 @@ import "../../commons/forms/select-token-filter.js"; import LitUtils from "../utils/lit-utils.js"; import NotificationUtils from "../utils/notification-utils.js"; import BioinfoUtils from "../../../core/bioinfo/bioinfo-utils.js"; +// FIXME remove in CellBase v5 +import {CellBaseClient} from "../../../core/clients/cellbase/cellbase-client.js"; + export default class OntologyAutocompleteFilter extends LitElement { @@ -84,7 +87,14 @@ export default class OntologyAutocompleteFilter extends LitElement { source: this._config.ontologyFilter }; try { - const fetchGoOntologies = await this.cellbaseClient.get("feature", "ontology", undefined, "search", query, {}); + // FIXME to support old cellbase v4 + let fetchGoOntologies; + if (this.cellbaseClient?._config?.version === "v4") { + const cellbaseClient = new CellBaseClient({host: "https://ws.opencb.org/cellbase-5.0.0/", version: "v5"}); + fetchGoOntologies = await cellbaseClient.get("feature", "ontology", undefined, "search", query, {}); + } else { + fetchGoOntologies = await this.cellbaseClient.get("feature", "ontology", undefined, "search", query, {}); + } const results = fetchGoOntologies.responses[0].results; const data = results.map(ontology => ({name: ontology.name, id: ontology.id})); success(data); From 668c575fe81bd68b8d632373b63a77c63c4c9879 Mon Sep 17 00:00:00 2001 From: Josemi Date: Mon, 30 May 2022 13:30:11 +0200 Subject: [PATCH 18/32] wc: add missing toolId attribute for displating variant interpreter grids #TASK-862 --- .../variant/interpretation/variant-interpreter-review.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/webcomponents/variant/interpretation/variant-interpreter-review.js b/src/webcomponents/variant/interpretation/variant-interpreter-review.js index 9cc6495335..f52901a513 100644 --- a/src/webcomponents/variant/interpretation/variant-interpreter-review.js +++ b/src/webcomponents/variant/interpretation/variant-interpreter-review.js @@ -150,6 +150,7 @@ export default class VariantInterpreterReview extends LitElement { .clinicalAnalysis="${clinicalAnalysis}" .clinicalVariants="${variants}" .active="${active}" + .toolId="${"variantInterpreterCancerSNV"}" .gridConfig="${{ somatic: true, variantTypes: ["SNV", "INDEL"], @@ -185,6 +186,7 @@ export default class VariantInterpreterReview extends LitElement { .clinicalAnalysis="${clinicalAnalysis}" .clinicalVariants="${variants}" .active="${active}" + .toolId="${"variantInterpreterCancerCNV"}" .gridConfig="${{ somatic: true, variantTypes: ["COPY_NUMBER", "CNV"], @@ -249,6 +251,7 @@ export default class VariantInterpreterReview extends LitElement { .clinicalAnalysis="${clinicalAnalysis}" .clinicalVariants="${variants}" .active="${active}" + .toolId="${"variantInterpreterRD"}" .gridConfig="${{ somatic: false, variantTypes: ["SNV", "INDEL", "INSERTION", "DELETION"], From 4aa3e044d27c8e3ce30dfb686c2ac92e5b166c1e Mon Sep 17 00:00:00 2001 From: Josemi Date: Mon, 30 May 2022 13:30:56 +0200 Subject: [PATCH 19/32] wc: merge grid configuration with saved user configuration in variant review #TASK-862 --- .../variant-interpreter-review-primary.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/webcomponents/variant/interpretation/variant-interpreter-review-primary.js b/src/webcomponents/variant/interpretation/variant-interpreter-review-primary.js index ba4d10cd6e..13e23cb6c3 100644 --- a/src/webcomponents/variant/interpretation/variant-interpreter-review-primary.js +++ b/src/webcomponents/variant/interpretation/variant-interpreter-review-primary.js @@ -63,6 +63,9 @@ export default class VariantInterpreterReviewPrimary extends LitElement { mode: { type: String }, + toolId: { + type: String, + }, settings: { type: Object, }, @@ -123,6 +126,14 @@ export default class VariantInterpreterReviewPrimary extends LitElement { }; } + // Check for user configuration + if (this.toolId && this.opencgaSession.user?.configs?.IVA?.[this.toolId]?.grid) { + this._config.result.grid = { + ...this._config.result.grid, + ...this.opencgaSession.user.configs.IVA[this.toolId].grid, + }; + } + // Add copy.execute functions if (this._config.result.grid?.copies?.length > 0) { this._config.result.grid?.copies.forEach(copy => { From 3967d7aca52aba9f34fb39583d3c2f29dd5c7aaf Mon Sep 17 00:00:00 2001 From: Josemi Date: Tue, 31 May 2022 09:49:40 +0200 Subject: [PATCH 20/32] wc: fix location of cellbase configuration #TASK-945 --- .../interpretation/variant-interpreter-grid-config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webcomponents/variant/interpretation/variant-interpreter-grid-config.js b/src/webcomponents/variant/interpretation/variant-interpreter-grid-config.js index 9c510626ed..2e5427e6b8 100644 --- a/src/webcomponents/variant/interpretation/variant-interpreter-grid-config.js +++ b/src/webcomponents/variant/interpretation/variant-interpreter-grid-config.js @@ -166,7 +166,7 @@ export default class VariantInterpreterGridConfig extends LitElement { text: "Select the Gene Set to be displayed", display: { containerStyle: "margin: 5px 5px 5px 0px", - visible: () => this.opencgaSession?.project?.internal?.cellbase?.version.startsWith("v5") + visible: () => this.opencgaSession?.project?.cellbase?.version.startsWith("v5") } }, { @@ -175,7 +175,7 @@ export default class VariantInterpreterGridConfig extends LitElement { text: "Ensembl", display: { containerStyle: "margin: 10px 5px", - visible: () => this.opencgaSession?.project?.internal?.cellbase?.version.startsWith("v5") + visible: () => this.opencgaSession?.project?.cellbase?.version.startsWith("v5") } }, { @@ -184,7 +184,7 @@ export default class VariantInterpreterGridConfig extends LitElement { text: "RefSeq", display: { containerStyle: "margin: 10px 5px", - visible: () => this.opencgaSession?.project?.internal?.cellbase?.version.startsWith("v5") + visible: () => this.opencgaSession?.project?.cellbase?.version.startsWith("v5") } }, { From d6d74465bbf06ca8d8abd82cc8242a3c96a6560e Mon Sep 17 00:00:00 2001 From: Josemi Date: Tue, 31 May 2022 11:28:29 +0200 Subject: [PATCH 21/32] wc: fix displayed version in navbar #TASK-931 --- src/webcomponents/commons/layouts/custom-navbar.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/webcomponents/commons/layouts/custom-navbar.js b/src/webcomponents/commons/layouts/custom-navbar.js index 4a68db7796..39fed48f78 100644 --- a/src/webcomponents/commons/layouts/custom-navbar.js +++ b/src/webcomponents/commons/layouts/custom-navbar.js @@ -32,14 +32,17 @@ export default class CustomNavBar extends LitElement { static get properties() { return { + opencgaSession: { + type: Object + }, loggedIn: { type: Boolean }, app: { type: Object }, - opencgaSession: { - type: Object + version: { + type: String, }, config: { type: Object @@ -187,14 +190,14 @@ export default class CustomNavBar extends LitElement { ${this.app?.logo ? html` logo - ${this.config.version} + ${this.config.version || this.version} ` : null} ${!this.app?.logo && this.app?.name ? html` ${this.app.name} - ${this.config.version} + ${this.config.version || this.version} `: null} From 3441d5c3642530b52a8f15ba198798682f45b527 Mon Sep 17 00:00:00 2001 From: Josemi Date: Tue, 31 May 2022 11:29:07 +0200 Subject: [PATCH 22/32] iva: add version property to navbar and remove from config #TASK-931 --- src/sites/iva/conf/config.js | 2 +- src/sites/iva/iva-app.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sites/iva/conf/config.js b/src/sites/iva/conf/config.js index 0fb59070f1..4eb5bdad03 100644 --- a/src/sites/iva/conf/config.js +++ b/src/sites/iva/conf/config.js @@ -167,7 +167,7 @@ const CATALOG_NAVBAR_MENU = { const SUITE = { id: "suite", name: "OpenCB Suite", - version: "v2.3.1-dev", + version: "", logo: "img/iva-white.svg", companyLogo: "", logoAlt: "img/iva.svg", diff --git a/src/sites/iva/iva-app.js b/src/sites/iva/iva-app.js index c1af6f1054..da70dcefbb 100644 --- a/src/sites/iva/iva-app.js +++ b/src/sites/iva/iva-app.js @@ -233,6 +233,7 @@ class IvaApp extends LitElement { this.config = _config; // Get version from env variable + // eslint-disable-next-line no-undef this.version = process.env.VERSION; // Initially we load the SUIte config @@ -1055,6 +1056,7 @@ class IvaApp extends LitElement { Date: Tue, 31 May 2022 11:32:44 +0200 Subject: [PATCH 23/32] iva: minor style fixes in iva-app component #TASK-931 --- src/sites/iva/iva-app.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/sites/iva/iva-app.js b/src/sites/iva/iva-app.js index da70dcefbb..9904968d2e 100644 --- a/src/sites/iva/iva-app.js +++ b/src/sites/iva/iva-app.js @@ -1047,25 +1047,25 @@ class IvaApp extends LitElement { this.onChangeApp(e.detail.event, e.detail.toggle)} - @sideBarToggle=${e => this.toggleSideBar(e.detail.event)} + .config="${this.config}" + .loggedIn="${this.isLoggedIn()}" + @changeApp="${e => this.onChangeApp(e.detail.event, e.detail.toggle)}" + @sideBarToggle="${e => this.toggleSideBar(e.detail.event)}" > this.logout()} - @sideBarToggle=${e => this.toggleSideBar(e.detail.event)} - @changeTool=${e => this.changeTool(e.detail.value)} - @changeApp=${e => this.onChangeApp(e.detail.event, e.detail.toggle)} - @studySelect=${ e => this.onStudySelect(e.detail.event, e.detail.study)} - @jobSelected=${e => this.onJobSelected(e)} + .loggedIn="${this.isLoggedIn()}" + .opencgaSession="${this.opencgaSession}" + .config="${this.config}" + @logout="${e => this.logout()}" + @sideBarToggle="${e => this.toggleSideBar(e.detail.event)}" + @changeTool="${e => this.changeTool(e.detail.value)}" + @changeApp="${e => this.onChangeApp(e.detail.event, e.detail.toggle)}" + @studySelect="${ e => this.onStudySelect(e.detail.event, e.detail.study)}" + @jobSelected="${e => this.onJobSelected(e)}" @route="${this.route}"> From c3c28631608dfd2641250f50f088b85e4b6301df Mon Sep 17 00:00:00 2001 From: Josemi Date: Tue, 31 May 2022 11:33:45 +0200 Subject: [PATCH 24/32] iva: minor style fixes in iva-app component #TASK-931 --- src/sites/iva/iva-app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sites/iva/iva-app.js b/src/sites/iva/iva-app.js index 9904968d2e..3bfb7e1835 100644 --- a/src/sites/iva/iva-app.js +++ b/src/sites/iva/iva-app.js @@ -1050,8 +1050,8 @@ class IvaApp extends LitElement { .config="${this.config}" .loggedIn="${this.isLoggedIn()}" @changeApp="${e => this.onChangeApp(e.detail.event, e.detail.toggle)}" - @sideBarToggle="${e => this.toggleSideBar(e.detail.event)}" - > + @sideBarToggle="${e => this.toggleSideBar(e.detail.event)}"> + Date: Tue, 31 May 2022 11:43:41 +0200 Subject: [PATCH 25/32] wc: add display app name to footer component #TASK-931 --- src/webcomponents/commons/layouts/custom-footer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/webcomponents/commons/layouts/custom-footer.js b/src/webcomponents/commons/layouts/custom-footer.js index 8d51a00822..dbc3989c3d 100644 --- a/src/webcomponents/commons/layouts/custom-footer.js +++ b/src/webcomponents/commons/layouts/custom-footer.js @@ -24,6 +24,9 @@ export default class CustomFooter extends LitElement { static get properties() { return { + appName: { + type: String, + }, version: { type: String, }, @@ -42,7 +45,7 @@ export default class CustomFooter extends LitElement {
logo