Dictionary that can be customised by users to store any additional information users may require..
|
-
-### Panel
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/panel/Panel.java).
-
-| Field | Description |
-| :--- | :--- |
-| **uuid**Unique 32-character identifier assigned automatically by OpenCGA.
|
-| **release**An integer describing the current data release.
|
-| **version**OpenCGA version of this panel, this is incremented when the panel is updated.
|
-| **~~author~~**Author of the panel.
|
-| **status**Panel status can have the values READY or DELETED.
|
-| **studyUid**Panel reference to study.
|
-| **uid**Panel reference to study.
|
-
-### ClinicalComment
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/ClinicalComment.java).
-
-| Field | Description |
-| :--- | :--- |
-| **author**FlagAnnotation date.
|
### Interpretation
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/Interpretation.java).
@@ -138,15 +108,6 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **internal**Internal field for manage the object.
|
| **release**An integer describing the current data release.
|
-### ClinicalAnalysisQualityControl
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisQualityControl.java).
-
-| Field | Description |
-| :--- | :--- |
-| **summary**ClinicalAnalysisQualityControl summary that can have the values HIGH, MEDIUM, LOW, DISCARD, NEEDS_REVIEW, UNKNOWN.
|
-| **comments**List of ClinicalAnalysisQualityControl comments.
|
-| **comments**List of ClinicalAnalysisQualityControl files.
|
-
### ClinicalConsentAnnotation
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/configuration/ClinicalConsentAnnotation.java).
@@ -175,34 +136,63 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
| **assignedBy**Users may provide a description for the entry.
|
+| **source*** | Dictionary that can be customised by users to store any additional information users may require..
|
+
+### Panel
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/panel/Panel.java).
+
+| Field | Description |
+| :--- | :--- |
+| **uuid** *String* | Unique 32-character identifier assigned automatically by OpenCGA.
|
+| **release** *int* | An integer describing the current data release.
|
+| **version** *int* | OpenCGA version of this panel, this is incremented when the panel is updated.
|
+| **~~author~~** *String* _Deprecated_ | Author of the panel.
|
+| **status** *[Status](https://docs.opencga.opencb.org/data-models/clinicalanalysis#status)* | Panel status can have the values READY or DELETED.
|
+| **studyUid** *long* | Panel reference to study.
|
+| **uid** *long* | Panel reference to study.
|
+
+### ClinicalPriorityAnnotation
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/configuration/ClinicalPriorityAnnotation.java).
| Field | Description |
| :--- | :--- |
| **id** *String* | Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.
|
| **description** *String* | Users may provide a description for the entry.
|
-| **date** *String* | FlagAnnotation date.
|
+| **rank** *int* | ClinicalPriorityAnnotation rank.
|
+| **date** *String* | ClinicalPriorityAnnotation date.
|
-### ClinicalAudit
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/ClinicalAudit.java).
+### ClinicalComment
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/ClinicalComment.java).
| Field | Description |
| :--- | :--- |
-| **author** *String* | Audit author
|
-| **action** *Action* | Enum action that can have the values CREATE_CLINICAL_ANALYSIS, CREATE_INTERPRETATION, UPDATE_CLINICAL_ANALYSIS, DELETE_CLINICAL_ANALYSIS, UPDATE_INTERPRETATION, REVERT_INTERPRETATION, CLEAR_INTERPRETATION, MERGE_INTERPRETATION, SWAP_INTERPRETATION and DELETE_INTERPRETATION
|
-| **message** *String* | Audit message
|
-| **date** *String* | Date of the audit
|
+| **author** *String* | Clinical comment author
|
+| **message** *String* | Clinical comment message
|
+| **tags** *List<String >* | List of tags for the clinical comment
|
+| **date** *String* | Date of the clinical comment
|
-### InterpretationInternal
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/InterpretationInternal.java).
+### ClinicalReport
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalReport.java).
| Field | Description |
| :--- | :--- |
-| **status** *[InterpretationStatus](https://docs.opencga.opencb.org/data-models/clinicalanalysis#interpretationstatus)* | State of the interpretation that can have the values READY, DELETED, NOT_REVIEWED, UNDER_REVIEW, REVIEWED and REJECTED.
|
-| **status** *[Status](https://docs.opencga.opencb.org/data-models/clinicalanalysis#status)* | Status of the internal object.
|
-| **registrationDate** *String* | Registration date of the internal object.
|
-| **lastModified** *String* | Date of the last modification of the internal object.
|
+| **title** *String* | Report title.
|
+| **overview** *String* | Report overview.
|
+| **discussion** *String* | Report discussion.
|
+| **logo** *String* | Report logo.
|
+| **signedBy** *String* | Indicates who has signed the report.
|
+| **signature** *String* | Report signature.
|
+| **date** *String* | Report date.
|
### ClinicalConsentParam
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/configuration/ClinicalConsentParam.java).
@@ -218,6 +208,16 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
+### InterpretationInternal
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/InterpretationInternal.java).
+
+| Field | Description |
+| :--- | :--- |
+| **status** *[InterpretationStatus](https://docs.opencga.opencb.org/data-models/clinicalanalysis#interpretationstatus)* | State of the interpretation that can have the values READY, DELETED, NOT_REVIEWED, UNDER_REVIEW, REVIEWED and REJECTED.
|
+| **status** *[Status](https://docs.opencga.opencb.org/data-models/clinicalanalysis#status)* | Status of the internal object.
|
+| **registrationDate** *String* | Registration date of the internal object.
|
+| **lastModified** *String* | Date of the last modification of the internal object.
|
+
### InterpretationStatus
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/InterpretationStatus.java).
diff --git a/docs/data-models/cohort.md b/docs/data-models/cohort.md
index 020b345bc1e..c1f1f554ac8 100644
--- a/docs/data-models/cohort.md
+++ b/docs/data-models/cohort.md
@@ -37,10 +37,6 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **internal** *[CohortInternal](https://docs.opencga.opencb.org/data-models/cohort#cohortinternal)* | Internal field for manage the object.
|
| **attributes** *Map* | You can use this field to store any other information, keep in mind this is not indexed so you cannot search by attributes.
|
-### Status
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
-
-
### CohortInternal
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/cohort/CohortInternal.java).
@@ -49,3 +45,7 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **status** *[Status](https://docs.opencga.opencb.org/data-models/cohort#status)* | Status of the internal object.
|
| **registrationDate** *String* | Registration date of the internal object.
|
| **lastModified** *String* | Date of the last modification of the internal object.
|
+
+### Status
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
+
diff --git a/docs/data-models/family.md b/docs/data-models/family.md
index 92f60a9091c..c35d327ff1c 100644
--- a/docs/data-models/family.md
+++ b/docs/data-models/family.md
@@ -47,18 +47,17 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **release** *int* | An integer describing the current data release.
|
| **version** *int* | Autoincremental version assigned to the registered entry. By default, updates does not create new versions. To enable versioning, users must set the `incVersion` flag from the /update web service when updating the document.
|
-### FamilyQualityControl
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/family/FamilyQualityControl.java).
+### Disorder
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/Disorder.java).
| Field | Description |
| :--- | :--- |
-| **relatedness** *List<RelatednessReport >* | Reports of family relationship.
|
-| **files** *List<String >* | File IDs related to the quality control.
|
-| **comments** *List<ClinicalComment >* | Comments related to the quality control.
|
-
-### Status
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
-
+| **id** *String* | Id to identify the object
|
+| **name** *String* | Object name
|
+| **description** *String* | Users may provide a description for the entry.
|
+| **source** *String* | Ontology source
|
+| **url** *String* | Ontology url
|
+| **attributes** *Map* | Dictionary that can be customised by users to store any additional information users may require..
|
### FamilyInternal
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/family/FamilyInternal.java).
@@ -69,6 +68,19 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **registrationDate** *String* | Registration date of the internal object.
|
| **lastModified** *String* | Date of the last modification of the internal object.
|
+### Status
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
+
+
+### FamilyQualityControl
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/family/FamilyQualityControl.java).
+
+| Field | Description |
+| :--- | :--- |
+| **relatedness** *List<RelatednessReport >* | Reports of family relationship.
|
+| **files** *List<String >* | File IDs related to the quality control.
|
+| **comments** *List<ClinicalComment >* | Comments related to the quality control.
|
+
### Phenotype
You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/Phenotype.java).
@@ -83,17 +95,15 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
| **url** *String* | Ontology url
|
| **attributes** *Map* | Dictionary that can be customised by users to store any additional information users may require..
|
-### Disorder
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/Disorder.java).
+### RelatednessReport
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/RelatednessReport.java).
| Field | Description |
| :--- | :--- |
-| **id** *String* | Id to identify the object
|
-| **name** *String* | Object name
|
-| **description** *String* | Users may provide a description for the entry.
|
-| **source** *String* | Ontology source
|
-| **url** *String* | Ontology url
|
-| **attributes** *Map* | Dictionary that can be customised by users to store any additional information users may require..
|
+| **method** *String* | Method of the relatedness report
|
+| **maf** *String* | Minor allele frequency to filter variants, e.g.: 1kg_phase3:CEU>0.35, cohort:ALL>0.05
|
+| **scores** *List<RelatednessScore >* | Relatedness scores for pair of samples
|
+| **files** *List<String >* | List of files of Relatedness Report
|
### ClinicalComment
You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/ClinicalComment.java).
@@ -104,13 +114,3 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
| **message** *String* | Clinical comment message
|
| **tags** *List<String >* | List of tags for the clinical comment
|
| **date** *String* | Date of the clinical comment
|
-
-### RelatednessReport
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/RelatednessReport.java).
-
-| Field | Description |
-| :--- | :--- |
-| **method** *String* | Method of the relatedness report
|
-| **maf** *String* | Minor allele frequency to filter variants, e.g.: 1kg_phase3:CEU>0.35, cohort:ALL>0.05
|
-| **scores** *List<RelatednessScore >* | Relatedness scores for pair of samples
|
-| **files** *List<String >* | List of files of Relatedness Report
|
diff --git a/docs/data-models/file.md b/docs/data-models/file.md
index 48477ff4adc..dc43068bfc6 100644
--- a/docs/data-models/file.md
+++ b/docs/data-models/file.md
@@ -65,8 +65,8 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **internal** *[FileInternal](https://docs.opencga.opencb.org/data-models/file#fileinternal)* | Internal field for manage the object.
|
| **attributes** *Map* | You can use this field to store any other information, keep in mind this is not indexed so you cannot search by attributes.
|
-### FileQualityControl
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileQualityControl.java).
+### Status
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
### Software
@@ -81,6 +81,18 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
| **website** *String* | Software website
|
| **params** *Map* | Software params
|
+### FileExperiment
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileExperiment.java).
+
+
+### FileQualityControl
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileQualityControl.java).
+
+
+### FileRelatedFile
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileRelatedFile.java).
+
+
### URI
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/java/net/URI.java).
@@ -99,26 +111,6 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **registrationDate** *String* | Registration date of the internal object.
|
| **lastModified** *String* | Date of the last modification of the internal object.
|
-### Status
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
-
-
-### FileExperiment
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileExperiment.java).
-
-
-### FileRelatedFile
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileRelatedFile.java).
-
-
-### FileInternalVariant
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileInternalVariant.java).
-
-
-### FileStatus
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileStatus.java).
-
-
### MissingSamples
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/MissingSamples.java).
@@ -127,6 +119,14 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **existing** *List<String >* | List of existing samples.
|
| **nonExisting** *List<String >* | List of non existing samples.
|
+### FileInternalVariant
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileInternalVariant.java).
+
+
### FileInternalAlignment
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileInternalAlignment.java).
+
+### FileStatus
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileStatus.java).
+
diff --git a/docs/data-models/individual.md b/docs/data-models/individual.md
index 0fd1ba2be78..7eaf3827b11 100644
--- a/docs/data-models/individual.md
+++ b/docs/data-models/individual.md
@@ -63,29 +63,42 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **release** *int* | An integer describing the current data release.
|
| **version** *int* | Autoincremental version assigned to the registered entry. By default, updates does not create new versions. To enable versioning, users must set the `incVersion` flag from the /update web service when updating the document.
|
-### OntologyTermAnnotation
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/core/OntologyTermAnnotation.java).
+### Location
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/individual/Location.java).
+
+| Field | Description |
+| :--- | :--- |
+| **address** *String* | Location address.
|
+| **postalCode** *String* | Location postal code.
|
+| **city** *String* | Location city.
|
+| **state** *String* | Location state.
|
+| **country** *String* | Location country.
|
+
+### Phenotype
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/Phenotype.java).
| Field | Description |
| :--- | :--- |
| **id** *String* | Id to identify the object
|
+| **ageOfOnset** *String* | Indicates the age of on set of the phenotype
|
+| **status** *Status* | Status of phenotype OBSERVED, NOT_OBSERVED, UNKNOWN
|
| **name** *String* | Object name
|
| **description** *String* | Users may provide a description for the entry.
|
| **source** *String* | Ontology source
|
| **url** *String* | Ontology url
|
| **attributes** *Map* | Dictionary that can be customised by users to store any additional information users may require..
|
-### IndividualPopulation
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/individual/IndividualPopulation.java).
+### IndividualInternal
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/individual/IndividualInternal.java).
| Field | Description |
| :--- | :--- |
-| **name** *String* | Name of the individual population.
|
-| **subpopulation** *String* | Subpopulation of the individual population.
|
-| **description** *String* | Description of the individual population.
|
+| **status** *[Status](https://docs.opencga.opencb.org/data-models/individual#status)* | Status of the internal object.
|
+| **registrationDate** *String* | Registration date of the internal object.
|
+| **lastModified** *String* | Date of the last modification of the internal object.
|
-### SexOntologyTermAnnotation
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/core/SexOntologyTermAnnotation.java).
+### Disorder
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/Disorder.java).
| Field | Description |
| :--- | :--- |
@@ -96,33 +109,24 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
| **url** *String* | Ontology url
|
| **attributes** *Map* | Dictionary that can be customised by users to store any additional information users may require..
|
-### IndividualQualityControl
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/individual/IndividualQualityControl.java).
-
-| Field | Description |
-| :--- | :--- |
-| **inferredSexReports** *List<InferredSexReport >* | List of inferred sex reports, it depends on the method (currently by coverage ratio).
|
-| **sampleRelatednessReport** *[SampleRelatednessReport](https://docs.opencga.opencb.org/data-models/individual#samplerelatednessreport)* | Reports of samples relatedness.
|
-| **mendelianErrorReports** *List<MendelianErrorReport >* | Mendelian errors.
|
-| **files** *List<String >* | File IDs related to the quality control.
|
-| **author** *List<ClinicalComment >* | Comments related to the quality control.
|
-
-### Phenotype
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/Phenotype.java).
+### OntologyTermAnnotation
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/core/OntologyTermAnnotation.java).
| Field | Description |
| :--- | :--- |
| **id** *String* | Id to identify the object
|
-| **ageOfOnset** *String* | Indicates the age of on set of the phenotype
|
-| **status** *Status* | Status of phenotype OBSERVED, NOT_OBSERVED, UNKNOWN
|
| **name** *String* | Object name
|
| **description** *String* | Users may provide a description for the entry.
|
| **source** *String* | Ontology source
|
| **url** *String* | Ontology url
|
| **attributes** *Map* | Dictionary that can be customised by users to store any additional information users may require..
|
-### Disorder
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/Disorder.java).
+### Status
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
+
+
+### SexOntologyTermAnnotation
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/core/SexOntologyTermAnnotation.java).
| Field | Description |
| :--- | :--- |
@@ -133,29 +137,25 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
| **url** *String* | Ontology url
|
| **attributes** *Map* | Dictionary that can be customised by users to store any additional information users may require..
|
-### IndividualInternal
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/individual/IndividualInternal.java).
+### IndividualQualityControl
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/individual/IndividualQualityControl.java).
| Field | Description |
| :--- | :--- |
-| **status** *[Status](https://docs.opencga.opencb.org/data-models/individual#status)* | Status of the internal object.
|
-| **registrationDate** *String* | Registration date of the internal object.
|
-| **lastModified** *String* | Date of the last modification of the internal object.
|
+| **inferredSexReports** *List<InferredSexReport >* | List of inferred sex reports, it depends on the method (currently by coverage ratio).
|
+| **sampleRelatednessReport** *[SampleRelatednessReport](https://docs.opencga.opencb.org/data-models/individual#samplerelatednessreport)* | Reports of samples relatedness.
|
+| **mendelianErrorReports** *List<MendelianErrorReport >* | Mendelian errors.
|
+| **files** *List<String >* | File IDs related to the quality control.
|
+| **author** *List<ClinicalComment >* | Comments related to the quality control.
|
-### Location
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/individual/Location.java).
+### IndividualPopulation
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/individual/IndividualPopulation.java).
| Field | Description |
| :--- | :--- |
-| **address** *String* | Location address.
|
-| **postalCode** *String* | Location postal code.
|
-| **city** *String* | Location city.
|
-| **state** *String* | Location state.
|
-| **country** *String* | Location country.
|
-
-### Status
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
-
+| **name** *String* | Name of the individual population.
|
+| **subpopulation** *String* | Subpopulation of the individual population.
|
+| **description** *String* | Description of the individual population.
|
### MendelianErrorReport
You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/MendelianErrorReport.java).
@@ -165,10 +165,6 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/InferredSexReport.java).
-### SampleRelatednessReport
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/SampleRelatednessReport.java).
-
-
### ClinicalComment
You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/ClinicalComment.java).
@@ -178,3 +174,7 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
| **message** *String* | Clinical comment message
|
| **tags** *List<String >* | List of tags for the clinical comment
|
| **date** *String* | Date of the clinical comment
|
+
+### SampleRelatednessReport
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/SampleRelatednessReport.java).
+
diff --git a/docs/data-models/job.md b/docs/data-models/job.md
index 884de4870df..a0b09fecf45 100644
--- a/docs/data-models/job.md
+++ b/docs/data-models/job.md
@@ -59,6 +59,18 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **study** *[JobStudyParam](https://docs.opencga.opencb.org/data-models/job#jobstudyparam)* | Job study.
|
| **attributes** *Map* | You can use this field to store any other information, keep in mind this is not indexed so you cannot search by attributes.
|
+### JobInternal
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/job/JobInternal.java).
+
+| Field | Description |
+| :--- | :--- |
+| **status** *[ExecutionStatus](https://docs.opencga.opencb.org/data-models/job#executionstatus)* | Job internal status can have the values PENDING, QUEUED, RUNNING, DONE, ERROR, UNKNOWN, REGISTERING, UNREGISTERED, ABORTED, DELETED.
|
+| **webhook** *[JobInternalWebhook](https://docs.opencga.opencb.org/data-models/job#jobinternalwebhook)* | Job internal Webhook.
|
+| **events** *List<Event >* | Events of the internal job.
|
+| **status** *[Status](https://docs.opencga.opencb.org/data-models/job#status)* | Status of the internal object.
|
+| **registrationDate** *String* | Registration date of the internal object.
|
+| **lastModified** *String* | Date of the last modification of the internal object.
|
+
### ExecutionResult
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/tools/result/ExecutionResult.java).
@@ -85,18 +97,6 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **type** *Type* | Tool info type can have the values OPERATION and ANALYSIS.
|
| **resource** *Resource* | Tool info resource can have the values AUDIT, USER, PROJECT, STUDY, FILE, SAMPLE, JOB, INDIVIDUAL, COHORT, DISEASE_PANEL, FAMILY, CLINICAL_ANALYSIS, INTERPRETATION, VARIANT, ALIGNMENT, CLINICAL, EXPRESSION, RGA and FUNCTIONAL.
|
-### JobInternal
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/job/JobInternal.java).
-
-| Field | Description |
-| :--- | :--- |
-| **status** *[ExecutionStatus](https://docs.opencga.opencb.org/data-models/job#executionstatus)* | Job internal status can have the values PENDING, QUEUED, RUNNING, DONE, ERROR, UNKNOWN, REGISTERING, UNREGISTERED, ABORTED, DELETED.
|
-| **webhook** *[JobInternalWebhook](https://docs.opencga.opencb.org/data-models/job#jobinternalwebhook)* | Job internal Webhook.
|
-| **events** *List<Event >* | Events of the internal job.
|
-| **status** *[Status](https://docs.opencga.opencb.org/data-models/job#status)* | Status of the internal object.
|
-| **registrationDate** *String* | Registration date of the internal object.
|
-| **lastModified** *String* | Date of the last modification of the internal object.
|
-
### JobStudyParam
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/job/JobStudyParam.java).
@@ -116,8 +116,12 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **source** *Source* | Executor info source can have the values FILE, PARQUET_FILE, MONGODB, HBASE, STORAGE.
|
| **framework** *Framework* | Executor info framework can have the values LOCAL, MAP_REDUCE, SPARK.
|
-### Date
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/java/util/Date.java).
+### ExecutionStatus
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/common/Enums/ExecutionStatus.java).
+
+
+### URI
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/java/net/URI.java).
### ToolStep
@@ -131,8 +135,12 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **status** *Type* | Executor status can have the values PENDING, RUNNING, DONE and ERROR.
|
| **attributes** *ObjectMap* | You can use this field to store any other information, keep in mind this is not indexed so you cannot search by attributes.
|
-### URI
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/java/net/URI.java).
+### Date
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/java/util/Date.java).
+
+
+### Status
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
### JobInternalWebhook
@@ -143,14 +151,6 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **webhook** *[URL](https://docs.opencga.opencb.org/data-models/job#url)* | Webhook URL.
|
| **status** *Map* | Webhook status map can have the values SUCCESS or ERROR.
|
-### Status
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/tools/result/Status.java).
-
-
-### ExecutionStatus
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/common/Enums/ExecutionStatus.java).
-
-
### URL
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/java/net/URL.java).
diff --git a/docs/data-models/project.md b/docs/data-models/project.md
index b27571132ee..4d291e0ad2d 100644
--- a/docs/data-models/project.md
+++ b/docs/data-models/project.md
@@ -37,10 +37,6 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **release** *[ProjectInternal](https://docs.opencga.opencb.org/data-models/project#projectinternal)* | An integer describing the current data release.
|
| **attributes** *Map* | You can use this field to store any other information, keep in mind this is not indexed so you cannot search by attributes.
|
-### ProjectOrganism
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/project/ProjectOrganism.java).
-
-
### ProjectInternal
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/project/ProjectInternal.java).
@@ -52,6 +48,10 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **registrationDate** *String* | Registration date of the internal object.
|
| **lastModified** *String* | Date of the last modification of the internal object.
|
+### ProjectOrganism
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/project/ProjectOrganism.java).
+
+
### Status
You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
diff --git a/docs/data-models/sample.md b/docs/data-models/sample.md
index 7f48a61ba24..6284da8c0e3 100644
--- a/docs/data-models/sample.md
+++ b/docs/data-models/sample.md
@@ -51,18 +51,6 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **version** *int* | Autoincremental version assigned to the registered entry. By default, updates does not create new versions. To enable versioning, users must set the `incVersion` flag from the /update web service when updating the document.
|
| **internal** *[SampleInternal](https://docs.opencga.opencb.org/data-models/sample#sampleinternal)* _since_: 2.0 | Sample internal information.
|
-### SampleCollection
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/sample/SampleCollection.java).
-
-| Field | Description |
-| :--- | :--- |
-| **from** *List<OntologyTermAnnotation >* | OntologyTermAnnotation list.
|
-| **type** *String* | Type of the sample collection.
|
-| **quantity** *String* | Quantity collected for the sample.
|
-| **method** *String* | Describes which method was used to collect the sample.
|
-| **date** *String* | Date when the sample was collected.
|
-| **attributes** *Map* | Attributes of the sample collection.
|
-
### SampleProcessing
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/sample/SampleProcessing.java).
@@ -76,10 +64,6 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **date** *String* | Date when the sample was processed in the lab.
|
| **attributes** *Map* | Attributes of the processing.
|
-### Status
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
-
-
### SampleInternal
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/sample/SampleInternal.java).
@@ -90,14 +74,17 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **registrationDate** *String* | Registration date of the internal object.
|
| **lastModified** *String* | Date of the last modification of the internal object.
|
-### SampleQualityControl
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/sample/SampleQualityControl.java).
+### SampleCollection
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/sample/SampleCollection.java).
| Field | Description |
| :--- | :--- |
-| **files** *List<String >* | Files used for the quality control of the sample.
|
-| **comments** *List<ClinicalComment >* | Comments for the quality control of the sample.
|
-| **variant** *[SampleVariantQualityControlMetrics](https://docs.opencga.opencb.org/data-models/sample#samplevariantqualitycontrolmetrics)* | Describes variant quality control.
|
+| **from** *List<OntologyTermAnnotation >* | OntologyTermAnnotation list.
|
+| **type** *String* | Type of the sample collection.
|
+| **quantity** *String* | Quantity collected for the sample.
|
+| **method** *String* | Describes which method was used to collect the sample.
|
+| **date** *String* | Date when the sample was collected.
|
+| **attributes** *Map* | Attributes of the sample collection.
|
### ExternalSource
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/common/ExternalSource.java).
@@ -124,17 +111,18 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
| **url** *String* | Ontology url
|
| **attributes** *Map* | Dictionary that can be customised by users to store any additional information users may require..
|
-### OntologyTermAnnotation
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/core/OntologyTermAnnotation.java).
+### Status
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
+
+
+### SampleQualityControl
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/sample/SampleQualityControl.java).
| Field | Description |
| :--- | :--- |
-| **id** *String* | Id to identify the object
|
-| **name** *String* | Object name
|
-| **description** *String* | Users may provide a description for the entry.
|
-| **source** *String* | Ontology source
|
-| **url** *String* | Ontology url
|
-| **attributes** *Map* | Dictionary that can be customised by users to store any additional information users may require..
|
+| **files** *List<String >* | Files used for the quality control of the sample.
|
+| **comments** *List<ClinicalComment >* | Comments for the quality control of the sample.
|
+| **variant** *[SampleVariantQualityControlMetrics](https://docs.opencga.opencb.org/data-models/sample#samplevariantqualitycontrolmetrics)* | Describes variant quality control.
|
### RgaIndex
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/common/RgaIndex.java).
@@ -144,16 +132,6 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **status** *Status* | Status of the Rga index NOT_INDEXED, INDEXED, INVALID_PERMISSIONS, INVALID_METADATA, INVALID.
|
| **date** *String* | Date of Rga index.
|
-### SampleVariantQualityControlMetrics
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/sample/SampleVariantQualityControlMetrics.java).
-
-| Field | Description |
-| :--- | :--- |
-| **variantStats** *List<SampleQcVariantStats >* | Variant stats for the quality control of the sample.
|
-| **signatures** *List<Signature >* | Signature for the quality control of the sample.
|
-| **genomePlot** *[GenomePlot](https://docs.opencga.opencb.org/data-models/sample#genomeplot)* | Genome plot for the quality control of the sample.
|
-| **files** *List<String >* | File for the quality control metrics of the sample.
|
-
### ClinicalComment
You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/ClinicalComment.java).
@@ -164,18 +142,27 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
| **tags** *List<String >* | List of tags for the clinical comment
|
| **date** *String* | Date of the clinical comment
|
-### Signature
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/Signature.java).
+### OntologyTermAnnotation
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/core/OntologyTermAnnotation.java).
| Field | Description |
| :--- | :--- |
| **id** *String* | Id to identify the object
|
+| **name** *String* | Object name
|
| **description** *String* | Users may provide a description for the entry.
|
-| **query** *ObjectMap* | Map for query
|
-| **type** *String* | Signature type SNV, INDEL...
|
-| **counts** *List<GenomeContextCount >* | List of GenomeContextCount
|
-| **files** *List<String >* | List of files of signature
|
-| **fitting** *[SignatureFitting](https://docs.opencga.opencb.org/data-models/sample#signaturefitting)* | Signature fitting
|
+| **source** *String* | Ontology source
|
+| **url** *String* | Ontology url
|
+| **attributes** *Map* | Dictionary that can be customised by users to store any additional information users may require..
|
+
+### SampleVariantQualityControlMetrics
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/sample/SampleVariantQualityControlMetrics.java).
+
+| Field | Description |
+| :--- | :--- |
+| **variantStats** *List<SampleQcVariantStats >* | Variant stats for the quality control of the sample.
|
+| **signatures** *List<Signature >* | Signature for the quality control of the sample.
|
+| **genomePlot** *[GenomePlot](https://docs.opencga.opencb.org/data-models/sample#genomeplot)* | Genome plot for the quality control of the sample.
|
+| **files** *List<String >* | File for the quality control metrics of the sample.
|
### GenomePlot
You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/GenomePlot.java).
@@ -198,15 +185,18 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
| **stats** *SampleVariantStats* | Stats result set
|
| **sampleId** *String* | Stats result set
|
-### GenomePlotConfig
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/GenomePlotConfig.java).
+### Signature
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/Signature.java).
| Field | Description |
| :--- | :--- |
-| **title** *String* | Title of the genome plot configuration
|
-| **density** *String* | Density of the genome plot configuration
|
-| **generalQuery** *Map* | Map for the general query of the genome plot configuration
|
-| **tracks** *List<GenomePlotTrack >* | List of GenomePlotTrack
|
+| **id** *String* | Id to identify the object
|
+| **description** *String* | Users may provide a description for the entry.
|
+| **query** *ObjectMap* | Map for query
|
+| **type** *String* | Signature type SNV, INDEL...
|
+| **counts** *List<GenomeContextCount >* | List of GenomeContextCount
|
+| **files** *List<String >* | List of files of signature
|
+| **fitting** *[SignatureFitting](https://docs.opencga.opencb.org/data-models/sample#signaturefitting)* | Signature fitting
|
### SignatureFitting
You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/SignatureFitting.java).
@@ -220,6 +210,16 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop
| **coeff** *double* | Coefficient of the fitting signature
|
| **file** *String* | Files of the fitting signature
|
+### GenomePlotConfig
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/GenomePlotConfig.java).
+
+| Field | Description |
+| :--- | :--- |
+| **title** *String* | Title of the genome plot configuration
|
+| **density** *String* | Density of the genome plot configuration
|
+| **generalQuery** *Map* | Map for the general query of the genome plot configuration
|
+| **tracks** *List<GenomePlotTrack >* | List of GenomePlotTrack
|
+
### GenomeContextCount
You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/Signature/GenomeContextCount.java).
diff --git a/docs/data-models/study.md b/docs/data-models/study.md
index 47b46a0510b..9e2a1a9ed3f 100644
--- a/docs/data-models/study.md
+++ b/docs/data-models/study.md
@@ -71,6 +71,42 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **additionalInfo** *List<AdditionalInfo >* | Dictionary that can be customised by users to store any additional information users may require.
|
| **attributes** *Map* | You can use this field to store any other information, keep in mind this is not indexed so you cannot search by attributes.
|
+### VariableSet
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/VariableSet.java).
+
+
+### AdditionalInfo
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/common/AdditionalInfo.java).
+
+| Field | Description |
+| :--- | :--- |
+| **id** *String* | Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.
|
+| **name** *String* | Name of the .
|
+| **description** *String* | Users may provide a description for the entry.
|
+| **type** *String* | Type of the additional info.
|
+| **attributes** *Map* | You can use this field to store any other information, keep in mind this is not indexed so you cannot search by attributes.
|
+
+### Panel
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/panel/Panel.java).
+
+| Field | Description |
+| :--- | :--- |
+| **uuid** *String* | Unique 32-character identifier assigned automatically by OpenCGA.
|
+| **release** *int* | An integer describing the current data release.
|
+| **version** *int* | OpenCGA version of this panel, this is incremented when the panel is updated.
|
+| **~~author~~** *String* _Deprecated_ | Author of the panel.
|
+| **status** *[Status](https://docs.opencga.opencb.org/data-models/study#status)* | Panel status can have the values READY or DELETED.
|
+| **studyUid** *long* | Panel reference to study.
|
+| **uid** *long* | Panel reference to study.
|
+
+### StudyType
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/StudyType.java).
+
+| Field | Description |
+| :--- | :--- |
+| **id** *String* | Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.
|
+| **description** *String* | Users may provide a description for the entry.
|
+
### StudyInternal
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/StudyInternal.java).
@@ -83,8 +119,13 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **registrationDate** *String* | Registration date of the internal object.
|
| **lastModified** *String* | Date of the last modification of the internal object.
|
-### Status
-You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
+### Group
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/Group.java).
+
+
+### Enum Entity
+_Enumeration class._
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/common/Enums/Entity.java).
### StudyNotification
@@ -94,26 +135,9 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| :--- | :--- |
| **webhook** *[URL](https://docs.opencga.opencb.org/data-models/study#url)* | Url of the study notification.
|
-### StudyType
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/StudyType.java).
-
-| Field | Description |
-| :--- | :--- |
-| **id** *String* | Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.
|
-| **description** *String* | Users may provide a description for the entry.
|
-
-### Panel
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/panel/Panel.java).
+### URI
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/java/net/URI.java).
-| Field | Description |
-| :--- | :--- |
-| **uuid** *String* | Unique 32-character identifier assigned automatically by OpenCGA.
|
-| **release** *int* | An integer describing the current data release.
|
-| **version** *int* | OpenCGA version of this panel, this is incremented when the panel is updated.
|
-| **~~author~~** *String* _Deprecated_ | Author of the panel.
|
-| **status** *[Status](https://docs.opencga.opencb.org/data-models/study#status)* | Panel status can have the values READY or DELETED.
|
-| **studyUid** *long* | Panel reference to study.
|
-| **uid** *long* | Panel reference to study.
|
### PermissionRule
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/PermissionRule.java).
@@ -125,10 +149,6 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **members** *List<String >* | List of members of the permission rule.
|
| **permissions** *List<String >* | List of permissions of the permission rule.
|
-### Group
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/Group.java).
-
-
### ExternalSource
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/common/ExternalSource.java).
@@ -140,34 +160,14 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **source** *String* | Source ...
|
| **url** *String* | Source ID
|
-### URI
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/java/net/URI.java).
-
-
-### Enum Entity
-_Enumeration class._
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/common/Enums/Entity.java).
-
-
-### VariableSet
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/VariableSet.java).
+### Status
+You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).
-### AdditionalInfo
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/common/AdditionalInfo.java).
+### URL
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/java/net/URL.java).
-| Field | Description |
-| :--- | :--- |
-| **id** *String* | Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.
|
-| **name** *String* | Name of the .
|
-| **description** *String* | Users may provide a description for the entry.
|
-| **type** *String* | Type of the additional info.
|
-| **attributes** *Map* | You can use this field to store any other information, keep in mind this is not indexed so you cannot search by attributes.
|
### StudyIndex
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/study/StudyIndex.java).
-
-### URL
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/java/net/URL.java).
-
diff --git a/docs/data-models/user.md b/docs/data-models/user.md
index 5f8800ed109..f8d3a96945c 100644
--- a/docs/data-models/user.md
+++ b/docs/data-models/user.md
@@ -37,14 +37,14 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1
| **filters** *List<UserFilter >* | A List with related filters.
|
| **attributes** *Map* | You can use this field to store any other information, keep in mind this is not indexed so you cannot search by attributes.
|
-### UserInternal
-You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/user/UserInternal.java).
-
-
### UserQuota
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/user/UserQuota.java).
+### UserInternal
+You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/user/UserInternal.java).
+
+
### Account
You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1806/opencga-core/src/main/java/org/opencb/opencga/core/models/user/Account.java).
diff --git a/opencga-analysis/pom.xml b/opencga-analysis/pom.xml
index 28882a5bda5..e6b218db1f7 100644
--- a/opencga-analysis/pom.xml
+++ b/opencga-analysis/pom.xml
@@ -22,7 +22,7 @@
org.opencb.opencga
opencga
- 2.2.0-rc2
+ 2.2.0
../pom.xml
diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/VariantExportTool.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/VariantExportTool.java
index 3ff0de615de..b2e17820e0b 100644
--- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/VariantExportTool.java
+++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/VariantExportTool.java
@@ -41,7 +41,7 @@ public VariantExportTool setQuery(Query query) {
}
public VariantExportTool setOutputFormat(VariantWriterFactory.VariantOutputFormat outputFormat) {
- toolParams.setOutputFormat(outputFormat.toString());
+ toolParams.setOutputFileFormat(outputFormat.toString());
return this;
}
@@ -60,14 +60,14 @@ protected void check() throws Exception {
super.check();
toolParams.updateParams(params);
- if (StringUtils.isEmpty(toolParams.getOutputFormat())) {
- toolParams.setOutputFormat(VariantWriterFactory.VariantOutputFormat.VCF.toString());
+ if (StringUtils.isEmpty(toolParams.getOutputFileFormat())) {
+ toolParams.setOutputFileFormat(VariantWriterFactory.VariantOutputFormat.VCF.toString());
}
if (toolParams.getLimit() != null && toolParams.getLimit() == 0) {
toolParams.setLimit(null);
}
- outputFormat = VariantWriterFactory.toOutputFormat(toolParams.getOutputFormat(), toolParams.getOutputFileName());
+ outputFormat = VariantWriterFactory.toOutputFormat(toolParams.getOutputFileFormat(), toolParams.getOutputFileName());
if (outputFormat.isPlain()) {
outputFormat = outputFormat.withGzip();
}
diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java
index 41860583032..51316c271d9 100644
--- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java
+++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java
@@ -69,6 +69,7 @@
import org.opencb.opencga.core.models.study.StudyAclEntry;
import org.opencb.opencga.core.response.OpenCGAResult;
import org.opencb.opencga.core.response.VariantQueryResult;
+import org.opencb.opencga.core.tools.ToolParams;
import org.opencb.opencga.storage.core.StorageEngineFactory;
import org.opencb.opencga.storage.core.StoragePipelineResult;
import org.opencb.opencga.storage.core.exceptions.StorageEngineException;
@@ -387,6 +388,14 @@ public void sampleIndexAnnotate(String study, List samples, ObjectMap pa
});
}
+ public DataResult> familyIndexUpdate(String study,
+ ObjectMap params, String token)
+ throws CatalogException, StorageEngineException {
+ return secureOperation(VariantFamilyIndexOperationTool.ID, study, params, token, engine -> {
+ return engine.familyIndexUpdate(study, params);
+ });
+ }
+
public DataResult> familyIndex(String study, List familiesStr, boolean skipIncompleteFamilies,
ObjectMap params, String token)
throws CatalogException, StorageEngineException {
@@ -407,7 +416,6 @@ public DataResult> familyIndex(String study, List familiesS
trios.addAll(catalogUtils.getTriosFromFamily(study, family, metadataManager, skipIncompleteFamilies, token));
}
}
-
return engine.familyIndex(study, trios, params);
});
}
@@ -501,7 +509,7 @@ public OpenCGAResult configureSampleIndex(String studyStr, SampleIndexConfi
return secureOperation("configure", studyStr, new ObjectMap(), token, engine -> {
sampleIndexConfiguration.validate();
String studyFqn = getStudyFqn(studyStr, token);
- engine.getMetadataManager().addSampleIndexConfiguration(studyFqn, sampleIndexConfiguration);
+ engine.getMetadataManager().addSampleIndexConfiguration(studyFqn, sampleIndexConfiguration, true);
catalogManager.getStudyManager()
.setVariantEngineConfigurationSampleIndex(studyStr, sampleIndexConfiguration, token);
@@ -509,10 +517,14 @@ public OpenCGAResult configureSampleIndex(String studyStr, SampleIndexConfi
return new OpenCGAResult<>(0, new ArrayList<>(), 0, new ArrayList<>(), 0);
} else {
// If changes, launch sample-index-run
- VariantSampleIndexParams params =
+ ToolParams params =
new VariantSampleIndexParams(Collections.singletonList(ParamConstants.ALL), true, true, false);
- return catalogManager.getJobManager().submit(studyFqn, VariantSampleIndexOperationTool.ID, null,
- params.toParams(STUDY_PARAM, studyFqn), token);
+ Job job = catalogManager.getJobManager().submit(studyFqn, VariantSampleIndexOperationTool.ID, null,
+ params.toParams(STUDY_PARAM, studyFqn), token).first();
+ params = new VariantFamilyIndexParams(Collections.emptyList(), false, true, false);
+ Job job2 = catalogManager.getJobManager().submit(studyFqn, VariantFamilyIndexOperationTool.ID, null,
+ params.toParams(STUDY_PARAM, studyFqn), token).first();
+ return new OpenCGAResult<>(0, new ArrayList<>(), 2, Arrays.asList(job, job2), 0);
}
});
}
diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFamilyIndexOperationTool.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFamilyIndexOperationTool.java
index 0fc66c8b055..ca1e25111cc 100644
--- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFamilyIndexOperationTool.java
+++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFamilyIndexOperationTool.java
@@ -19,9 +19,11 @@
import org.apache.commons.collections4.CollectionUtils;
import org.opencb.commons.datastore.core.DataResult;
import org.opencb.commons.datastore.core.Event;
-import org.opencb.opencga.core.tools.annotations.Tool;
-import org.opencb.opencga.core.models.operations.variant.VariantFamilyIndexParams;
+import org.opencb.opencga.core.api.ParamConstants;
import org.opencb.opencga.core.models.common.Enums;
+import org.opencb.opencga.core.models.operations.variant.VariantFamilyIndexParams;
+import org.opencb.opencga.core.tools.annotations.Tool;
+import org.opencb.opencga.core.tools.annotations.ToolParams;
import java.util.List;
@@ -33,29 +35,43 @@ public class VariantFamilyIndexOperationTool extends OperationTool {
public static final String DESCRIPTION = "Build the family index";
private String study;
- private VariantFamilyIndexParams variantFamilyIndexParams;
+
+ @ToolParams
+ protected VariantFamilyIndexParams variantFamilyIndexParams;
@Override
protected void check() throws Exception {
super.check();
- variantFamilyIndexParams = VariantFamilyIndexParams.fromParams(VariantFamilyIndexParams.class, params);
study = getStudyFqn();
- if (CollectionUtils.isEmpty(variantFamilyIndexParams.getFamily())) {
- throw new IllegalArgumentException("Empty list of families");
+ List list = variantFamilyIndexParams.getFamily();
+ if (variantFamilyIndexParams.isUpdateIndex()) {
+ if (list.size() > 1 || list.size() == 1 && !list.get(0).equals(ParamConstants.ALL)) {
+ throw new IllegalArgumentException("Unaccepted parameter \"family\" when updating index.");
+ }
+ } else {
+ if (CollectionUtils.isEmpty(list)) {
+ throw new IllegalArgumentException("Empty list of families");
+ }
}
+
}
@Override
protected void run() throws Exception {
step(() -> {
- DataResult> trios = variantStorageManager.familyIndex(
- study,
- variantFamilyIndexParams.getFamily(),
- variantFamilyIndexParams.isSkipIncompleteFamilies(),
- params,
- token);
+ DataResult> trios;
+ if (variantFamilyIndexParams.isUpdateIndex()) {
+ trios = variantStorageManager.familyIndexUpdate(study, params, token);
+ } else {
+ trios = variantStorageManager.familyIndex(
+ study,
+ variantFamilyIndexParams.getFamily(),
+ variantFamilyIndexParams.isSkipIncompleteFamilies(),
+ params,
+ token);
+ }
if (trios.getEvents() != null) {
for (Event event : trios.getEvents()) {
addEvent(event.getType(), event.getMessage());
diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantStorageMetadataRepairTool.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantStorageMetadataRepairTool.java
index 559ceac77c5..a8e9ba5b528 100644
--- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantStorageMetadataRepairTool.java
+++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantStorageMetadataRepairTool.java
@@ -141,7 +141,7 @@ private void rebuildSampleFileIds(VariantStorageMetadataManager metadataManager,
metadataManager.updateSampleMetadata(studyId, sampleId, sampleMetadata -> {
logger.info("Repair sample {}. Had {} fileIds instead of {}.",
sampleMetadata.getName(), sampleMetadata.getFiles().size(), fileIds.size());
- return sampleMetadata.setFiles(fileIds);
+ sampleMetadata.setFiles(fileIds);
});
}
}
diff --git a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/VariantAnalysisTest.java b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/VariantAnalysisTest.java
index 9cd67964000..1450d3ca753 100644
--- a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/VariantAnalysisTest.java
+++ b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/VariantAnalysisTest.java
@@ -18,7 +18,6 @@
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.mutable.MutableInt;
-import org.apache.hadoop.conf.Configuration;
import org.hamcrest.CoreMatchers;
import org.junit.AfterClass;
import org.junit.Assume;
@@ -530,7 +529,7 @@ public void testExportVep() throws Exception {
assertEquals("22,1,5", variantExportParams.getRegion());
variantExportParams.setCt("lof");
variantExportParams.setOutputFileName("chr1-5-22");
- variantExportParams.setOutputFormat(VariantWriterFactory.VariantOutputFormat.ENSEMBL_VEP.name());
+ variantExportParams.setOutputFileFormat(VariantWriterFactory.VariantOutputFormat.ENSEMBL_VEP.name());
toolRunner.execute(VariantExportTool.class, variantExportParams.toObjectMap(), outDir, null, token);
}
diff --git a/opencga-app/app/misc/clients/rest_client_generator.py b/opencga-app/app/misc/clients/rest_client_generator.py
index faef13ff9a2..a1cd6738ceb 100644
--- a/opencga-app/app/misc/clients/rest_client_generator.py
+++ b/opencga-app/app/misc/clients/rest_client_generator.py
@@ -1,11 +1,10 @@
+import json
import os
import re
import sys
from abc import ABC, abstractmethod
from datetime import datetime
-import json
-
class RestClientGenerator(ABC):
@@ -27,9 +26,12 @@ def __init__(self, rest_api_file, output_dir):
self.endpoints = {
'users/{user}/filters/{filterId}/update': {'method_name': 'update_filter'},
'ga4gh/reads/{study}/{file}': {'method_name': 'fetch_reads'},
- 'analysis/clinical/{clinicalAnalysis}/interpretation/{interpretationId}/merge': {'method_name': 'merge_interpretation'},
- 'analysis/clinical/{clinicalAnalysis}/interpretation/{interpretationId}/update': {'method_name': 'update_interpretation'},
- 'analysis/clinical/{clinicalAnalysis}/interpretation/{interpretations}/delete': {'method_name': 'delete_interpretation'}
+ 'analysis/clinical/{clinicalAnalysis}/interpretation/{interpretationId}/merge': {
+ 'method_name': 'merge_interpretation'},
+ 'analysis/clinical/{clinicalAnalysis}/interpretation/{interpretationId}/update': {
+ 'method_name': 'update_interpretation'},
+ 'analysis/clinical/{clinicalAnalysis}/interpretation/{interpretations}/delete': {
+ 'method_name': 'delete_interpretation'}
}
self.categories = {
'Users': 'User',
@@ -190,7 +192,7 @@ def get_method_name(self, endpoint, category):
elif len(items) == 4:
# e.g. /{apiVersion}/operation/variant/sample/genotype/index
if not self.any_arg(items):
- method_name = '_'.join([items[3], items[1], items[2]])
+ method_name = '_'.join([items[0], items[1], items[2], items[3]])
# /{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/{interpretationId}/merge
elif self.all_arg([items[0], items[2]]) and not self.any_arg([items[1], items[3]]):
method_name = '_'.join([items[3], items[1]])
@@ -257,9 +259,12 @@ def parse_resources(self, category, endpoint):
self.action = ''
else:
subpath = endpoint['path'].replace('/{apiVersion}/', '')
- resources = re.findall('([a-zA-Z0-9\/]+)(\/\{[a-zA-Z0-9]+\})?(\/[a-zA-Z0-9]+)?(\/\{[a-zA-Z0-9]+\})?(\/[a-zA-Z0-9\/]+)', subpath)
+ resources = re.findall(
+ '([a-zA-Z0-9\/]+)(\/\{[a-zA-Z0-9]+\})?(\/[a-zA-Z0-9]+)?(\/\{[a-zA-Z0-9]+\})?(\/[a-zA-Z0-9\/]+)',
+ subpath)
if resources:
- [self.category, self.id1, self.subcategory, self.id2, self.action] = resources if type(resources[0]) != tuple else list(resources[0])
+ [self.category, self.id1, self.subcategory, self.id2, self.action] = resources if type(
+ resources[0]) != tuple else list(resources[0])
if self.id1.startswith("/"):
self.id1 = self.id1[2:-1]
diff --git a/opencga-app/pom.xml b/opencga-app/pom.xml
index c5b59a3997e..d5bc2679e33 100644
--- a/opencga-app/pom.xml
+++ b/opencga-app/pom.xml
@@ -22,7 +22,7 @@
org.opencb.opencga
opencga
- 2.2.0-rc2
+ 2.2.0
../pom.xml
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/CliOptionsParser.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/CliOptionsParser.java
index 30600a7c5a0..89e92b50fe0 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/CliOptionsParser.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/CliOptionsParser.java
@@ -7,6 +7,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.stream.Collectors;
/**
* Created on 08/09/17.
@@ -54,15 +55,12 @@ protected void printMainUsage() {
}
protected void printCommands(JCommander commander) {
- int pad = commander.getCommands().keySet().stream().mapToInt(String::length).max().orElse(0);
- // Set padding between 14 and 40
- pad = Math.max(14, pad);
- pad = Math.min(40, pad);
+ // Calculate the padding needed and add 10 extra spaces to get some left indentation
+ int padding = 10 + commander.getCommands().keySet().stream().mapToInt(String::length).max().orElse(0);
- List cmds = new ArrayList(commander.getCommands().keySet());
- Collections.sort(cmds);
+ List cmds = commander.getCommands().keySet().stream().sorted().collect(Collectors.toList());
for (String key : cmds) {
- PrintUtils.printCommandHelpFormattedString(key, commander.getCommandDescription(key));
+ PrintUtils.printCommandHelpFormattedString(padding, key, commander.getCommandDescription(key));
}
}
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/GeneralCliOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/GeneralCliOptions.java
index 48d03109cd9..cfeff8f4af2 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/GeneralCliOptions.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/GeneralCliOptions.java
@@ -61,7 +61,7 @@ public static class GeneralOptions {
* This class contains all those common parameters available for all 'subcommands'
*/
public static class CommonCommandOptions {
- @Parameter(names = {"--out-format", "--OF"}, description = "Output format. one of {JSON, JSON_PRETTY, TEXT, YAML}", arity = 1)
+ @Parameter(names = {"--of", "--output-format"}, description = "Output format. one of {JSON, JSON_PRETTY, TEXT, YAML}", arity = 1)
public String outputFormat = "TEXT";
@Parameter(names = {"-h", "--help"}, description = "Print this help", help = true)
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java
index bcbe4cce3b6..56d6ce9a20e 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java
@@ -516,6 +516,7 @@ private void familyIndex()
VariantFamilyIndexParams params = new VariantFamilyIndexParams(
cliOptions.family,
cliOptions.overwrite,
+ cliOptions.update,
cliOptions.skipIncompleteFamilies);
toolRunner.execute(VariantFamilyIndexOperationTool.class,
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/JobCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/JobCommandOptions.java
index 3f425a27de8..f17a66d8f7a 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/JobCommandOptions.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/JobCommandOptions.java
@@ -6,6 +6,7 @@
import com.beust.jcommander.ParametersDelegate;
import org.opencb.opencga.app.cli.GeneralCliOptions;
import org.opencb.opencga.app.cli.internal.InternalCliOptionsParser;
+import org.opencb.opencga.app.cli.main.parent.ParentJobsCommandExecutor;
import org.opencb.opencga.core.api.ParamConstants;
@Parameters(commandNames = {"job"}, commandDescription = "Implement several job tasks")
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/VariantCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/VariantCommandOptions.java
index 93f1c3327cf..1e0b42ed447 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/VariantCommandOptions.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/VariantCommandOptions.java
@@ -539,6 +539,9 @@ public class FamilyIndexCommandOptions extends GeneralCliOptions.StudyOption {
@Parameter(names = {"--overwrite"}, description = "Overwrite existing values")
public boolean overwrite = false;
+ @Parameter(names = {"--update"}, description = "Update family index")
+ public boolean update = false;
+
@Parameter(names = {"--skip-incomplete-families"}, description = "Do not process incomplete families.")
public boolean skipIncompleteFamilies = false;
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java
index d1349085bb5..5ebd4c66481 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java
@@ -1,5 +1,5 @@
/*
-* Copyright 2015-2022-03-15 OpenCB
+* Copyright 2015-2022-03-25 OpenCB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,12 +32,12 @@
* WARNING: AUTOGENERATED CODE
*
* This code was generated by a tool.
-* Autogenerated on: 2022-03-15
+* Autogenerated on: 2022-03-25
*
* 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.
-* Command line version: 2.2.0-rc2-SNAPSHOT
-* Command line commit: 9160ac7368cfd4011dc8764856956dd793c77c96
+* Command line version: 2.2.0-SNAPSHOT
+* Command line commit: dfe705195791e3286a61838762d29ee845a5c875
*/
public abstract class OpenCgaCompleter implements Completer {
@@ -52,7 +52,7 @@ public abstract class OpenCgaCompleter implements Completer {
.map(Candidate::new)
.collect(toList());
- private List projectsList = asList( "create","search","aggregationStats","info","studies","update")
+ private List projectsList = asList( "create","search","aggregationStats","info","incRelease","studies","update")
.stream()
.map(Candidate::new)
.collect(toList());
@@ -62,7 +62,7 @@ public abstract class OpenCgaCompleter implements Completer {
.map(Candidate::new)
.collect(toList());
- private List clinicalList = asList( "update-acl","update-clinical-configuration","create","distinct","distinct-interpretation","search-interpretation","info-interpretation","run-interpreter-cancerTiering","run-interpreter-team","run-interpreter-tiering","run-interpreter-zetta","aggregationStats-rga","query-rga-gene","summary-rga-gene","run-rga-index","query-rga-individual","summary-rga-individual","query-rga-variant","summary-rga-variant","search","actionable-variant","query-variant","acl","delete","update","info","create-interpretation","delete-interpretation","update-interpretation")
+ private List clinicalList = asList( "update-acl","update-clinical-configuration","create","distinct","distinct-interpretation","search-interpretation","info-interpretation","run-interpreter-cancerTiering","run-interpreter-team","run-interpreter-tiering","run-interpreter-zetta","aggregationStats-rga","query-rga-gene","summary-rga-gene","run-rga-index","query-rga-individual","summary-rga-individual","query-rga-variant","summary-rga-variant","search","actionable-variant","query-variant","acl","delete","update","info","create-interpretation","clear-interpretation","delete-interpretation","revert-interpretation","update-interpretation")
.stream()
.map(Candidate::new)
.collect(toList());
@@ -72,12 +72,12 @@ public abstract class OpenCgaCompleter implements Completer {
.map(Candidate::new)
.collect(toList());
- private List individualsList = asList( "update-acl","aggregationStats","load-annotationSets","create","distinct","search","acl","delete","info","update","relatives")
+ private List individualsList = asList( "update-acl","aggregationStats","load-annotationSets","create","distinct","search","acl","delete","info","update","update-annotationSets-annotations","relatives")
.stream()
.map(Candidate::new)
.collect(toList());
- private List familiesList = asList( "update-acl","aggregationStats","load-annotationSets","create","distinct","search","acl","delete","info","update")
+ private List familiesList = asList( "update-acl","aggregationStats","load-annotationSets","create","distinct","search","acl","delete","info","update","update-annotationSets-annotations")
.stream()
.map(Candidate::new)
.collect(toList());
@@ -87,12 +87,12 @@ public abstract class OpenCgaCompleter implements Completer {
.map(Candidate::new)
.collect(toList());
- private List samplesList = asList( "update-acl","aggregationStats","load-annotationSets","create","distinct","load","search","acl","delete","info","update")
+ private List samplesList = asList( "update-acl","aggregationStats","load-annotationSets","create","distinct","load","search","acl","delete","info","update","update-annotationSets-annotations")
.stream()
.map(Candidate::new)
.collect(toList());
- private List alignmentsList = asList( "run-bwa","run-coverage-index","run-qc-geneCoverageStats","query-coverage","ratio-coverage","stats-coverage","run-deeptools","run-fastqc","run-index","run-picard","run-qc","query","run-samtools")
+ private List alignmentsList = asList( "run-bwa","run-coverage-index","coverage-qc-geneCoverageStats-run","query-coverage","ratio-coverage","stats-coverage","run-deeptools","run-fastqc","run-index","run-picard","run-qc","query","run-samtools")
.stream()
.map(Candidate::new)
.collect(toList());
@@ -102,22 +102,22 @@ public abstract class OpenCgaCompleter implements Completer {
.map(Candidate::new)
.collect(toList());
- private List studiesList = asList( "update-acl","create","search","acl","aggregationStats","info","search-audit","groups","update-groups","update-groups-users","permissionRules","update-permissionRules","run-templates","delete-templates","update","variableSets","update-variableSets","update-variableSets-variables")
+ private List studiesList = asList( "update-acl","create","search","acl","aggregationStats","info","search-audit","groups","update-groups","update-groups-users","permissionRules","update-permissionRules","run-templates","upload-templates","delete-templates","update","variableSets","update-variableSets","update-variableSets-variables")
.stream()
.map(Candidate::new)
.collect(toList());
- private List filesList = asList( "update-acl","aggregationStats","load-annotationSets","create","distinct","fetch","link","run-link","run-postlink","search","acl","delete","info","unlink","update","download","grep","head","image","refresh","tail","list","tree")
+ private List filesList = asList( "update-acl","aggregationStats","load-annotationSets","create","distinct","fetch","link","run-link","run-postlink","search","upload","acl","delete","info","unlink","update","update-annotationSets-annotations","download","grep","head","image","refresh","tail","list","tree")
.stream()
.map(Candidate::new)
.collect(toList());
- private List operationsList = asList( "configure-cellbase","aggregate-variant","delete-variant-annotation","index-variant-annotation","save-variant-annotation","configure-variant","delete-variant","aggregate-variant-family","index-variant-family","index-variant","launcher-variant-index","run-variant-julie","repair-variant-metadata","synchronize-variant-metadata","delete-variant-sample","index-variant-sample","delete-variant-score","index-variant-score","secondaryIndex-variant","delete-variant-secondaryIndex","delete-variant-stats","index-variant-stats","delete-variant-study")
+ private List operationsList = asList( "configure-cellbase","aggregate-variant","delete-variant-annotation","index-variant-annotation","save-variant-annotation","configure-variant","delete-variant","aggregate-variant-family","index-variant-family","index-variant","launcher-variant-index","run-variant-julie","repair-variant-metadata","synchronize-variant-metadata","delete-variant-sample","index-variant-sample","variant-sample-index-configure","delete-variant-score","index-variant-score","secondaryIndex-variant","delete-variant-secondaryIndex","delete-variant-stats","index-variant-stats","delete-variant-study")
.stream()
.map(Candidate::new)
.collect(toList());
- private List cohortsList = asList( "update-acl","aggregationStats","load-annotationSets","create","distinct","generate","search","acl","delete","info","update")
+ private List cohortsList = asList( "update-acl","aggregationStats","load-annotationSets","create","distinct","generate","search","acl","delete","info","update","update-annotationSets-annotations")
.stream()
.map(Candidate::new)
.collect(toList());
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java
index d66fa347754..016c9aa8c5e 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java
@@ -1,5 +1,5 @@
/*
-* Copyright 2015-2022-03-15 OpenCB
+* Copyright 2015-2022-03-25 OpenCB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,12 +26,12 @@
* WARNING: AUTOGENERATED CODE
*
* This code was generated by a tool.
-* Autogenerated on: 2022-03-15
+* Autogenerated on: 2022-03-25
*
* 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.
-* Command line version: 2.2.0-rc2-SNAPSHOT
-* Command line commit: 9160ac7368cfd4011dc8764856956dd793c77c96
+* Command line version: 2.2.0-SNAPSHOT
+* Command line commit: dfe705195791e3286a61838762d29ee845a5c875
*/
public class OpencgaCliOptionsParser extends ParentCliOptionsParser {
@@ -106,6 +106,7 @@ public OpencgaCliOptionsParser() {
projectsSubCommands.addCommand("search", projectsCommandOptions.searchCommandOptions);
projectsSubCommands.addCommand("aggregationstats", projectsCommandOptions.aggregationStatsCommandOptions);
projectsSubCommands.addCommand("info", projectsCommandOptions.infoCommandOptions);
+ projectsSubCommands.addCommand("increlease", projectsCommandOptions.incReleaseCommandOptions);
projectsSubCommands.addCommand("studies", projectsCommandOptions.studiesCommandOptions);
projectsSubCommands.addCommand("update", projectsCommandOptions.updateCommandOptions);
@@ -151,7 +152,9 @@ public OpencgaCliOptionsParser() {
analysisClinicalSubCommands.addCommand("update", analysisClinicalCommandOptions.updateCommandOptions);
analysisClinicalSubCommands.addCommand("info", analysisClinicalCommandOptions.infoCommandOptions);
analysisClinicalSubCommands.addCommand("interpretation-create", analysisClinicalCommandOptions.createInterpretationCommandOptions);
+ analysisClinicalSubCommands.addCommand("interpretation-clear", analysisClinicalCommandOptions.clearInterpretationCommandOptions);
analysisClinicalSubCommands.addCommand("interpretation-delete", analysisClinicalCommandOptions.deleteInterpretationCommandOptions);
+ analysisClinicalSubCommands.addCommand("interpretation-revert", analysisClinicalCommandOptions.revertInterpretationCommandOptions);
analysisClinicalSubCommands.addCommand("interpretation-update", analysisClinicalCommandOptions.updateInterpretationCommandOptions);
jobsCommandOptions = new JobsCommandOptions(commonCommandOptions, jCommander);
@@ -170,6 +173,7 @@ public OpencgaCliOptionsParser() {
jobsSubCommands.addCommand("update", jobsCommandOptions.updateCommandOptions);
jobsSubCommands.addCommand("log-head", jobsCommandOptions.headLogCommandOptions);
jobsSubCommands.addCommand("log-tail", jobsCommandOptions.tailLogCommandOptions);
+ jobsSubCommands.addCommand("log", jobsCommandOptions.logCommandOptions);
individualsCommandOptions = new IndividualsCommandOptions(commonCommandOptions, jCommander);
jCommander.addCommand("individuals", individualsCommandOptions);
@@ -184,6 +188,7 @@ public OpencgaCliOptionsParser() {
individualsSubCommands.addCommand("delete", individualsCommandOptions.deleteCommandOptions);
individualsSubCommands.addCommand("info", individualsCommandOptions.infoCommandOptions);
individualsSubCommands.addCommand("update", individualsCommandOptions.updateCommandOptions);
+ individualsSubCommands.addCommand("annotationsets-annotations-update", individualsCommandOptions.updateAnnotationSetsAnnotationsCommandOptions);
individualsSubCommands.addCommand("relatives", individualsCommandOptions.relativesCommandOptions);
familiesCommandOptions = new FamiliesCommandOptions(commonCommandOptions, jCommander);
@@ -199,6 +204,7 @@ public OpencgaCliOptionsParser() {
familiesSubCommands.addCommand("delete", familiesCommandOptions.deleteCommandOptions);
familiesSubCommands.addCommand("info", familiesCommandOptions.infoCommandOptions);
familiesSubCommands.addCommand("update", familiesCommandOptions.updateCommandOptions);
+ familiesSubCommands.addCommand("annotationsets-annotations-update", familiesCommandOptions.updateAnnotationSetsAnnotationsCommandOptions);
usersCommandOptions = new UsersCommandOptions(commonCommandOptions, jCommander);
jCommander.addCommand("users", usersCommandOptions);
@@ -229,13 +235,14 @@ public OpencgaCliOptionsParser() {
samplesSubCommands.addCommand("delete", samplesCommandOptions.deleteCommandOptions);
samplesSubCommands.addCommand("info", samplesCommandOptions.infoCommandOptions);
samplesSubCommands.addCommand("update", samplesCommandOptions.updateCommandOptions);
+ samplesSubCommands.addCommand("annotationsets-annotations-update", samplesCommandOptions.updateAnnotationSetsAnnotationsCommandOptions);
analysisAlignmentCommandOptions = new AnalysisAlignmentCommandOptions(commonCommandOptions, jCommander);
jCommander.addCommand("alignments", analysisAlignmentCommandOptions);
JCommander analysisAlignmentSubCommands = jCommander.getCommands().get("alignments");
analysisAlignmentSubCommands.addCommand("bwa-run", analysisAlignmentCommandOptions.runBwaCommandOptions);
analysisAlignmentSubCommands.addCommand("coverage-index-run", analysisAlignmentCommandOptions.runCoverageIndexCommandOptions);
- analysisAlignmentSubCommands.addCommand("qc-genecoveragestats-run", analysisAlignmentCommandOptions.runQcGeneCoverageStatsCommandOptions);
+ analysisAlignmentSubCommands.addCommand("coverage-qc-genecoveragestats-run", analysisAlignmentCommandOptions.coverageQcGeneCoverageStatsRunCommandOptions);
analysisAlignmentSubCommands.addCommand("coverage-query", analysisAlignmentCommandOptions.queryCoverageCommandOptions);
analysisAlignmentSubCommands.addCommand("coverage-ratio", analysisAlignmentCommandOptions.ratioCoverageCommandOptions);
analysisAlignmentSubCommands.addCommand("coverage-stats", analysisAlignmentCommandOptions.statsCoverageCommandOptions);
@@ -268,12 +275,12 @@ public OpencgaCliOptionsParser() {
studiesSubCommands.addCommand("permissionrules", studiesCommandOptions.permissionRulesCommandOptions);
studiesSubCommands.addCommand("permissionrules-update", studiesCommandOptions.updatePermissionRulesCommandOptions);
studiesSubCommands.addCommand("templates-run", studiesCommandOptions.runTemplatesCommandOptions);
+ studiesSubCommands.addCommand("templates-upload", studiesCommandOptions.uploadTemplatesCommandOptions);
studiesSubCommands.addCommand("templates-delete", studiesCommandOptions.deleteTemplatesCommandOptions);
studiesSubCommands.addCommand("update", studiesCommandOptions.updateCommandOptions);
studiesSubCommands.addCommand("variablesets", studiesCommandOptions.variableSetsCommandOptions);
studiesSubCommands.addCommand("variablesets-update", studiesCommandOptions.updateVariableSetsCommandOptions);
studiesSubCommands.addCommand("variablesets-variables-update", studiesCommandOptions.updateVariableSetsVariablesCommandOptions);
- studiesSubCommands.addCommand("templates-upload", studiesCommandOptions.templatesUploadCommandOptions);
filesCommandOptions = new FilesCommandOptions(commonCommandOptions, jCommander);
jCommander.addCommand("files", filesCommandOptions);
@@ -288,11 +295,13 @@ public OpencgaCliOptionsParser() {
filesSubCommands.addCommand("link-run", filesCommandOptions.runLinkCommandOptions);
filesSubCommands.addCommand("postlink-run", filesCommandOptions.runPostlinkCommandOptions);
filesSubCommands.addCommand("search", filesCommandOptions.searchCommandOptions);
+ filesSubCommands.addCommand("upload", filesCommandOptions.uploadCommandOptions);
filesSubCommands.addCommand("acl", filesCommandOptions.aclCommandOptions);
filesSubCommands.addCommand("delete", filesCommandOptions.deleteCommandOptions);
filesSubCommands.addCommand("info", filesCommandOptions.infoCommandOptions);
filesSubCommands.addCommand("unlink", filesCommandOptions.unlinkCommandOptions);
filesSubCommands.addCommand("update", filesCommandOptions.updateCommandOptions);
+ filesSubCommands.addCommand("annotationsets-annotations-update", filesCommandOptions.updateAnnotationSetsAnnotationsCommandOptions);
filesSubCommands.addCommand("download", filesCommandOptions.downloadCommandOptions);
filesSubCommands.addCommand("grep", filesCommandOptions.grepCommandOptions);
filesSubCommands.addCommand("head", filesCommandOptions.headCommandOptions);
@@ -301,7 +310,6 @@ public OpencgaCliOptionsParser() {
filesSubCommands.addCommand("tail", filesCommandOptions.tailCommandOptions);
filesSubCommands.addCommand("list", filesCommandOptions.listCommandOptions);
filesSubCommands.addCommand("tree", filesCommandOptions.treeCommandOptions);
- filesSubCommands.addCommand("upload", filesCommandOptions.uploadCommandOptions);
operationsVariantStorageCommandOptions = new OperationsVariantStorageCommandOptions(commonCommandOptions, jCommander);
jCommander.addCommand("operations", operationsVariantStorageCommandOptions);
@@ -322,6 +330,7 @@ public OpencgaCliOptionsParser() {
operationsVariantStorageSubCommands.addCommand("variant-metadata-synchronize", operationsVariantStorageCommandOptions.synchronizeVariantMetadataCommandOptions);
operationsVariantStorageSubCommands.addCommand("variant-sample-delete", operationsVariantStorageCommandOptions.deleteVariantSampleCommandOptions);
operationsVariantStorageSubCommands.addCommand("variant-sample-index", operationsVariantStorageCommandOptions.indexVariantSampleCommandOptions);
+ operationsVariantStorageSubCommands.addCommand("variant-sample-index-configure", operationsVariantStorageCommandOptions.variantSampleIndexConfigureCommandOptions);
operationsVariantStorageSubCommands.addCommand("variant-score-delete", operationsVariantStorageCommandOptions.deleteVariantScoreCommandOptions);
operationsVariantStorageSubCommands.addCommand("variant-score-index", operationsVariantStorageCommandOptions.indexVariantScoreCommandOptions);
operationsVariantStorageSubCommands.addCommand("variant-secondaryindex", operationsVariantStorageCommandOptions.secondaryIndexVariantCommandOptions);
@@ -344,6 +353,7 @@ public OpencgaCliOptionsParser() {
cohortsSubCommands.addCommand("delete", cohortsCommandOptions.deleteCommandOptions);
cohortsSubCommands.addCommand("info", cohortsCommandOptions.infoCommandOptions);
cohortsSubCommands.addCommand("update", cohortsCommandOptions.updateCommandOptions);
+ cohortsSubCommands.addCommand("annotationsets-annotations-update", cohortsCommandOptions.updateAnnotationSetsAnnotationsCommandOptions);
}
public AnalysisVariantCommandOptions getAnalysisVariantCommandOptions() {
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaMain.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaMain.java
index b793fc1ee36..6541ebc5fcb 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaMain.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaMain.java
@@ -23,6 +23,8 @@
import org.opencb.opencga.app.cli.main.shell.Shell;
import org.opencb.opencga.app.cli.main.utils.CommandLineUtils;
import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.Locale;
@@ -34,6 +36,7 @@
*/
public class OpencgaMain {
+ private static final Logger logger = LoggerFactory.getLogger(OpencgaMain.class);
public static Mode mode = Mode.CLI;
public static Shell shell;
public static Level logLevel = Level.OFF;
@@ -48,6 +51,7 @@ public static void main(String[] args) {
checkLogLevel(args);
checkMode(args);
CommandLineUtils.printLog(Arrays.toString(args));
+ logger.debug(Arrays.toString(args));
try {
if (Mode.SHELL.equals(getMode())) {
executeShell(args);
@@ -56,7 +60,7 @@ public static void main(String[] args) {
}
} catch (Exception e) {
CommandLineUtils.error("Failed to initialize OpenCGA CLI " + e.getMessage(), e);
- e.printStackTrace();
+ logger.error("Failed to initialize OpenCGA CLI " + e.getMessage(), e);
}
}
@@ -67,22 +71,25 @@ private static void checkMode(String[] args) {
setMode(Mode.CLI);
}
CommandLineUtils.printLog("Execution mode " + getMode());
+ logger.debug("Execution mode " + getMode());
}
-
private static void checkLogLevel(String[] args) {
if (ArrayUtils.contains(args, "--log-level")) {
+ String level = "";
try {
- String level = args[ArrayUtils.indexOf(args, "--log-level") + 1].toLowerCase(Locale.ROOT);
- setLogLevel(getNormalizedLogLevel(level));
+ level = args[ArrayUtils.indexOf(args, "--log-level") + 1].toLowerCase(Locale.ROOT);
+ Level logLevel = getNormalizedLogLevel(level);
+ setLogLevel(logLevel);
+
+ logger.debug("Console verbose mode: " + logLevel);
} catch (Exception e) {
setLogLevel(Level.SEVERE);
CommandLineUtils.error("Invalid log level. Valid values are INFO, WARN, DEBUG, ERROR", e);
+ logger.error("Invalid log level " + level + ": Valid values are INFO, WARN, DEBUG, ERROR", e);
System.exit(0);
}
}
-
-
}
private static Level getNormalizedLogLevel(String level) {
@@ -96,7 +103,7 @@ private static Level getNormalizedLogLevel(String level) {
case "warn":
return Level.WARNING;
case "error":
- case "sever":
+ case "severe":
return Level.SEVERE;
default:
return Level.OFF;
@@ -123,13 +130,16 @@ public static void executeShell(String[] args) {
}
// Create a shell executor instance
shell = new Shell(options);
- CommandLineUtils.printLog("Shell created ");
+ CommandLineUtils.debug("Shell created ");
+ logger.debug("Shell created ");
// Launch execute command to begin the execution
shell.execute();
} catch (CatalogAuthenticationException e) {
CommandLineUtils.printLog("Failed to initialize shell", e);
+ logger.error("Failed to initialize shell", e);
} catch (Exception e) {
CommandLineUtils.printLog("Failed to execute shell", e);
+ logger.error("Failed to execute shell", e);
}
}
@@ -143,23 +153,24 @@ private static String[] normalizePasswordArgs(String[] args, String s) {
return args;
}
- public static String[] parseCliParams(String[] args) throws CatalogAuthenticationException {
+ public static String[] parseCliParams(String[] args) {
CommandLineUtils.printLog("Executing " + CommandLineUtils.argsToString(args));
if (CommandLineUtils.isNotHelpCommand(args)) {
if (ArrayUtils.contains(args, "--user-password")) {
normalizePasswordArgs(args, "--user-password");
}
}
- CommandLineUtils.printLog("CLI PARSED PARAMS ::: " + CommandLineUtils.argsToString(args));
+ CommandLineUtils.debug("CLI parsed params ::: " + CommandLineUtils.argsToString(args));
+ logger.debug("CLI parsed params ::: " + CommandLineUtils.argsToString(args));
String shortcut = CommandLineUtils.getShortcut(args);
args = CommandLineUtils.processShortCuts(args);
-
if (args != null) {
- CommandLineUtils.printLog("PROCESS SHORTCUTS RESULT ::: " + CommandLineUtils.argsToString(args));
+ CommandLineUtils.debug("Process shortcut result ::: " + CommandLineUtils.argsToString(args));
+ logger.debug("Process shortcut result ::: " + CommandLineUtils.argsToString(args));
} else {
- CommandLineUtils.printLog("IS SHORTCUT " + shortcut);
+ CommandLineUtils.debug("Is shortcut " + shortcut);
+ logger.debug("Is shortcut " + shortcut);
}
-
return args;
}
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java
index e4aad2a469f..f5cdf875fe2 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java
@@ -35,7 +35,7 @@
* WARNING: AUTOGENERATED CODE
*
* This code was generated by a tool.
-* Autogenerated on: 2022-03-15
+* Autogenerated on: 2022-03-25
*
* 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.
@@ -44,7 +44,7 @@
/**
* This class contains methods for the Analysis - Alignment command line.
- * OpenCGA version: 2.2.0-rc2-SNAPSHOT
+ * OpenCGA version: 2.2.0-SNAPSHOT
* PATH: /{apiVersion}/analysis/alignment
*/
public class AnalysisAlignmentCommandExecutor extends OpencgaCommandExecutor {
@@ -72,8 +72,8 @@ public void execute() throws Exception {
case "coverage-index-run":
queryResponse = runCoverageIndex();
break;
- case "qc-genecoveragestats-run":
- queryResponse = runQcGeneCoverageStats();
+ case "coverage-qc-genecoveragestats-run":
+ queryResponse = coverageQcGeneCoverageStatsRun();
break;
case "coverage-query":
queryResponse = queryCoverage();
@@ -126,13 +126,13 @@ private RestResponse runBwa() throws Exception {
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
BwaWrapperParams bwaWrapperParams = new BwaWrapperParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(bwaWrapperParams));
@@ -164,13 +164,13 @@ private RestResponse runCoverageIndex() throws Exception {
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
CoverageIndexParams coverageIndexParams = new CoverageIndexParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(coverageIndexParams));
@@ -181,18 +181,21 @@ private RestResponse runCoverageIndex() throws Exception {
} else {
((CoverageIndexParams)coverageIndexParams)
.setFile(commandOptions.file)
- .setWindowSize(commandOptions.windowSize)
- .setOverwrite(commandOptions.overwrite);
+ .setWindowSize(commandOptions.windowSize);
+
+ if (commandOptions.overwrite != null){
+ ((CoverageIndexParams)coverageIndexParams).setOverwrite(commandOptions.overwrite);
+ }
}
return openCGAClient.getAlignmentClient().runCoverageIndex(coverageIndexParams, queryParams);
}
- private RestResponse runQcGeneCoverageStats() throws Exception {
+ private RestResponse coverageQcGeneCoverageStatsRun() throws Exception {
- logger.debug("Executing runQcGeneCoverageStats in Analysis - Alignment command line");
+ logger.debug("Executing coverageQcGeneCoverageStatsRun in Analysis - Alignment command line");
- AnalysisAlignmentCommandOptions.RunQcGeneCoverageStatsCommandOptions commandOptions = analysisAlignmentCommandOptions.runQcGeneCoverageStatsCommandOptions;
+ AnalysisAlignmentCommandOptions.CoverageQcGeneCoverageStatsRunCommandOptions commandOptions = analysisAlignmentCommandOptions.coverageQcGeneCoverageStatsRunCommandOptions;
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
@@ -200,13 +203,13 @@ private RestResponse runQcGeneCoverageStats() throws Exception {
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
AlignmentGeneCoverageStatsParams alignmentGeneCoverageStatsParams = new AlignmentGeneCoverageStatsParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(alignmentGeneCoverageStatsParams));
@@ -221,7 +224,7 @@ private RestResponse runQcGeneCoverageStats() throws Exception {
.setOutdir(commandOptions.outdir);
}
- return openCGAClient.getAlignmentClient().runQcGeneCoverageStats(alignmentGeneCoverageStatsParams, queryParams);
+ return openCGAClient.getAlignmentClient().coverageQcGeneCoverageStatsRun(alignmentGeneCoverageStatsParams, queryParams);
}
private RestResponse queryCoverage() throws Exception {
@@ -239,8 +242,8 @@ private RestResponse queryCoverage() throws Exception {
queryParams.putIfNotEmpty("range", commandOptions.range);
queryParams.putIfNotNull("windowSize", commandOptions.windowSize);
queryParams.putIfNotNull("splitResults", commandOptions.splitResults);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getAlignmentClient().queryCoverage(commandOptions.file, queryParams);
@@ -261,8 +264,8 @@ private RestResponse ratioCoverage() throws Exception {
queryParams.putIfNotNull("onlyExons", commandOptions.onlyExons);
queryParams.putIfNotNull("windowSize", commandOptions.windowSize);
queryParams.putIfNotNull("splitResults", commandOptions.splitResults);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getAlignmentClient().ratioCoverage(commandOptions.file1, commandOptions.file2, queryParams);
@@ -277,8 +280,8 @@ private RestResponse statsCoverage() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("threshold", commandOptions.threshold);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getAlignmentClient().statsCoverage(commandOptions.file, commandOptions.gene, queryParams);
@@ -296,13 +299,13 @@ private RestResponse runDeeptools() throws Exception {
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
DeeptoolsWrapperParams deeptoolsWrapperParams = new DeeptoolsWrapperParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(deeptoolsWrapperParams));
@@ -331,13 +334,13 @@ private RestResponse runFastqc() throws Exception {
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
FastqcWrapperParams fastqcWrapperParams = new FastqcWrapperParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(fastqcWrapperParams));
@@ -366,13 +369,13 @@ private RestResponse runIndex() throws Exception {
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
AlignmentIndexParams alignmentIndexParams = new AlignmentIndexParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(alignmentIndexParams));
@@ -382,8 +385,11 @@ private RestResponse runIndex() throws Exception {
objectMapper.writeValue(new java.io.File(commandOptions.jsonFile), alignmentIndexParams);
} else {
((AlignmentIndexParams)alignmentIndexParams)
- .setFile(commandOptions.file)
- .setOverwrite(commandOptions.overwrite);
+ .setFile(commandOptions.file);
+
+ if (commandOptions.overwrite != null){
+ ((AlignmentIndexParams)alignmentIndexParams).setOverwrite(commandOptions.overwrite);
+ }
}
return openCGAClient.getAlignmentClient().runIndex(alignmentIndexParams, queryParams);
@@ -401,13 +407,13 @@ private RestResponse runPicard() throws Exception {
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
PicardWrapperParams picardWrapperParams = new PicardWrapperParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(picardWrapperParams));
@@ -436,13 +442,13 @@ private RestResponse runQc() throws Exception {
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
AlignmentQcParams alignmentQcParams = new AlignmentQcParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(alignmentQcParams));
@@ -456,9 +462,12 @@ private RestResponse runQc() throws Exception {
.setBedFile(commandOptions.bedFile)
.setDictFile(commandOptions.dictFile)
.setSkip(commandOptions.skip)
- .setOverwrite(commandOptions.overwrite)
.setOutdir(commandOptions.outdir);
+ if (commandOptions.overwrite != null){
+ ((AlignmentQcParams)alignmentQcParams).setOverwrite(commandOptions.overwrite);
+ }
+
}
return openCGAClient.getAlignmentClient().runQc(alignmentQcParams, queryParams);
}
@@ -489,8 +498,8 @@ private RestResponse query() throws Exception {
queryParams.putIfNotNull("forceMDField", commandOptions.forceMDField);
queryParams.putIfNotNull("binQualities", commandOptions.binQualities);
queryParams.putIfNotNull("splitResults", commandOptions.splitResults);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getAlignmentClient().query(commandOptions.file, queryParams);
@@ -508,13 +517,13 @@ private RestResponse runSamtools() throws Exception {
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
SamtoolsWrapperParams samtoolsWrapperParams = new SamtoolsWrapperParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(samtoolsWrapperParams));
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java
index 489065c2c1d..3267711f8e3 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java
@@ -64,7 +64,7 @@
* WARNING: AUTOGENERATED CODE
*
* This code was generated by a tool.
-* Autogenerated on: 2022-03-15
+* Autogenerated on: 2022-03-25
*
* 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.
@@ -73,7 +73,7 @@
/**
* This class contains methods for the Analysis - Clinical command line.
- * OpenCGA version: 2.2.0-rc2-SNAPSHOT
+ * OpenCGA version: 2.2.0-SNAPSHOT
* PATH: /{apiVersion}/analysis/clinical
*/
public class AnalysisClinicalCommandExecutor extends OpencgaCommandExecutor {
@@ -176,9 +176,15 @@ public void execute() throws Exception {
case "interpretation-create":
queryResponse = createInterpretation();
break;
+ case "interpretation-clear":
+ queryResponse = clearInterpretation();
+ break;
case "interpretation-delete":
queryResponse = deleteInterpretation();
break;
+ case "interpretation-revert":
+ queryResponse = revertInterpretation();
+ break;
case "interpretation-update":
queryResponse = updateInterpretation();
break;
@@ -200,13 +206,13 @@ private RestResponse updateAcl() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("propagate", commandOptions.propagate);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
ClinicalAnalysisAclUpdateParams clinicalAnalysisAclUpdateParams = new ClinicalAnalysisAclUpdateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(clinicalAnalysisAclUpdateParams));
@@ -231,13 +237,13 @@ private RestResponse updateClinicalConfiguration() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
ClinicalAnalysisStudyConfiguration clinicalAnalysisStudyConfiguration = new ClinicalAnalysisStudyConfiguration();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(clinicalAnalysisStudyConfiguration));
@@ -260,8 +266,8 @@ private RestResponse create() throws Exception {
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("skipCreateDefaultInterpretation", commandOptions.skipCreateDefaultInterpretation);
queryParams.putIfNotNull("includeResult", commandOptions.includeResult);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
@@ -297,10 +303,14 @@ private RestResponse create() throws Exception {
FamilyParam familyParam= new FamilyParam();
invokeSetter(familyParam, "id", commandOptions.familyId);
- ClinicalAnalysis.Type typeParam = ClinicalAnalysis.Type.valueOf(commandOptions.type);
+ ClinicalAnalysis.Type typeParam = null;
+ if (commandOptions.type != null) {
+ typeParam = ClinicalAnalysis.Type.valueOf(commandOptions.type);
+
+ }
ClinicalAnalysisCreateParams clinicalAnalysisCreateParams = new ClinicalAnalysisCreateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(clinicalAnalysisCreateParams));
@@ -316,7 +326,6 @@ private RestResponse create() throws Exception {
.setDisorder(disorderReferenceParam)
.setProband(probandParam)
.setFamily(familyParam)
- .setPanelLock(commandOptions.panelLock)
.setAnalyst(clinicalAnalystParam)
.setReport(clinicalReport)
.setInterpretation(interpretationCreateParams)
@@ -326,6 +335,10 @@ private RestResponse create() throws Exception {
.setPriority(priorityParam)
.setStatus(statusParam);
+ if (commandOptions.panelLock != null){
+ ((ClinicalAnalysisCreateParams)clinicalAnalysisCreateParams).setPanelLock(commandOptions.panelLock);
+ }
+
}
return openCGAClient.getClinicalAnalysisClient().create(clinicalAnalysisCreateParams, queryParams);
}
@@ -362,8 +375,8 @@ private RestResponse distinct() throws Exception {
queryParams.putIfNotEmpty("status", commandOptions.status);
queryParams.putIfNotEmpty("internalStatus", commandOptions.internalStatus);
queryParams.putIfNotNull("deleted", commandOptions.deleted);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().distinct(commandOptions.field, queryParams);
@@ -390,8 +403,8 @@ private RestResponse distinctInterpretation() throws Exception {
queryParams.putIfNotEmpty("status", commandOptions.status);
queryParams.putIfNotEmpty("internalStatus", commandOptions.internalStatus);
queryParams.putIfNotEmpty("release", commandOptions.release);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().distinctInterpretation(commandOptions.field, queryParams);
@@ -423,8 +436,8 @@ private RestResponse searchInterpretation() throws Exception {
queryParams.putIfNotEmpty("status", commandOptions.status);
queryParams.putIfNotEmpty("internalStatus", commandOptions.internalStatus);
queryParams.putIfNotEmpty("release", commandOptions.release);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().searchInterpretation(queryParams);
@@ -442,8 +455,8 @@ private RestResponse infoInterpretation() throws Exception {
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("version", commandOptions.version);
queryParams.putIfNotNull("deleted", commandOptions.deleted);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().infoInterpretation(commandOptions.interpretations, queryParams);
@@ -461,13 +474,13 @@ private RestResponse runInterpreterCancerTiering() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
CancerTieringInterpretationAnalysisParams cancerTieringInterpretationAnalysisParams = new CancerTieringInterpretationAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(cancerTieringInterpretationAnalysisParams));
@@ -478,8 +491,11 @@ private RestResponse runInterpreterCancerTiering() throws Exception {
} else {
((CancerTieringInterpretationAnalysisParams)cancerTieringInterpretationAnalysisParams)
.setClinicalAnalysis(commandOptions.clinicalAnalysis)
- .setDiscardedVariants(splitWithTrim(commandOptions.discardedVariants))
- .setPrimary(commandOptions.primary);
+ .setDiscardedVariants(splitWithTrim(commandOptions.discardedVariants));
+
+ if (commandOptions.primary != null){
+ ((CancerTieringInterpretationAnalysisParams)cancerTieringInterpretationAnalysisParams).setPrimary(commandOptions.primary);
+ }
}
return openCGAClient.getClinicalAnalysisClient().runInterpreterCancerTiering(cancerTieringInterpretationAnalysisParams, queryParams);
@@ -497,13 +513,13 @@ private RestResponse runInterpreterTeam() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
TeamInterpretationAnalysisParams teamInterpretationAnalysisParams = new TeamInterpretationAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(teamInterpretationAnalysisParams));
@@ -515,8 +531,11 @@ private RestResponse runInterpreterTeam() throws Exception {
((TeamInterpretationAnalysisParams)teamInterpretationAnalysisParams)
.setClinicalAnalysis(commandOptions.clinicalAnalysis)
.setPanels(splitWithTrim(commandOptions.panels))
- .setFamilySegregation(commandOptions.familySegregation)
- .setPrimary(commandOptions.primary);
+ .setFamilySegregation(commandOptions.familySegregation);
+
+ if (commandOptions.primary != null){
+ ((TeamInterpretationAnalysisParams)teamInterpretationAnalysisParams).setPrimary(commandOptions.primary);
+ }
}
return openCGAClient.getClinicalAnalysisClient().runInterpreterTeam(teamInterpretationAnalysisParams, queryParams);
@@ -534,14 +553,18 @@ private RestResponse runInterpreterTiering() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
- ClinicalProperty.Penetrance penetranceParam = ClinicalProperty.Penetrance.valueOf(commandOptions.penetrance);
+ ClinicalProperty.Penetrance penetranceParam = null;
+ if (commandOptions.penetrance != null) {
+ penetranceParam = ClinicalProperty.Penetrance.valueOf(commandOptions.penetrance);
+
+ }
TieringInterpretationAnalysisParams tieringInterpretationAnalysisParams = new TieringInterpretationAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(tieringInterpretationAnalysisParams));
@@ -552,8 +575,11 @@ private RestResponse runInterpreterTiering() throws Exception {
} else {
((TieringInterpretationAnalysisParams)tieringInterpretationAnalysisParams)
.setClinicalAnalysis(commandOptions.clinicalAnalysis)
- .setPanels(splitWithTrim(commandOptions.panels))
- .setPrimary(commandOptions.primary);
+ .setPanels(splitWithTrim(commandOptions.panels));
+
+ if (commandOptions.primary != null){
+ ((TieringInterpretationAnalysisParams)tieringInterpretationAnalysisParams).setPrimary(commandOptions.primary);
+ }
}
return openCGAClient.getClinicalAnalysisClient().runInterpreterTiering(tieringInterpretationAnalysisParams, queryParams);
@@ -571,13 +597,13 @@ private RestResponse runInterpreterZetta() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
ZettaInterpretationAnalysisParams zettaInterpretationAnalysisParams = new ZettaInterpretationAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(zettaInterpretationAnalysisParams));
@@ -630,14 +656,20 @@ private RestResponse runInterpreterZetta() throws Exception {
.setFunctionalScore(commandOptions.functionalScore)
.setClinical(commandOptions.clinical)
.setClinicalSignificance(commandOptions.clinicalSignificance)
- .setClinicalConfirmedStatus(commandOptions.clinicalConfirmedStatus)
.setCustomAnnotation(commandOptions.customAnnotation)
.setPanel(commandOptions.panel)
.setPanelModeOfInheritance(commandOptions.panelModeOfInheritance)
.setPanelConfidence(commandOptions.panelConfidence)
.setPanelRoleInCancer(commandOptions.panelRoleInCancer)
- .setTrait(commandOptions.trait)
- .setPrimary(commandOptions.primary);
+ .setTrait(commandOptions.trait);
+
+ if (commandOptions.clinicalConfirmedStatus != null){
+ ((ZettaInterpretationAnalysisParams)zettaInterpretationAnalysisParams).setClinicalConfirmedStatus(commandOptions.clinicalConfirmedStatus);
+ }
+
+ if (commandOptions.primary != null){
+ ((ZettaInterpretationAnalysisParams)zettaInterpretationAnalysisParams).setPrimary(commandOptions.primary);
+ }
}
return openCGAClient.getClinicalAnalysisClient().runInterpreterZetta(zettaInterpretationAnalysisParams, queryParams);
@@ -673,8 +705,8 @@ private RestResponse aggregationStatsRga() throws Exception {
queryParams.putIfNotEmpty("populationFrequency", commandOptions.populationFrequency);
queryParams.putIfNotEmpty("consequenceType", commandOptions.consequenceType);
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().aggregationStatsRga(commandOptions.field, queryParams);
@@ -716,8 +748,8 @@ private RestResponse queryRgaGene() throws Exception {
queryParams.putIfNotEmpty("populationFrequency", commandOptions.populationFrequency);
queryParams.putIfNotEmpty("consequenceType", commandOptions.consequenceType);
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().queryRgaGene(queryParams);
@@ -754,8 +786,8 @@ private RestResponse summaryRgaGene() throws Exception {
queryParams.putIfNotEmpty("populationFrequency", commandOptions.populationFrequency);
queryParams.putIfNotEmpty("consequenceType", commandOptions.consequenceType);
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().summaryRgaGene(queryParams);
@@ -774,13 +806,13 @@ private RestResponse runRgaIndex() throws Exception {
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
queryParams.putIfNotNull("auxiliarIndex", commandOptions.auxiliarIndex);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
RgaAnalysisParams rgaAnalysisParams = new RgaAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(rgaAnalysisParams));
@@ -829,8 +861,8 @@ private RestResponse queryRgaIndividual() throws Exception
queryParams.putIfNotEmpty("populationFrequency", commandOptions.populationFrequency);
queryParams.putIfNotEmpty("consequenceType", commandOptions.consequenceType);
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().queryRgaIndividual(queryParams);
@@ -867,8 +899,8 @@ private RestResponse summaryRgaIndividual() throws
queryParams.putIfNotEmpty("populationFrequency", commandOptions.populationFrequency);
queryParams.putIfNotEmpty("consequenceType", commandOptions.consequenceType);
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().summaryRgaIndividual(queryParams);
@@ -910,8 +942,8 @@ private RestResponse queryRgaVariant() throws Exception {
queryParams.putIfNotEmpty("populationFrequency", commandOptions.populationFrequency);
queryParams.putIfNotEmpty("consequenceType", commandOptions.consequenceType);
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().queryRgaVariant(queryParams);
@@ -948,8 +980,8 @@ private RestResponse summaryRgaVariant() throws Except
queryParams.putIfNotEmpty("populationFrequency", commandOptions.populationFrequency);
queryParams.putIfNotEmpty("consequenceType", commandOptions.consequenceType);
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().summaryRgaVariant(queryParams);
@@ -992,8 +1024,8 @@ private RestResponse search() throws Exception {
queryParams.putIfNotEmpty("status", commandOptions.status);
queryParams.putIfNotEmpty("internalStatus", commandOptions.internalStatus);
queryParams.putIfNotNull("deleted", commandOptions.deleted);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().search(queryParams);
@@ -1008,8 +1040,8 @@ private RestResponse actionableVariant() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("sample", commandOptions.sample);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().actionableVariant(queryParams);
@@ -1082,8 +1114,8 @@ private RestResponse queryVariant() throws Exception {
queryParams.putIfNotEmpty("panelFeatureType", commandOptions.panelFeatureType);
queryParams.putIfNotNull("panelIntersection", commandOptions.panelIntersection);
queryParams.putIfNotEmpty("trait", commandOptions.trait);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().queryVariant(queryParams);
@@ -1099,8 +1131,8 @@ private RestResponse acl() throws Exception {
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("member", commandOptions.member);
queryParams.putIfNotNull("silent", commandOptions.silent);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().acl(commandOptions.clinicalAnalyses, queryParams);
@@ -1115,8 +1147,8 @@ private RestResponse delete() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("force", commandOptions.force);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().delete(commandOptions.clinicalAnalyses, queryParams);
@@ -1133,8 +1165,8 @@ private RestResponse update() throws Exception {
queryParams.putIfNotEmpty("exclude", commandOptions.exclude);
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("includeResult", commandOptions.includeResult);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
@@ -1164,10 +1196,14 @@ private RestResponse update() throws Exception {
FamilyParam familyParam= new FamilyParam();
invokeSetter(familyParam, "id", commandOptions.familyId);
- ClinicalAnalysis.Type typeParam = ClinicalAnalysis.Type.valueOf(commandOptions.type);
+ ClinicalAnalysis.Type typeParam = null;
+ if (commandOptions.type != null) {
+ typeParam = ClinicalAnalysis.Type.valueOf(commandOptions.type);
+
+ }
ClinicalAnalysisUpdateParams clinicalAnalysisUpdateParams = new ClinicalAnalysisUpdateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(clinicalAnalysisUpdateParams));
@@ -1180,10 +1216,8 @@ private RestResponse update() throws Exception {
.setId(commandOptions.id)
.setDescription(commandOptions.description)
.setDisorder(disorderReferenceParam)
- .setPanelLock(commandOptions.panelLock)
.setProband(probandParam)
.setFamily(familyParam)
- .setLocked(commandOptions.locked)
.setAnalyst(clinicalAnalystParam)
.setReport(clinicalReport)
.setCreationDate(commandOptions.creationDate)
@@ -1192,6 +1226,14 @@ private RestResponse update() throws Exception {
.setPriority(priorityParam)
.setStatus(statusParam);
+ if (commandOptions.panelLock != null){
+ ((ClinicalAnalysisUpdateParams)clinicalAnalysisUpdateParams).setPanelLock(commandOptions.panelLock);
+ }
+
+ if (commandOptions.locked != null){
+ ((ClinicalAnalysisUpdateParams)clinicalAnalysisUpdateParams).setLocked(commandOptions.locked);
+ }
+
}
return openCGAClient.getClinicalAnalysisClient().update(commandOptions.clinicalAnalyses, clinicalAnalysisUpdateParams, queryParams);
}
@@ -1207,8 +1249,8 @@ private RestResponse info() throws Exception {
queryParams.putIfNotEmpty("exclude", commandOptions.exclude);
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("deleted", commandOptions.deleted);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().info(commandOptions.clinicalAnalysis, queryParams);
@@ -1226,8 +1268,8 @@ private RestResponse createInterpretation() throws Exception {
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("setAs", commandOptions.setAs);
queryParams.putIfNotNull("includeResult", commandOptions.includeResult);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
@@ -1243,7 +1285,7 @@ private RestResponse createInterpretation() throws Exception {
invokeSetter(clinicalAnalystParam, "id", commandOptions.analystId);
InterpretationCreateParams interpretationCreateParams = new InterpretationCreateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(interpretationCreateParams));
@@ -1265,6 +1307,21 @@ private RestResponse createInterpretation() throws Exception {
return openCGAClient.getClinicalAnalysisClient().createInterpretation(commandOptions.clinicalAnalysis, interpretationCreateParams, queryParams);
}
+ private RestResponse clearInterpretation() throws Exception {
+
+ logger.debug("Executing clearInterpretation in Analysis - Clinical command line");
+
+ AnalysisClinicalCommandOptions.ClearInterpretationCommandOptions commandOptions = analysisClinicalCommandOptions.clearInterpretationCommandOptions;
+
+ ObjectMap queryParams = new ObjectMap();
+ queryParams.putIfNotEmpty("study", commandOptions.study);
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ }
+
+ return openCGAClient.getClinicalAnalysisClient().clearInterpretation(commandOptions.clinicalAnalysis, commandOptions.interpretations, queryParams);
+ }
+
private RestResponse deleteInterpretation() throws Exception {
logger.debug("Executing deleteInterpretation in Analysis - Clinical command line");
@@ -1274,13 +1331,28 @@ private RestResponse deleteInterpretation() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("setAsPrimary", commandOptions.setAsPrimary);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getClinicalAnalysisClient().deleteInterpretation(commandOptions.clinicalAnalysis, commandOptions.interpretations, queryParams);
}
+ private RestResponse revertInterpretation() throws Exception {
+
+ logger.debug("Executing revertInterpretation in Analysis - Clinical command line");
+
+ AnalysisClinicalCommandOptions.RevertInterpretationCommandOptions commandOptions = analysisClinicalCommandOptions.revertInterpretationCommandOptions;
+
+ ObjectMap queryParams = new ObjectMap();
+ queryParams.putIfNotEmpty("study", commandOptions.study);
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ }
+
+ return openCGAClient.getClinicalAnalysisClient().revertInterpretation(commandOptions.clinicalAnalysis, commandOptions.interpretation, commandOptions.version, queryParams);
+ }
+
private RestResponse updateInterpretation() throws Exception {
logger.debug("Executing updateInterpretation in Analysis - Clinical command line");
@@ -1293,8 +1365,8 @@ private RestResponse updateInterpretation() throws Exception {
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("setAs", commandOptions.setAs);
queryParams.putIfNotNull("includeResult", commandOptions.includeResult);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
@@ -1310,7 +1382,7 @@ private RestResponse updateInterpretation() throws Exception {
invokeSetter(clinicalAnalystParam, "id", commandOptions.analystId);
InterpretationUpdateParams interpretationUpdateParams = new InterpretationUpdateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(interpretationUpdateParams));
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java
index 93823c34d0c..dbd17453bf0 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java
@@ -62,7 +62,7 @@
* WARNING: AUTOGENERATED CODE
*
* This code was generated by a tool.
-* Autogenerated on: 2022-03-15
+* Autogenerated on: 2022-03-25
*
* 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.
@@ -71,7 +71,7 @@
/**
* This class contains methods for the Analysis - Variant command line.
- * OpenCGA version: 2.2.0-rc2-SNAPSHOT
+ * OpenCGA version: 2.2.0-SNAPSHOT
* PATH: /{apiVersion}/analysis/variant
*/
public class AnalysisVariantCommandExecutor extends OpencgaCommandExecutor {
@@ -257,8 +257,8 @@ private RestResponse aggregationStats() throws Exception {
queryParams.putIfNotEmpty("customAnnotation", commandOptions.customAnnotation);
queryParams.putIfNotEmpty("trait", commandOptions.trait);
queryParams.putIfNotEmpty("field", commandOptions.field);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().aggregationStats(queryParams);
@@ -303,13 +303,13 @@ private RestResponse runCircos() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
CircosAnalysisParams circosAnalysisParams = new CircosAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(circosAnalysisParams));
@@ -336,8 +336,8 @@ private RestResponse deleteCohortStats() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("cohort", commandOptions.cohort);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().deleteCohortStats(queryParams);
@@ -351,8 +351,8 @@ private RestResponse infoCohortStats() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().infoCohortStats(commandOptions.cohort, queryParams);
@@ -370,13 +370,13 @@ private RestResponse runCohortStats() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
CohortVariantStatsAnalysisParams cohortVariantStatsAnalysisParams = new CohortVariantStatsAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(cohortVariantStatsAnalysisParams));
@@ -388,10 +388,13 @@ private RestResponse runCohortStats() throws Exception {
((CohortVariantStatsAnalysisParams)cohortVariantStatsAnalysisParams)
.setCohort(commandOptions.cohort)
.setSamples(splitWithTrim(commandOptions.samples))
- .setIndex(commandOptions.index)
.setSampleAnnotation(commandOptions.sampleAnnotation)
.setOutdir(commandOptions.outdir);
+ if (commandOptions.index != null){
+ ((CohortVariantStatsAnalysisParams)cohortVariantStatsAnalysisParams).setIndex(commandOptions.index);
+ }
+
}
return openCGAClient.getVariantClient().runCohortStats(cohortVariantStatsAnalysisParams, queryParams);
}
@@ -411,13 +414,13 @@ private RestResponse runExport() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
VariantExportParams variantExportParams = new VariantExportParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(variantExportParams));
@@ -429,14 +432,12 @@ private RestResponse runExport() throws Exception {
((VariantExportParams)variantExportParams)
.setOutdir(commandOptions.outdir)
.setOutputFileName(commandOptions.outputFileName)
- .setOutputFormat(commandOptions.outputFormat)
+ .setOutputFileFormat(commandOptions.outputFileFormat)
.setVariantsFile(commandOptions.variantsFile)
.setInclude(commandOptions.bodyInclude)
.setExclude(commandOptions.bodyExclude)
- .setCompress(commandOptions.compress)
.setLimit(commandOptions.limit)
.setSkip(commandOptions.skip)
- .setSummary(commandOptions.summary)
.setSavedFilter(commandOptions.savedFilter)
.setChromosome(commandOptions.chromosome)
.setReference(commandOptions.reference)
@@ -468,7 +469,6 @@ private RestResponse runExport() throws Exception {
.setCohortStatsMgf(commandOptions.cohortStatsMgf)
.setMissingAlleles(commandOptions.missingAlleles)
.setMissingGenotypes(commandOptions.missingGenotypes)
- .setAnnotationExists(commandOptions.annotationExists)
.setScore(commandOptions.score)
.setPolyphen(commandOptions.polyphen)
.setSift(commandOptions.sift)
@@ -483,9 +483,27 @@ private RestResponse runExport() throws Exception {
.setProteinKeyword(commandOptions.proteinKeyword)
.setDrug(commandOptions.drug)
.setCustomAnnotation(commandOptions.customAnnotation)
- .setUnknownGenotype(commandOptions.unknownGenotype)
- .setSampleMetadata(commandOptions.sampleMetadata)
- .setSort(commandOptions.sort);
+ .setUnknownGenotype(commandOptions.unknownGenotype);
+
+ if (commandOptions.compress != null){
+ ((VariantExportParams)variantExportParams).setCompress(commandOptions.compress);
+ }
+
+ if (commandOptions.summary != null){
+ ((VariantExportParams)variantExportParams).setSummary(commandOptions.summary);
+ }
+
+ if (commandOptions.annotationExists != null){
+ ((VariantExportParams)variantExportParams).setAnnotationExists(commandOptions.annotationExists);
+ }
+
+ if (commandOptions.sampleMetadata != null){
+ ((VariantExportParams)variantExportParams).setSampleMetadata(commandOptions.sampleMetadata);
+ }
+
+ if (commandOptions.sort != null){
+ ((VariantExportParams)variantExportParams).setSort(commandOptions.sort);
+ }
}
return openCGAClient.getVariantClient().runExport(variantExportParams, queryParams);
@@ -503,8 +521,8 @@ private RestResponse genotypesFamily() throws Exception {
queryParams.putIfNotEmpty("clinicalAnalysis", commandOptions.clinicalAnalysis);
queryParams.putIfNotNull("penetrance", commandOptions.penetrance);
queryParams.putIfNotEmpty("disorder", commandOptions.disorder);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().genotypesFamily(commandOptions.modeOfInheritance, queryParams);
@@ -522,13 +540,13 @@ private RestResponse runFamilyQc() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
FamilyQcAnalysisParams familyQcAnalysisParams = new FamilyQcAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(familyQcAnalysisParams));
@@ -561,8 +579,8 @@ private RestResponse deleteFile() throws Exception {
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("file", commandOptions.file);
queryParams.putIfNotNull("resume", commandOptions.resume);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().deleteFile(queryParams);
@@ -580,13 +598,13 @@ private RestResponse runGatk() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
GatkWrapperParams gatkWrapperParams = new GatkWrapperParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(gatkWrapperParams));
@@ -615,13 +633,13 @@ private RestResponse runGenomePlot() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
GenomePlotAnalysisParams genomePlotAnalysisParams = new GenomePlotAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(genomePlotAnalysisParams));
@@ -653,15 +671,23 @@ private RestResponse runGwas() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
- GwasConfiguration.Method methodParam = GwasConfiguration.Method.valueOf(commandOptions.method);
- GwasConfiguration.FisherMode fisherModeParam = GwasConfiguration.FisherMode.valueOf(commandOptions.fisherMode);
+ GwasConfiguration.Method methodParam = null;
+ if (commandOptions.method != null) {
+ methodParam = GwasConfiguration.Method.valueOf(commandOptions.method);
+
+ }
+ GwasConfiguration.FisherMode fisherModeParam = null;
+ if (commandOptions.fisherMode != null) {
+ fisherModeParam = GwasConfiguration.FisherMode.valueOf(commandOptions.fisherMode);
+
+ }
GwasAnalysisParams gwasAnalysisParams = new GwasAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(gwasAnalysisParams));
@@ -672,7 +698,6 @@ private RestResponse runGwas() throws Exception {
} else {
((GwasAnalysisParams)gwasAnalysisParams)
.setPhenotype(commandOptions.phenotype)
- .setIndex(commandOptions.index)
.setIndexScoreId(commandOptions.indexScoreId)
.setCaseCohort(commandOptions.caseCohort)
.setCaseCohortSamplesAnnotation(commandOptions.caseCohortSamplesAnnotation)
@@ -682,6 +707,10 @@ private RestResponse runGwas() throws Exception {
.setControlCohortSamples(splitWithTrim(commandOptions.controlCohortSamples))
.setOutdir(commandOptions.outdir);
+ if (commandOptions.index != null){
+ ((GwasAnalysisParams)gwasAnalysisParams).setIndex(commandOptions.index);
+ }
+
}
return openCGAClient.getVariantClient().runGwas(gwasAnalysisParams, queryParams);
}
@@ -698,13 +727,13 @@ private RestResponse runIndex() throws Exception {
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
VariantIndexParams variantIndexParams = new VariantIndexParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(variantIndexParams));
@@ -715,18 +744,10 @@ private RestResponse runIndex() throws Exception {
} else {
((VariantIndexParams)variantIndexParams)
.setFile(commandOptions.file)
- .setResume(commandOptions.resume)
.setOutdir(commandOptions.outdir)
- .setTransform(commandOptions.transform)
- .setGvcf(commandOptions.gvcf)
- .setNormalizationSkip(commandOptions.normalizationSkip)
.setReferenceGenome(commandOptions.referenceGenome)
.setFailOnMalformedLines(commandOptions.failOnMalformedLines)
- .setFamily(commandOptions.family)
- .setSomatic(commandOptions.somatic)
- .setLoad(commandOptions.load)
.setLoadSplitData(commandOptions.loadSplitData)
- .setLoadMultiFileData(commandOptions.loadMultiFileData)
.setLoadSampleIndex(commandOptions.loadSampleIndex)
.setLoadArchive(commandOptions.loadArchive)
.setLoadHomRef(commandOptions.loadHomRef)
@@ -735,13 +756,60 @@ private RestResponse runIndex() throws Exception {
.setIncludeSampleData(commandOptions.includeSampleData)
.setMerge(commandOptions.merge)
.setDeduplicationPolicy(commandOptions.deduplicationPolicy)
- .setCalculateStats(commandOptions.calculateStats)
.setAggregationMappingFile(commandOptions.aggregationMappingFile)
- .setAnnotate(commandOptions.annotate)
- .setAnnotator(commandOptions.annotator)
- .setOverwriteAnnotations(commandOptions.overwriteAnnotations)
- .setIndexSearch(commandOptions.indexSearch)
- .setSkipIndexedFiles(commandOptions.skipIndexedFiles);
+ .setAnnotator(commandOptions.annotator);
+
+ if (commandOptions.resume != null){
+ ((VariantIndexParams)variantIndexParams).setResume(commandOptions.resume);
+ }
+
+ if (commandOptions.transform != null){
+ ((VariantIndexParams)variantIndexParams).setTransform(commandOptions.transform);
+ }
+
+ if (commandOptions.gvcf != null){
+ ((VariantIndexParams)variantIndexParams).setGvcf(commandOptions.gvcf);
+ }
+
+ if (commandOptions.normalizationSkip != null){
+ ((VariantIndexParams)variantIndexParams).setNormalizationSkip(commandOptions.normalizationSkip);
+ }
+
+ if (commandOptions.family != null){
+ ((VariantIndexParams)variantIndexParams).setFamily(commandOptions.family);
+ }
+
+ if (commandOptions.somatic != null){
+ ((VariantIndexParams)variantIndexParams).setSomatic(commandOptions.somatic);
+ }
+
+ if (commandOptions.load != null){
+ ((VariantIndexParams)variantIndexParams).setLoad(commandOptions.load);
+ }
+
+ if (commandOptions.loadMultiFileData != null){
+ ((VariantIndexParams)variantIndexParams).setLoadMultiFileData(commandOptions.loadMultiFileData);
+ }
+
+ if (commandOptions.calculateStats != null){
+ ((VariantIndexParams)variantIndexParams).setCalculateStats(commandOptions.calculateStats);
+ }
+
+ if (commandOptions.annotate != null){
+ ((VariantIndexParams)variantIndexParams).setAnnotate(commandOptions.annotate);
+ }
+
+ if (commandOptions.overwriteAnnotations != null){
+ ((VariantIndexParams)variantIndexParams).setOverwriteAnnotations(commandOptions.overwriteAnnotations);
+ }
+
+ if (commandOptions.indexSearch != null){
+ ((VariantIndexParams)variantIndexParams).setIndexSearch(commandOptions.indexSearch);
+ }
+
+ if (commandOptions.skipIndexedFiles != null){
+ ((VariantIndexParams)variantIndexParams).setSkipIndexedFiles(commandOptions.skipIndexedFiles);
+ }
}
return openCGAClient.getVariantClient().runIndex(variantIndexParams, queryParams);
@@ -759,13 +827,13 @@ private RestResponse runIndividualQc() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
IndividualQcAnalysisParams individualQcAnalysisParams = new IndividualQcAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(individualQcAnalysisParams));
@@ -796,13 +864,13 @@ private RestResponse runInferredSex() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
InferredSexAnalysisParams inferredSexAnalysisParams = new InferredSexAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(inferredSexAnalysisParams));
@@ -831,8 +899,8 @@ private RestResponse queryKnockoutGene() throws Exception {
queryParams.putIfNotNull("skip", commandOptions.skip);
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("job", commandOptions.job);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().queryKnockoutGene(queryParams);
@@ -849,8 +917,8 @@ private RestResponse queryKnockoutIndividual() throws Exce
queryParams.putIfNotNull("skip", commandOptions.skip);
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("job", commandOptions.job);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().queryKnockoutIndividual(queryParams);
@@ -868,13 +936,13 @@ private RestResponse runKnockout() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
KnockoutAnalysisParams knockoutAnalysisParams = new KnockoutAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(knockoutAnalysisParams));
@@ -891,9 +959,15 @@ private RestResponse runKnockout() throws Exception {
.setConsequenceType(commandOptions.consequenceType)
.setFilter(commandOptions.filter)
.setQual(commandOptions.qual)
- .setSkipGenesFile(commandOptions.skipGenesFile)
- .setOutdir(commandOptions.outdir)
- .setIndex(commandOptions.index);
+ .setOutdir(commandOptions.outdir);
+
+ if (commandOptions.skipGenesFile != null){
+ ((KnockoutAnalysisParams)knockoutAnalysisParams).setSkipGenesFile(commandOptions.skipGenesFile);
+ }
+
+ if (commandOptions.index != null){
+ ((KnockoutAnalysisParams)knockoutAnalysisParams).setIndex(commandOptions.index);
+ }
}
return openCGAClient.getVariantClient().runKnockout(knockoutAnalysisParams, queryParams);
@@ -911,13 +985,13 @@ private RestResponse runMendelianError() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
MendelianErrorAnalysisParams mendelianErrorAnalysisParams = new MendelianErrorAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(mendelianErrorAnalysisParams));
@@ -952,8 +1026,8 @@ private RestResponse metadata() throws Exception {
queryParams.putIfNotEmpty("includeSample", commandOptions.includeSample);
queryParams.putIfNotEmpty("include", commandOptions.include);
queryParams.putIfNotEmpty("exclude", commandOptions.exclude);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().metadata(queryParams);
@@ -982,8 +1056,8 @@ private RestResponse queryMutationalSignature() throws Exception {
queryParams.putIfNotEmpty("panelRoleInCancer", commandOptions.panelRoleInCancer);
queryParams.putIfNotNull("panelIntersection", commandOptions.panelIntersection);
queryParams.putIfNotNull("fitting", commandOptions.fitting);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().queryMutationalSignature(queryParams);
@@ -1001,13 +1075,13 @@ private RestResponse runMutationalSignature() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
MutationalSignatureAnalysisParams mutationalSignatureAnalysisParams = new MutationalSignatureAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(mutationalSignatureAnalysisParams));
@@ -1021,9 +1095,12 @@ private RestResponse runMutationalSignature() throws Exception {
.setId(commandOptions.id)
.setDescription(commandOptions.description)
.setRelease(commandOptions.release)
- .setFitting(commandOptions.fitting)
.setOutdir(commandOptions.outdir);
+ if (commandOptions.fitting != null){
+ ((MutationalSignatureAnalysisParams)mutationalSignatureAnalysisParams).setFitting(commandOptions.fitting);
+ }
+
}
return openCGAClient.getVariantClient().runMutationalSignature(mutationalSignatureAnalysisParams, queryParams);
}
@@ -1040,13 +1117,13 @@ private RestResponse runPlink() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
PlinkWrapperParams plinkWrapperParams = new PlinkWrapperParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(plinkWrapperParams));
@@ -1146,8 +1223,8 @@ private RestResponse query() throws Exception {
queryParams.putIfNotEmpty("panelFeatureType", commandOptions.panelFeatureType);
queryParams.putIfNotNull("panelIntersection", commandOptions.panelIntersection);
queryParams.putIfNotEmpty("trait", commandOptions.trait);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().query(queryParams);
@@ -1165,13 +1242,13 @@ private RestResponse runRelatedness() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
RelatednessAnalysisParams relatednessAnalysisParams = new RelatednessAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(relatednessAnalysisParams));
@@ -1203,13 +1280,13 @@ private RestResponse runRvtests() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
RvtestsWrapperParams rvtestsWrapperParams = new RvtestsWrapperParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(rvtestsWrapperParams));
@@ -1255,8 +1332,8 @@ private RestResponse aggregationStatsSample() throws Exception {
queryParams.putIfNotEmpty("clinicalSignificance", commandOptions.clinicalSignificance);
queryParams.putIfNotNull("clinicalConfirmedStatus", commandOptions.clinicalConfirmedStatus);
queryParams.putIfNotEmpty("field", commandOptions.field);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().aggregationStatsSample(queryParams);
@@ -1274,13 +1351,13 @@ private RestResponse runSampleEligibility() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
SampleEligibilityAnalysisParams sampleEligibilityAnalysisParams = new SampleEligibilityAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(sampleEligibilityAnalysisParams));
@@ -1291,9 +1368,12 @@ private RestResponse runSampleEligibility() throws Exception {
} else {
((SampleEligibilityAnalysisParams)sampleEligibilityAnalysisParams)
.setQuery(commandOptions.query)
- .setIndex(commandOptions.index)
.setCohortId(commandOptions.cohortId);
+ if (commandOptions.index != null){
+ ((SampleEligibilityAnalysisParams)sampleEligibilityAnalysisParams).setIndex(commandOptions.index);
+ }
+
}
return openCGAClient.getVariantClient().runSampleEligibility(sampleEligibilityAnalysisParams, queryParams);
}
@@ -1310,8 +1390,8 @@ private RestResponse runSampleQc() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
@@ -1343,7 +1423,7 @@ private RestResponse runSampleQc() throws Exception {
invokeSetter(annotationVariantQueryParams, "clinicalConfirmedStatus", commandOptions.variantStatsQueryClinicalConfirmedStatus);
SampleQcAnalysisParams sampleQcAnalysisParams = new SampleQcAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(sampleQcAnalysisParams));
@@ -1381,8 +1461,8 @@ private RestResponse querySample() throws Exception {
queryParams.putIfNotEmpty("variant", commandOptions.variant);
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("genotype", commandOptions.genotype);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().querySample(queryParams);
@@ -1400,13 +1480,13 @@ private RestResponse runSample() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
SampleVariantFilterParams sampleVariantFilterParams = new SampleVariantFilterParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(sampleVariantFilterParams));
@@ -1418,7 +1498,6 @@ private RestResponse runSample() throws Exception {
((SampleVariantFilterParams)sampleVariantFilterParams)
.setGenotypes(splitWithTrim(commandOptions.genotypes))
.setSample(splitWithTrim(commandOptions.sample))
- .setSamplesInAllVariants(commandOptions.samplesInAllVariants)
.setMaxVariants(commandOptions.maxVariants)
.setId(commandOptions.id)
.setRegion(commandOptions.region)
@@ -1428,7 +1507,6 @@ private RestResponse runSample() throws Exception {
.setPanelModeOfInheritance(commandOptions.panelModeOfInheritance)
.setPanelConfidence(commandOptions.panelConfidence)
.setPanelRoleInCancer(commandOptions.panelRoleInCancer)
- .setPanelIntersection(commandOptions.panelIntersection)
.setCohortStatsRef(commandOptions.cohortStatsRef)
.setCohortStatsAlt(commandOptions.cohortStatsAlt)
.setCohortStatsMaf(commandOptions.cohortStatsMaf)
@@ -1446,6 +1524,14 @@ private RestResponse runSample() throws Exception {
.setClinicalSignificance(commandOptions.clinicalSignificance)
.setClinicalConfirmedStatus(commandOptions.clinicalConfirmedStatus);
+ if (commandOptions.samplesInAllVariants != null){
+ ((SampleVariantFilterParams)sampleVariantFilterParams).setSamplesInAllVariants(commandOptions.samplesInAllVariants);
+ }
+
+ if (commandOptions.panelIntersection != null){
+ ((SampleVariantFilterParams)sampleVariantFilterParams).setPanelIntersection(commandOptions.panelIntersection);
+ }
+
}
return openCGAClient.getVariantClient().runSample(sampleVariantFilterParams, queryParams);
}
@@ -1472,8 +1558,8 @@ private RestResponse querySampleStats() throws Exception {
queryParams.putIfNotNull("clinicalConfirmedStatus", commandOptions.clinicalConfirmedStatus);
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("filterTranscript", commandOptions.filterTranscript);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getVariantClient().querySampleStats(commandOptions.sample, queryParams);
@@ -1491,13 +1577,13 @@ private RestResponse runSampleStats() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
SampleVariantStatsAnalysisParams sampleVariantStatsAnalysisParams = new SampleVariantStatsAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(sampleVariantStatsAnalysisParams));
@@ -1510,12 +1596,18 @@ private RestResponse runSampleStats() throws Exception {
.setSample(splitWithTrim(commandOptions.sample))
.setIndividual(splitWithTrim(commandOptions.individual))
.setOutdir(commandOptions.outdir)
- .setIndex(commandOptions.index)
- .setIndexOverwrite(commandOptions.indexOverwrite)
.setIndexId(commandOptions.indexId)
.setIndexDescription(commandOptions.indexDescription)
.setBatchSize(commandOptions.batchSize);
+ if (commandOptions.index != null){
+ ((SampleVariantStatsAnalysisParams)sampleVariantStatsAnalysisParams).setIndex(commandOptions.index);
+ }
+
+ if (commandOptions.indexOverwrite != null){
+ ((SampleVariantStatsAnalysisParams)sampleVariantStatsAnalysisParams).setIndexOverwrite(commandOptions.indexOverwrite);
+ }
+
}
return openCGAClient.getVariantClient().runSampleStats(sampleVariantStatsAnalysisParams, queryParams);
}
@@ -1533,13 +1625,13 @@ private RestResponse runStatsExport() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
VariantStatsExportParams variantStatsExportParams = new VariantStatsExportParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(variantStatsExportParams));
@@ -1553,7 +1645,7 @@ private RestResponse runStatsExport() throws Exception {
.setOutput(commandOptions.output)
.setRegion(commandOptions.region)
.setGene(commandOptions.gene)
- .setOutputFormat(commandOptions.outputFormat);
+ .setOutputFileFormat(commandOptions.outputFileFormat);
}
return openCGAClient.getVariantClient().runStatsExport(variantStatsExportParams, queryParams);
@@ -1571,13 +1663,13 @@ private RestResponse runStats() throws Exception {
queryParams.putIfNotEmpty("jobDescription", commandOptions.jobDescription);
queryParams.putIfNotEmpty("jobDependsOn", commandOptions.jobDependsOn);
queryParams.putIfNotEmpty("jobTags", commandOptions.jobTags);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
VariantStatsAnalysisParams variantStatsAnalysisParams = new VariantStatsAnalysisParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(variantStatsAnalysisParams));
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java
index 599cd077ffe..521faa0b5fc 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java
@@ -37,7 +37,7 @@
* WARNING: AUTOGENERATED CODE
*
* This code was generated by a tool.
-* Autogenerated on: 2022-03-15
+* Autogenerated on: 2022-03-25
*
* 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.
@@ -46,7 +46,7 @@
/**
* This class contains methods for the Cohorts command line.
- * OpenCGA version: 2.2.0-rc2-SNAPSHOT
+ * OpenCGA version: 2.2.0-SNAPSHOT
* PATH: /{apiVersion}/cohorts
*/
public class CohortsCommandExecutor extends OpencgaCommandExecutor {
@@ -101,6 +101,9 @@ public void execute() throws Exception {
case "update":
queryResponse = update();
break;
+ case "annotationsets-annotations-update":
+ queryResponse = updateAnnotationSetsAnnotations();
+ break;
default:
logger.error("Subcommand not valid");
break;
@@ -118,13 +121,13 @@ private RestResponse updateAcl() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
CohortAclUpdateParams cohortAclUpdateParams = new CohortAclUpdateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(cohortAclUpdateParams));
@@ -160,8 +163,8 @@ private RestResponse aggregationStats() throws Exception {
queryParams.putIfNotEmpty("annotation", commandOptions.annotation);
queryParams.putIfNotNull("default_values", commandOptions.default_values);
queryParams.putIfNotEmpty("field", commandOptions.field);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getCohortClient().aggregationStats(queryParams);
@@ -177,13 +180,13 @@ private RestResponse loadAnnotationSets() throws Exception {
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("parents", commandOptions.parents);
queryParams.putIfNotEmpty("annotationSetId", commandOptions.annotationSetId);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
TsvAnnotationParams tsvAnnotationParams = new TsvAnnotationParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(tsvAnnotationParams));
@@ -212,8 +215,8 @@ private RestResponse create() throws Exception {
queryParams.putIfNotEmpty("variableSet", commandOptions.variableSet);
queryParams.putIfNotEmpty("variable", commandOptions.variable);
queryParams.putIfNotNull("includeResult", commandOptions.includeResult);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
@@ -221,10 +224,14 @@ private RestResponse create() throws Exception {
invokeSetter(statusParams, "id", commandOptions.statusId);
invokeSetter(statusParams, "name", commandOptions.statusName);
invokeSetter(statusParams, "description", commandOptions.statusDescription);
- Enums.CohortType typeParam = Enums.CohortType.valueOf(commandOptions.type);
+ Enums.CohortType typeParam = null;
+ if (commandOptions.type != null) {
+ typeParam = Enums.CohortType.valueOf(commandOptions.type);
+
+ }
CohortCreateParams cohortCreateParams = new CohortCreateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(cohortCreateParams));
@@ -268,8 +275,8 @@ private RestResponse distinct() throws Exception {
queryParams.putIfNotEmpty("samples", commandOptions.samples);
queryParams.putIfNotEmpty("numSamples", commandOptions.numSamples);
queryParams.putIfNotEmpty("release", commandOptions.release);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getCohortClient().distinct(commandOptions.field, queryParams);
@@ -299,8 +306,8 @@ private RestResponse generate() throws Exception {
queryParams.putIfNotEmpty("release", commandOptions.release);
queryParams.putIfNotNull("snapshot", commandOptions.snapshot);
queryParams.putIfNotNull("includeResult", commandOptions.includeResult);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
@@ -308,10 +315,14 @@ private RestResponse generate() throws Exception {
invokeSetter(statusParams, "body_id", commandOptions.statusBodyId);
invokeSetter(statusParams, "name", commandOptions.statusName);
invokeSetter(statusParams, "description", commandOptions.statusDescription);
- Enums.CohortType typeParam = Enums.CohortType.valueOf(commandOptions.type);
+ Enums.CohortType typeParam = null;
+ if (commandOptions.type != null) {
+ typeParam = Enums.CohortType.valueOf(commandOptions.type);
+
+ }
CohortGenerateParams cohortGenerateParams = new CohortGenerateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(cohortGenerateParams));
@@ -360,8 +371,8 @@ private RestResponse search() throws Exception {
queryParams.putIfNotEmpty("samples", commandOptions.samples);
queryParams.putIfNotEmpty("numSamples", commandOptions.numSamples);
queryParams.putIfNotEmpty("release", commandOptions.release);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getCohortClient().search(queryParams);
@@ -377,8 +388,8 @@ private RestResponse acl() throws Exception {
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("member", commandOptions.member);
queryParams.putIfNotNull("silent", commandOptions.silent);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getCohortClient().acl(commandOptions.cohorts, queryParams);
@@ -392,8 +403,8 @@ private RestResponse delete() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getCohortClient().delete(commandOptions.cohorts, queryParams);
@@ -411,8 +422,8 @@ private RestResponse info() throws Exception {
queryParams.putIfNotNull("flattenAnnotations", commandOptions.flattenAnnotations);
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("deleted", commandOptions.deleted);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getCohortClient().info(commandOptions.cohorts, queryParams);
@@ -429,8 +440,8 @@ private RestResponse update() throws Exception {
queryParams.putIfNotEmpty("exclude", commandOptions.exclude);
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("includeResult", commandOptions.includeResult);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
@@ -438,10 +449,14 @@ private RestResponse update() throws Exception {
invokeSetter(statusParams, "id", commandOptions.statusId);
invokeSetter(statusParams, "name", commandOptions.statusName);
invokeSetter(statusParams, "description", commandOptions.statusDescription);
- Enums.CohortType typeParam = Enums.CohortType.valueOf(commandOptions.type);
+ Enums.CohortType typeParam = null;
+ if (commandOptions.type != null) {
+ typeParam = Enums.CohortType.valueOf(commandOptions.type);
+
+ }
CohortUpdateParams cohortUpdateParams = new CohortUpdateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(cohortUpdateParams));
@@ -461,4 +476,30 @@ private RestResponse update() throws Exception {
}
return openCGAClient.getCohortClient().update(commandOptions.cohorts, cohortUpdateParams, queryParams);
}
+
+ private RestResponse updateAnnotationSetsAnnotations() throws Exception {
+
+ logger.debug("Executing updateAnnotationSetsAnnotations in Cohorts command line");
+
+ CohortsCommandOptions.UpdateAnnotationSetsAnnotationsCommandOptions commandOptions = cohortsCommandOptions.updateAnnotationSetsAnnotationsCommandOptions;
+
+ ObjectMap queryParams = new ObjectMap();
+ queryParams.putIfNotEmpty("study", commandOptions.study);
+ queryParams.putIfNotNull("action", commandOptions.action);
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ }
+
+
+ ObjectMap objectMap = new ObjectMap();
+ if (commandOptions.jsonDataModel) {
+ RestResponse res = new RestResponse<>();
+ res.setType(QueryType.VOID);
+ PrintUtils.println(getObjectAsJSON(objectMap));
+ return res;
+ } else if (commandOptions.jsonFile != null) {
+ ObjectMapper objectMapper = new ObjectMapper();
+ objectMapper.writeValue(new java.io.File(commandOptions.jsonFile), objectMap);
+ } return openCGAClient.getCohortClient().updateAnnotationSetsAnnotations(commandOptions.cohort, commandOptions.annotationSet, objectMap, queryParams);
+ }
}
\ No newline at end of file
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java
index 67f2c7c1ccc..46743e09b10 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java
@@ -28,7 +28,7 @@
* WARNING: AUTOGENERATED CODE
*
* This code was generated by a tool.
-* Autogenerated on: 2022-03-15
+* Autogenerated on: 2022-03-25
*
* 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.
@@ -37,7 +37,7 @@
/**
* This class contains methods for the Disease Panels command line.
- * OpenCGA version: 2.2.0-rc2-SNAPSHOT
+ * OpenCGA version: 2.2.0-SNAPSHOT
* PATH: /{apiVersion}/panels
*/
public class DiseasePanelsCommandExecutor extends OpencgaCommandExecutor {
@@ -100,13 +100,13 @@ private RestResponse updateAcl() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
PanelAclUpdateParams panelAclUpdateParams = new PanelAclUpdateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(panelAclUpdateParams));
@@ -136,13 +136,13 @@ private RestResponse create() throws Exception {
queryParams.putIfNotEmpty("source", commandOptions.source);
queryParams.putIfNotEmpty("id", commandOptions.id);
queryParams.putIfNotNull("includeResult", commandOptions.includeResult);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
PanelCreateParams panelCreateParams = new PanelCreateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(panelCreateParams));
@@ -186,8 +186,8 @@ private RestResponse distinct() throws Exception {
queryParams.putIfNotEmpty("acl", commandOptions.acl);
queryParams.putIfNotEmpty("release", commandOptions.release);
queryParams.putIfNotNull("snapshot", commandOptions.snapshot);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getDiseasePanelClient().distinct(commandOptions.field, queryParams);
@@ -222,8 +222,8 @@ private RestResponse search() throws Exception {
queryParams.putIfNotEmpty("acl", commandOptions.acl);
queryParams.putIfNotEmpty("release", commandOptions.release);
queryParams.putIfNotNull("snapshot", commandOptions.snapshot);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getDiseasePanelClient().search(queryParams);
@@ -239,8 +239,8 @@ private RestResponse acl() throws Exception {
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("member", commandOptions.member);
queryParams.putIfNotNull("silent", commandOptions.silent);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getDiseasePanelClient().acl(commandOptions.panels, queryParams);
@@ -254,8 +254,8 @@ private RestResponse delete() throws Exception {
ObjectMap queryParams = new ObjectMap();
queryParams.putIfNotEmpty("study", commandOptions.study);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getDiseasePanelClient().delete(commandOptions.panels, queryParams);
@@ -273,8 +273,8 @@ private RestResponse info() throws Exception {
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotEmpty("version", commandOptions.version);
queryParams.putIfNotNull("deleted", commandOptions.deleted);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
return openCGAClient.getDiseasePanelClient().info(commandOptions.panels, queryParams);
@@ -292,13 +292,13 @@ private RestResponse update() throws Exception {
queryParams.putIfNotEmpty("study", commandOptions.study);
queryParams.putIfNotNull("incVersion", commandOptions.incVersion);
queryParams.putIfNotNull("includeResult", commandOptions.includeResult);
- if(queryParams.get("study")==null && OpencgaMain.isShellMode()){
- queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
+ if (queryParams.get("study") == null && OpencgaMain.isShellMode()) {
+ queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy());
}
PanelUpdateParams panelUpdateParams = new PanelUpdateParams();
- if (commandOptions.jsonViewTemplate) {
+ if (commandOptions.jsonDataModel) {
RestResponse res = new RestResponse<>();
res.setType(QueryType.VOID);
PrintUtils.println(getObjectAsJSON(panelUpdateParams));
diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java
index 0aadcec4e8e..820d8b30a7e 100644
--- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java
+++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java
@@ -36,7 +36,7 @@
* WARNING: AUTOGENERATED CODE
*
* This code was generated by a tool.
-* Autogenerated on: 2022-03-15
+* Autogenerated on: 2022-03-25
*
* 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.
@@ -45,7 +45,7 @@
/**
* This class contains methods for the Families command line.
- * OpenCGA version: 2.2.0-rc2-SNAPSHOT
+ * OpenCGA version: 2.2.0-SNAPSHOT
* PATH: /{apiVersion}/families
*/
public class FamiliesCommandExecutor extends OpencgaCommandExecutor {
@@ -97,6 +97,9 @@ public void execute() throws Exception {
case "update":
queryResponse = update();
break;
+ case "annotationsets-annotations-update":
+ queryResponse = updateAnnotationSetsAnnotations();
+ break;
default:
logger.error("Subcommand not valid");
break;
@@ -115,13 +118,13 @@ private RestResponse