diff --git a/docs/data-models/clinicalanalysis.md b/docs/data-models/clinicalanalysis.md index c40ca026033..ef6436df6ef 100644 --- a/docs/data-models/clinicalanalysis.md +++ b/docs/data-models/clinicalanalysis.md @@ -69,29 +69,37 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1 | **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**
*Status*
|

Object status.

| -### 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). +### 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 | | :--- | :--- | -| **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.

| +| **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

| -### 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). +### 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 | | :--- | :--- | -| **studyUid**
*long*
|

Study identifier.

| -| **uid**
*long*
|

Interpretation identifier.

| -| **panels**
*List<Panel>*
|

Interpretation panel list.

| -| **internal**
*[InterpretationInternal](https://docs.opencga.opencb.org/data-models/clinicalanalysis#interpretationinternal)*
|

Internal field for manage the object.

| +| **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.

| + +### ClinicalAnalysisInternal +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/ClinicalAnalysisInternal.java). + +| Field | Description | +| :--- | :--- | +| **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.

| ### FlagAnnotation 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/FlagAnnotation.java). @@ -102,41 +110,49 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1 | **description**
*String*
|

Users may provide a description for the entry.

| | **date**
*String*
|

FlagAnnotation date.

| -### 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). +### 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). | Field | Description | | :--- | :--- | -| **consents**
*List<ClinicalConsentParam>*
|

List of ClinicalConsentParam.

| -| **date**
*String*
|

Date of the ClinicalConsentAnnotation.

| +| **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

| -### ClinicalAnalysisInternal -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/ClinicalAnalysisInternal.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**
*[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.

| -### 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). +### ClinicalAnalyst +You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/ClinicalAnalyst.java). | Field | Description | | :--- | :--- | -| **summary**
*QualityControlSummary*
|

ClinicalAnalysisQualityControl summary that can have the values HIGH, MEDIUM, LOW, DISCARD, NEEDS_REVIEW, UNKNOWN.

| -| **comments**
*List<ClinicalComment>*
|

List of ClinicalAnalysisQualityControl comments.

| -| **comments**
*List<String>*
|

List of ClinicalAnalysisQualityControl files.

| +| **id**
*String*
|

Id to identify the object

| +| **name**
*String*
|

Object name

| +| **email**
*String*
|

Email of the analyst

| +| **assignedBy**
*String*
|

Assigned by field

| +| **date**
*String*
|

Date of the clinical analyst

| -### 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). +### 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 | | :--- | :--- | -| **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

| +| **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.

| +| **rank**
*int*
|

ClinicalPriorityAnnotation rank.

| +| **date**
*String*
|

ClinicalPriorityAnnotation date.

| ### 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). @@ -150,53 +166,43 @@ 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..

| -### 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). +### 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 | | :--- | :--- | -| **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.

| -| **rank**
*int*
|

ClinicalPriorityAnnotation rank.

| -| **date**
*String*
|

ClinicalPriorityAnnotation date.

| +| **summary**
*QualityControlSummary*
|

ClinicalAnalysisQualityControl summary that can have the values HIGH, MEDIUM, LOW, DISCARD, NEEDS_REVIEW, UNKNOWN.

| +| **comments**
*List<ClinicalComment>*
|

List of ClinicalAnalysisQualityControl comments.

| +| **comments**
*List<String>*
|

List of ClinicalAnalysisQualityControl files.

| -### 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). +### 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). | Field | Description | | :--- | :--- | -| **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

| +| **consents**
*List<ClinicalConsentParam>*
|

List of ClinicalConsentParam.

| +| **date**
*String*
|

Date of the ClinicalConsentAnnotation.

| -### 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). +### 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). | Field | Description | | :--- | :--- | -| **uuid**
*String*
|

Unique 32-character identifier assigned automatically by OpenCGA.

| +| **studyUid**
*long*
|

Study identifier.

| +| **uid**
*long*
|

Interpretation identifier.

| +| **panels**
*List<Panel>*
|

Interpretation panel list.

| +| **internal**
*[InterpretationInternal](https://docs.opencga.opencb.org/data-models/clinicalanalysis#interpretationinternal)*
|

Internal field for manage the object.

| | **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.

| -### ClinicalAnalyst -You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/ClinicalAnalyst.java). +### 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). | Field | Description | | :--- | :--- | -| **id**
*String*
|

Id to identify the object

| -| **name**
*String*
|

Object name

| -| **email**
*String*
|

Email of the analyst

| -| **assignedBy**
*String*
|

Assigned by field

| -| **date**
*String*
|

Date of the clinical analyst

| - -### 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*
|

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.

| +| **value**
*Value*
|

Value of the param that can have the values YES, NO and UNKNOWN.

| ### 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). @@ -208,15 +214,9 @@ 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.

| -### 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). +### 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). -| 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.

| -| **value**
*Value*
|

Value of the param that can have the values YES, NO and UNKNOWN.

| ### 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 69ca95f6e7a..a49510610fd 100644 --- a/docs/data-models/family.md +++ b/docs/data-models/family.md @@ -47,9 +47,19 @@ 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.

| -### 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). +### 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..

| ### 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). @@ -60,40 +70,40 @@ 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.

| -### 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). +### 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 | | :--- | :--- | -| **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..

| +| **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). +### 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 | | :--- | :--- | | **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..

| -### 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). +### 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). + + +### 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 | | :--- | :--- | -| **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.

| +| **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

| ### 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). @@ -104,13 +114,3 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop | **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). - -| Field | Description | -| :--- | :--- | -| **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

| diff --git a/docs/data-models/file.md b/docs/data-models/file.md index 9989da6c79e..210dbbc086f 100644 --- a/docs/data-models/file.md +++ b/docs/data-models/file.md @@ -65,16 +65,36 @@ 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.

| +### 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). -### 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). +### Software +You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/interpretation/Software.java). + +| Field | Description | +| :--- | :--- | +| **name**
*String*
|

Software name

| +| **version**
*String*
|

Software version

| +| **repository**
*String*
|

Software repository

| +| **commit**
*String*
|

Software commit

| +| **website**
*String*
|

Software website

| +| **params**
*Map*
|

Software params

| +### 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). + +### 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). ### FileInternal @@ -91,28 +111,8 @@ 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.

| -### 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). - - -### Software -You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/clinical/interpretation/Software.java). - -| Field | Description | -| :--- | :--- | -| **name**
*String*
|

Software name

| -| **version**
*String*
|

Software version

| -| **repository**
*String*
|

Software repository

| -| **commit**
*String*
|

Software commit

| -| **website**
*String*
|

Software website

| -| **params**
*Map*
|

Software params

| - -### 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). ### MissingSamples @@ -123,10 +123,10 @@ 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.

| -### 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). +### 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 de0bdf82be1..651dc986e3b 100644 --- a/docs/data-models/individual.md +++ b/docs/data-models/individual.md @@ -63,19 +63,8 @@ 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.

| -### 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.

| - -### 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). +### 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 | | :--- | :--- | @@ -86,29 +75,42 @@ 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..

| -### 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). +### 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 | | :--- | :--- | -| **address**
*String*
|

Location address.

| -| **postalCode**
*String*
|

Location postal code.

| -| **city**
*String*
|

Location city.

| -| **state**
*String*
|

Location state.

| -| **country**
*String*
|

Location country.

| +| **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.

| -### 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). +### 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). + +| Field | Description | +| :--- | :--- | +| **name**
*String*
|

Name of the individual population.

| +| **subpopulation**
*String*
|

Subpopulation of the individual population.

| +| **description**
*String*
|

Description of the individual population.

| + +### 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). @@ -121,51 +123,43 @@ 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..

| -### 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). +### 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 | | :--- | :--- | -| **name**
*String*
|

Name of the individual population.

| -| **subpopulation**
*String*
|

Subpopulation of the individual population.

| -| **description**
*String*
|

Description of the individual population.

| +| **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). +### 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..

| -### 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). - - -### 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.

| -### 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). +### InferredSexReport +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). -| Field | Description | -| :--- | :--- | -| **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

| ### 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). @@ -175,6 +169,12 @@ 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/SampleRelatednessReport.java). -### InferredSexReport -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). +### 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*
|

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

| diff --git a/docs/data-models/job.md b/docs/data-models/job.md index c08dc5ad6dc..b4e700044d3 100644 --- a/docs/data-models/job.md +++ b/docs/data-models/job.md @@ -59,28 +59,24 @@ 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.

| -### 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). +### ToolInfo +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/ToolInfo.java). | Field | Description | | :--- | :--- | | **id**
*String*
|

Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.

| -| **others**
*List<String>*
|

List of strings.

| +| **description**
*String*
|

Users may provide a description for the entry.

| +| **scope**
*Scope*
|

Tool info scope can have the values GLOBAL, PROJECT and STUDY.

| +| **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.

| -### 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). +### 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). | Field | Description | | :--- | :--- | | **id**
*String*
|

Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.

| -| **executor**
*[ExecutorInfo](https://docs.opencga.opencb.org/data-models/job#executorinfo)*
|

Object describes execution information.

| -| **start**
*[Date](https://docs.opencga.opencb.org/data-models/job#date)*
|

Date the execution started.

| -| **end**
*[Date](https://docs.opencga.opencb.org/data-models/job#date)*
|

Date the execution was completed.

| -| **status**
*[Status](https://docs.opencga.opencb.org/data-models/job#status)*
|

Executor status can have the values PENDING, RUNNING, DONE and ERROR.

| -| **externalFiles**
*List<URI>*
|

List of uris to the external files.

| -| **steps**
*List<ToolStep>*
|

List of ToolStep.

| -| **events**
*List<Event>*
|

List of Event.

| -| **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.

| +| **others**
*List<String>*
|

List of strings.

| ### 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). @@ -94,27 +90,38 @@ 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.

| -### ToolInfo -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/ToolInfo.java). +### 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). | 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.

| -| **scope**
*Scope*
|

Tool info scope can have the values GLOBAL, PROJECT and STUDY.

| -| **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.

| +| **executor**
*[ExecutorInfo](https://docs.opencga.opencb.org/data-models/job#executorinfo)*
|

Object describes execution information.

| +| **start**
*[Date](https://docs.opencga.opencb.org/data-models/job#date)*
|

Date the execution started.

| +| **end**
*[Date](https://docs.opencga.opencb.org/data-models/job#date)*
|

Date the execution was completed.

| +| **status**
*[Status](https://docs.opencga.opencb.org/data-models/job#status)*
|

Executor status can have the values PENDING, RUNNING, DONE and ERROR.

| +| **externalFiles**
*List<URI>*
|

List of uris to the external files.

| +| **steps**
*List<ToolStep>*
|

List of ToolStep.

| +| **events**
*List<Event>*
|

List of Event.

| +| **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.

| -### 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). +### ExecutorInfo +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/ExecutorInfo.java). +| Field | Description | +| :--- | :--- | +| **id**
*String*
|

Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.

| +| **clazz**
*String*
|

ExecutorInfo class.

| +| **params**
*ObjectMap*
|

ExecutorInfo params.

| +| **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.

| -### 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). -### 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). +### 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 @@ -136,20 +143,13 @@ 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.

| -### 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). -### ExecutorInfo -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/ExecutorInfo.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). -| Field | Description | -| :--- | :--- | -| **id**
*String*
|

Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.

| -| **clazz**
*String*
|

ExecutorInfo class.

| -| **params**
*ObjectMap*
|

ExecutorInfo params.

| -| **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.

| ### 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 4d291e0ad2d..b27571132ee 100644 --- a/docs/data-models/project.md +++ b/docs/data-models/project.md @@ -37,6 +37,10 @@ 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). @@ -48,10 +52,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.

| -### 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 9a3bbcf7a5f..a93b3a0631b 100644 --- a/docs/data-models/sample.md +++ b/docs/data-models/sample.md @@ -51,17 +51,23 @@ 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). +### 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). + + +### 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 | | :--- | :--- | -| **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.

| +| **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..

| ### 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). @@ -73,6 +79,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.

| +### 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). + +| Field | Description | +| :--- | :--- | +| **id**
*String*
|

Source ID...

| +| **name**
*String*
|

Source name...

| +| **description**
*String*
|

Source description...

| +| **source**
*String*
|

Source ...

| +| **url**
*String*
|

Source ID

| + ### 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). @@ -82,16 +99,17 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1 | **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.

| -### 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). +### 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 | | :--- | :--- | -| **id**
*String*
|

Source ID...

| -| **name**
*String*
|

Source name...

| -| **description**
*String*
|

Source description...

| -| **source**
*String*
|

Source ...

| -| **url**
*String*
|

Source ID

| +| **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). @@ -106,23 +124,13 @@ 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). - - -### 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). +### 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). | 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..

| +| **status**
*Status*
|

Status of the Rga index NOT_INDEXED, INDEXED, INVALID_PERMISSIONS, INVALID_METADATA, INVALID.

| +| **date**
*String*
|

Date of Rga index.

| ### 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). @@ -156,13 +164,18 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1 | **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.

| -### 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). +### 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 | | :--- | :--- | -| **status**
*Status*
|

Status of the Rga index NOT_INDEXED, INDEXED, INVALID_PERMISSIONS, INVALID_METADATA, INVALID.

| -| **date**
*String*
|

Date of Rga index.

| +| **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

| ### SampleQcVariantStats 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/SampleQcVariantStats.java). @@ -175,19 +188,6 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop | **stats**
*SampleVariantStats*
|

Stats result set

| | **sampleId**
*String*
|

Stats result set

| -### 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 | -| :--- | :--- | -| **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

| - ### 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 +198,17 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop | **config**
*[GenomePlotConfig](https://docs.opencga.opencb.org/data-models/sample#genomeplotconfig)*
|

Config of the genomePlot

| | **file**
*String*
|

File of the genomePlot

| -### 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). +### 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). | 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

| +| **method**
*String*
|

Method used to fit the signature

| +| **signatureSource**
*String*
|

Source of the fitting signature

| +| **signatureVersion**
*String*
|

Signature version of the fitting signature

| +| **scores**
*List<Score>*
|

Scores of the fitting signature

| +| **coeff**
*double*
|

Coefficient of the fitting signature

| +| **file**
*String*
|

Files of the fitting signature

| ### 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). @@ -216,17 +218,15 @@ You can find the Java code [here](https://github.com/opencb/biodata/tree/develop | **context**
*String*
|

Genome context to count

| | **total**
*int*
|

Counted integer

| -### 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). +### 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 | | :--- | :--- | -| **method**
*String*
|

Method used to fit the signature

| -| **signatureSource**
*String*
|

Source of the fitting signature

| -| **signatureVersion**
*String*
|

Signature version of the fitting signature

| -| **scores**
*List<Score>*
|

Scores of the fitting signature

| -| **coeff**
*double*
|

Coefficient of the fitting signature

| -| **file**
*String*
|

Files of the fitting signature

| +| **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

| ### GenomePlotTrack 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/GenomePlotTrack.java). diff --git a/docs/data-models/study.md b/docs/data-models/study.md index 25983981a9a..aa541806238 100644 --- a/docs/data-models/study.md +++ b/docs/data-models/study.md @@ -71,39 +71,21 @@ 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.

| -### 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). - - -### 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). +### StudyNotification +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/StudyNotification.java). | Field | Description | | :--- | :--- | -| **status**
*[Status](https://docs.opencga.opencb.org/data-models/study#status)*
|

Object status.

| -| **index**
*[StudyIndex](https://docs.opencga.opencb.org/data-models/study#studyindex)*
|

Study index.

| -| **configuration**
*StudyConfiguration*
|

Study configuration.

| -| **status**
*[Status](https://docs.opencga.opencb.org/data-models/study#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.

| +| **webhook**
*[URL](https://docs.opencga.opencb.org/data-models/study#url)*
|

Url of the study notification.

| -### 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). +### 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 | -| :--- | :--- | -| **id**
*String*
|

Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.

| -| **query**
*Query*
|

PermissionRule query.

| -| **members**
*List<String>*
|

List of members of the permission rule.

| -| **permissions**
*List<String>*
|

List of permissions of the permission rule.

| -### 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). +### 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). -| 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). @@ -118,10 +100,28 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1 | **studyUid**
*long*
|

Panel reference to study.

| | **uid**
*long*
|

Panel reference to study.

| -### 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). +### 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). + +| Field | Description | +| :--- | :--- | +| **status**
*[Status](https://docs.opencga.opencb.org/data-models/study#status)*
|

Object status.

| +| **index**
*[StudyIndex](https://docs.opencga.opencb.org/data-models/study#studyindex)*
|

Study index.

| +| **configuration**
*StudyConfiguration*
|

Study configuration.

| +| **status**
*[Status](https://docs.opencga.opencb.org/data-models/study#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.

| + +### 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). +| Field | Description | +| :--- | :--- | +| **id**
*String*
|

Source ID...

| +| **name**
*String*
|

Source name...

| +| **description**
*String*
|

Source description...

| +| **source**
*String*
|

Source ...

| +| **url**
*String*
|

Source ID

| ### 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). @@ -138,36 +138,36 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1 | **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.

| -### 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). +### 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*
|

Source ID...

| -| **name**
*String*
|

Source name...

| -| **description**
*String*
|

Source description...

| -| **source**
*String*
|

Source ...

| -| **url**
*String*
|

Source ID

| +| **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.

| -### StudyNotification -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/StudyNotification.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). -| Field | Description | -| :--- | :--- | -| **webhook**
*[URL](https://docs.opencga.opencb.org/data-models/study#url)*
|

Url of the study notification.

| ### 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). -### 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). - - -### 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). +### 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). +| Field | Description | +| :--- | :--- | +| **id**
*String*
|

Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.

| +| **query**
*Query*
|

PermissionRule query.

| +| **members**
*List<String>*
|

List of members of the permission rule.

| +| **permissions**
*List<String>*
|

List of permissions of the permission rule.

| ### 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 baa64174192..93b6dbb1293 100644 --- a/docs/data-models/user.md +++ b/docs/data-models/user.md @@ -37,18 +37,8 @@ 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.

| -### 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). - -| Field | Description | -| :--- | :--- | -| **type**
*AccountType*
|

User account type can have the values GUEST, FULL and ADMINISTRATOR.

| -| **creationDate**
*String*
|

Autogenerated date following the format YYYYMMDDhhmmss containing the date when the entry was first registered.

| -| **expirationDate**
*String*
|

Date the account expires.

| -| **authentication**
*[AuthenticationOrigin](https://docs.opencga.opencb.org/data-models/user#authenticationorigin)*
|

How the account is authenticated

| - -### 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). ### UserFilter @@ -62,8 +52,18 @@ You can find the Java code [here](https://github.com/opencb/opencga/tree/issue-1 | **query**
*Query*
|

User filter query

| | **query**
*QueryOptions*
|

User filter query options

| -### 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). +### 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). + +| Field | Description | +| :--- | :--- | +| **type**
*AccountType*
|

User account type can have the values GUEST, FULL and ADMINISTRATOR.

| +| **creationDate**
*String*
|

Autogenerated date following the format YYYYMMDDhhmmss containing the date when the entry was first registered.

| +| **expirationDate**
*String*
|

Date the account expires.

| +| **authentication**
*[AuthenticationOrigin](https://docs.opencga.opencb.org/data-models/user#authenticationorigin)*
|

How the account is authenticated

| + +### 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). ### AuthenticationOrigin 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 26c167b64af..3601e477884 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 @@ -37,7 +37,7 @@ * 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-SNAPSHOT -* Command line commit: 30999663dad10beecad1dec77aed13ce463a9c5e +* Command line commit: 702f60984784cc9075007a64edfda00abac966fb */ public abstract class OpenCgaCompleter implements Completer { 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 7b917bb4cfc..dce18b92a6f 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 @@ -31,7 +31,7 @@ * 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-SNAPSHOT -* Command line commit: 30999663dad10beecad1dec77aed13ce463a9c5e +* Command line commit: 702f60984784cc9075007a64edfda00abac966fb */ public class OpencgaCliOptionsParser extends ParentCliOptionsParser { 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 8dddff6b3f5..7c7aade464a 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 @@ -39,6 +39,7 @@ public class OpencgaMain { public static Level logLevel = Level.OFF; public static void main(String[] args) { + if (args.length == 0) { CliOptionsParser parser = new OpencgaCliOptionsParser(); parser.printUsage(); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/parent/ParentUsersCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/parent/ParentUsersCommandExecutor.java index 2eebc19d3b6..f022dd7ed26 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/parent/ParentUsersCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/parent/ParentUsersCommandExecutor.java @@ -68,7 +68,9 @@ protected RestResponse login() throws Exception { event.setType(Event.Type.ERROR); res.setType(QueryType.VOID); res.getEvents().add(event); + return res; } + CommandLineUtils.debug("Login token ::: " + getSessionManager().getSession().getToken()); if (response != null) { List studies = new ArrayList<>(); CommandLineUtils.debug(response.toString()); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/parent/ParentUsersCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/parent/ParentUsersCommandOptions.java index ce5c04094aa..6a17e4f9451 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/parent/ParentUsersCommandOptions.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/parent/ParentUsersCommandOptions.java @@ -51,7 +51,7 @@ public class LoginCommandOptions { @Parameter(names = {"-u", "--user"}, description = "User id, this must be unique in OpenCGA", required = true, arity = 1) public String user; - @Parameter(names = {"-p", "--password"}, description = "User password", arity = 0, required = true, password = true, hidden = true) + @Parameter(names = {"-p", "--password"}, description = "User password", arity = 0, required = true, password = true) public String password; @Parameter(names = {"--refresh-token"}, description = "The body web service refreshToken parameter", arity = 1) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/utils/LoginUtils.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/utils/LoginUtils.java index 384e0964b42..4b7fbca11f5 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/utils/LoginUtils.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/utils/LoginUtils.java @@ -3,6 +3,10 @@ import org.apache.commons.lang3.ArrayUtils; import org.opencb.commons.utils.PrintUtils; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + import static org.opencb.commons.utils.PrintUtils.*; public class LoginUtils { @@ -14,14 +18,28 @@ public static String[] forceLogin(String[] args) { } public static String[] loginUser(String[] args, String user) { - char[] passwordArray = System.console().readPassword(format("\nEnter your password: ", PrintUtils.Color.GREEN)); + String password = ""; + if (System.console() != null) { + char[] passwordArray = System.console().readPassword(format("\nEnter your password: ", PrintUtils.Color.GREEN)); + password = new String(passwordArray).trim(); + } else { + BufferedReader reader = new BufferedReader(new InputStreamReader( + System.in)); + try { + password = reader.readLine(); + } catch (IOException e) { + e.printStackTrace(); + } + CommandLineUtils.debug("Console null "); + } if (CommandLineUtils.isValidUser(user)) { args = ArrayUtils.addAll(args, "-u", user); - args = ArrayUtils.addAll(args, "--password", new String(passwordArray).trim()); + args = ArrayUtils.addAll(args, "--password", password); CommandLineUtils.debug(ArrayUtils.toString(args)); } else { println(PrintUtils.format("Invalid user name: ", Color.RED) + PrintUtils.format(user, Color.DEFAULT)); } + return args; } @@ -30,6 +48,16 @@ public static String[] parseLoginCommand(String[] args) { //adds in position 0 command "users" args = ArrayUtils.addAll(new String[]{"users"}, args); + CommandLineUtils.debug("LOGIN COMMAND: " + ArrayUtils.toString(args)); + /*if (args.length == 5 && "login".equals(args[1]) && "<<<".equals(args[3])) { + String user = args[2]; + String pass = args[4]; + args = new String[]{"users", "login"}; + args = ArrayUtils.addAll(args, "-u", user); + args = ArrayUtils.addAll(args, "--password", pass); + return args; + }*/ + //case opencga.sh login OR [opencga][demo@project:study]login if (args.length == 2 && "login".equals(args[1])) { return forceLogin(args);