-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] Add validators for BIDS-Neurobagel categorical column levels al…
…ignment (#160) * add example with json missing BIDS 'Levels' attr * add new example12 to e2e bagel pheno test * add basic util + smoke test for checking presence of BIDS levels * expand warning for missing bids levels * add example with BIDS-Neurobagel mismatched levels * add validator util + test that BIDS/Neurobagel categorical levels mismatch raises warning --------- Co-authored-by: Alyssa Dai <[email protected]> Co-authored-by: Sebastian Urchs <[email protected]>
- Loading branch information
Showing
7 changed files
with
334 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"participant_id": { | ||
"Description": "A participant ID", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:ParticipantID", | ||
"Label": "Unique participant identifier" | ||
} | ||
} | ||
}, | ||
"session_id": { | ||
"Description": "A session ID", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:SessionID", | ||
"Label": "Unique session identifier" | ||
} | ||
} | ||
}, | ||
"group": { | ||
"Description": "Group variable", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:Diagnosis", | ||
"Label": "Diagnosis" | ||
}, | ||
"Levels": { | ||
"PAT": { | ||
"TermURL": "snomed:49049000", | ||
"Label": "Parkinson's disease" | ||
}, | ||
"CTRL": { | ||
"TermURL": "purl:NCIT_C94342", | ||
"Label": "Healthy Control" | ||
} | ||
} | ||
} | ||
}, | ||
"sex": { | ||
"Description": "Sex variable", | ||
"Levels": { | ||
"M": "Male", | ||
"F": "Female" | ||
}, | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:Sex", | ||
"Label": "Sex" | ||
}, | ||
"Levels": { | ||
"M": { | ||
"TermURL": "snomed:248153007", | ||
"Label": "Male" | ||
}, | ||
"F": { | ||
"TermURL": "snomed:248152002", | ||
"Label": "Female" | ||
} | ||
} | ||
} | ||
}, | ||
"participant_age": { | ||
"Description": "Age of the participant", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:Age", | ||
"Label": "Chronological age" | ||
}, | ||
"Transformation": { | ||
"TermURL": "nb:iso8601", | ||
"Label": "A period of time defined according to the ISO8601 standard" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
participant_id session_id group sex participant_age | ||
sub-01 ses-01 PAT M "P20Y6M" | ||
sub-01 ses-02 PAT M "P20Y8M" | ||
sub-02 ses-01 CTRL F "P25Y8M" | ||
sub-02 ses-02 CTRL F "P26Y4M" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
{ | ||
"participant_id": { | ||
"Description": "A participant ID", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:ParticipantID", | ||
"Label": "Unique participant identifier" | ||
} | ||
} | ||
}, | ||
"session_id": { | ||
"Description": "A session ID", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:SessionID", | ||
"Label": "Unique session identifier" | ||
} | ||
} | ||
}, | ||
"pheno_age": { | ||
"Description": "Age of the participant", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:Age", | ||
"Label": "Chronological age" | ||
}, | ||
"Transformation": { | ||
"TermURL": "nb:euro", | ||
"Label": "writing the time with a comma - why not" | ||
}, | ||
"MissingValues": ["NA"] | ||
} | ||
}, | ||
"pheno_sex": { | ||
"Description": "Sex variable", | ||
"Levels": { | ||
"M": "Male", | ||
"F": "Female", | ||
"missing": "Missing sex", | ||
"O": "Other unimportant level" | ||
}, | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:Sex", | ||
"Label": "Sex" | ||
}, | ||
"Levels": { | ||
"M": { | ||
"TermURL": "snomed:248153007", | ||
"Label": "Male" | ||
}, | ||
"F": { | ||
"TermURL": "snomed:248152002", | ||
"Label": "Female" | ||
} | ||
}, | ||
"MissingValues": ["missing"] | ||
} | ||
}, | ||
|
||
"pheno_group": { | ||
"Description": "Group variable", | ||
"Levels": { | ||
"PAT": "Patient", | ||
"CTRL": "Control subject", | ||
"NA": "Missing group" | ||
}, | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:Diagnosis", | ||
"Label": "Diagnosis" | ||
}, | ||
"Levels": { | ||
"PAT": { | ||
"TermURL": "snomed:49049000", | ||
"Label": "Parkinson's disease" | ||
}, | ||
"CTRL": { | ||
"TermURL": "purl:NCIT_C94342", | ||
"Label": "Healthy Control" | ||
} | ||
}, | ||
"MissingValues": ["NA"] | ||
} | ||
}, | ||
"tool1_item1": { | ||
"Description": "item 1 scores for tool1", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:Assessment", | ||
"Label": "Assessment tool" | ||
}, | ||
"IsPartOf": { | ||
"TermURL": "cogatlas:1234", | ||
"Label": "Imaginary tool" | ||
}, | ||
"MissingValues": ["missing"] | ||
} | ||
}, | ||
"tool1_item2": { | ||
"Description": "item 2 scores for tool1", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:Assessment", | ||
"Label": "Assessment tool" | ||
}, | ||
"IsPartOf": { | ||
"TermURL": "cogatlas:1234", | ||
"Label": "Imaginary tool" | ||
}, | ||
"MissingValues": ["missing"] | ||
} | ||
}, | ||
"tool2_item1": { | ||
"Description": "item 1 scores for tool2", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:Assessment", | ||
"Label": "Assessment tool" | ||
}, | ||
"IsPartOf": { | ||
"TermURL": "cogatlas:4321", | ||
"Label": "A different imaginary tool" | ||
}, | ||
"MissingValues": ["not completed"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
participant_id session_id pheno_age pheno_sex pheno_group tool1_item1 tool1_item2 tool2_item1 | ||
sub-01 ses-01 34,1 F CTRL good far hello | ||
sub-01 ses-02 35,3 F CTRL bad near world | ||
sub-02 ses-01 NA M PAT ok missing hello | ||
sub-02 ses-02 39,0 M PAT good middle friends | ||
sub-03 ses-01 22,1 missing NA bad near not completed | ||
sub-03 ses-02 23,2 missing PAT ok far hello | ||
sub-04 ses-01 21,1 F CTRL missing missing hello | ||
sub-04 ses-02 22,3 F CTRL good middle friends | ||
sub-05 ses-01 42,5 M PAT bad near friends | ||
sub-05 ses-02 43,2 M PAT good far world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters