Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EEH-2506 - Modified "phenotypes" and "diseases" arrays #64

Merged
merged 3 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions examples/json_validation_tests/individual_valid-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,38 @@
"biologicalSex": "male",
"diseases": [
{
"termId": "EFO:0003101",
"termLabel": "testicular seminoma"
"excluded": true,
"disease": {
"termId": "EFO:0003101",
"termLabel": "testicular seminoma"
}
},
{
"termId": "EFO:1000254",
"termLabel": "fibroadenoma"
"excluded": true,
"disease": {
"termId": "MONDO:0019808",
"termLabel": "aortic valve atresia"
}
},
{
"disease": {
"termId": "EFO:1000254",
"termLabel": "fibroadenoma"
}
},
{
"disease": {
"termId": "Orphanet:610",
"termLabel": "Bethlem myopathy"
}
}
],
"phenotypes": [
"phenotypicAbnormalities": [
{
"termId": "HP:0033403",
"termLabel": "Testicular ischemia"
"phenotypicAbnormality": {
"termId": "HP:0033403",
"termLabel": "Testicular ischemia"
}
}
],
"subjectId": "donor-NM305004"
Expand Down
32 changes: 21 additions & 11 deletions examples/json_validation_tests/object-set_Covid19.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,35 @@
"biologicalSex": "male",
"diseases": [
{
"termId": "MONDO:0100096",
"termLabel": "COVID-19"
"disease": {
"termId": "MONDO:0100096",
"termLabel": "COVID-19"
}
},
{
"termId": "EFO:0000400",
"termLabel": "Diabetes Mellitus"
"disease": {
"termId": "EFO:0000400",
"termLabel": "Diabetes Mellitus"
}
},
{
"termId": "EFO:0000318",
"termLabel": "Cardiomyopathy"
"disease": {
"termId": "EFO:0000318",
"termLabel": "Cardiomyopathy"
}
},
{
"termId": "EFO:0009909",
"termLabel": "Chronic Kidney Disease"
"disease": {
"termId": "EFO:0009909",
"termLabel": "Chronic Kidney Disease"
}
},
{
"termId": "EFO:0001073",
"termLabel": "Obesity"
}
"disease": {
"termId": "EFO:0001073",
"termLabel": "Obesity"
}
}
]
},
"organismDescriptor": {
Expand Down
44 changes: 28 additions & 16 deletions examples/json_validation_tests/object-set_RareDisease.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,39 @@
"minimalPublicAttributes": {
"subjectId": "Affected_proband_14y",
"biologicalSex": "male",
"phenotypes": [
"phenotypicAbnormalities": [
{
"termId": "HP:0001558",
"termLabel": "Decreased fetal movement"
"phenotypicAbnormality": {
"termId": "HP:0001558",
"termLabel": "Decreased fetal movement"
}
},
{
"termId": "HP:0031910",
"termLabel": "Abnormal cranial nerve physiology"
"phenotypicAbnormality": {
"termId": "HP:0031910",
"termLabel": "Abnormal cranial nerve physiology"
}
},
{
"termId": "HP:0012587",
"termLabel": "Macroscopic hematuria"
"phenotypicAbnormality": {
"termId": "HP:0012587",
"termLabel": "Macroscopic hematuria"
}
},
{
"termId": "HP:0001270",
"termLabel": "Motor delay"
}
"phenotypicAbnormality": {
"termId": "HP:0001270",
"termLabel": "Motor delay"
}
}
],
"diseases": [
{
"termId": "MONDO:0008029",
"termLabel": "Bethlem myopathy"
}
"disease": {
"termId": "MONDO:0008029",
"termLabel": "Bethlem myopathy"
}
}
]
},
"organismDescriptor": {
Expand Down Expand Up @@ -82,10 +92,12 @@
"minimalPublicAttributes": {
"subjectId": "Unaffected mother",
"biologicalSex": "female",
"phenotypes": [
"phenotypicAbnormalities": [
{
"termId": "NCIT:C94232",
"termLabel": "Unaffected"
"phenotypicAbnormality": {
"termId": "NCIT:C94232",
"termLabel": "Unaffected"
}
}
]
},
Expand Down
22 changes: 21 additions & 1 deletion schemas/EGA.common-definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3799,7 +3799,7 @@
"title": "Ontology constraints for this specific termId",
"anyOf": [
{
"title": "Ontology validation of diseases",
"title": "Ontology validation of 'disease' - EFO",
"graphRestriction": {
"ontologies" : ["obo:efo"],
"classes": ["EFO:0000408"],
Expand All @@ -3808,6 +3808,26 @@
"include_self": false
}
},
{
"title": "Ontology validation of 'disease' - ORDO",
"graphRestriction": {
"ontologies" : ["obo:ordo"],
"classes": ["Orphanet:377788"],
"relations": ["rdfs:subClassOf"],
"direct": false,
"include_self": false
}
},
{
"title": "Ontology validation of 'human disease or disorder' - MONDO",
"graphRestriction": {
"ontologies" : ["obo:mondo"],
"classes": ["MONDO:0700096"],
"relations": ["rdfs:subClassOf"],
"direct": false,
"include_self": false
}
},
{
"title": "In case the phenotypic abnormality is unknown or there is none",
"enum": ["NCIT:C17998", "NCIT:C94232"],
Expand Down
36 changes: 33 additions & 3 deletions schemas/EGA.individual.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,29 @@
"biologicalSex": {
"$ref": "./EGA.common-definitions.json#/definitions/biologicalSex"
},
"phenotypes": {
"phenotypicAbnormalities": {
"type": "array",
"title": "Array of phenotypic abnormalities",
"minItems": 1,
"additionalProperties": false,
"uniqueItems": true,
"items": {
"$ref": "./EGA.common-definitions.json#/definitions/phenotypicAbnormality"
"type": "object",
"title": "Phenotypic abnormality item",
"description": "One individual Phenotypic abnormality of the array. Keep in mind that in order to correctly interprete the phenotype it is **imperative** to check the 'excluded' property: each item of the array can be either specifying that the phenotipic abnormality was present or the opposite (i.e. logical negation).",
"additionalProperties": false,
"required": [ "phenotypicAbnormality" ],
"properties": {
"excluded": {
"type": "boolean",
"title": "Excluded",
"description": "Property that specifies whether the phenotype was observed or not. Similar to phenopacket's 'excluded' property, by default it is 'false', which means that the phenotype was observed (i.e. not excluded). This flag is only required to indicate that the phenotype was looked for, but found to be absent. The terms 'not excluded' (i.e. false) and 'excluded' (i.e. true) correlate with the common notation of 'case' versus 'control', respectively.",
"default": false
},
"phenotypicAbnormality": {
"$ref": "./EGA.common-definitions.json#/definitions/phenotypicAbnormality"
}
}
}
},
"diseases": {
Expand All @@ -69,7 +84,22 @@
"additionalProperties": false,
"uniqueItems": true,
"items": {
"$ref": "./EGA.common-definitions.json#/definitions/disease"
"type": "object",
"title": "Disease item",
"description": "One individual disease of the array. Keep in mind that in order to correctly interprete the disease it is **imperative** to check the 'excluded' property: each item of the array can be either specifying that the disease was present or the opposite (i.e. logical negation).",
"additionalProperties": false,
"required": [ "disease" ],
"properties": {
"excluded": {
"type": "boolean",
"title": "Excluded",
"description": "Property that specifies whether the disease was observed or not. Similar to phenopacket's 'excluded' property, by default it is 'false', which means that the disease was observed (i.e. not excluded). This flag is only required to indicate that the disease was looked for, but found to be absent. The terms 'not excluded' (i.e. false) and 'excluded' (i.e. true) correlate with the common notation of 'case' versus 'control', respectively.",
"default": false
},
"disease": {
"$ref": "./EGA.common-definitions.json#/definitions/disease"
}
}
}
}
},
Expand Down