-
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] Schema: allow for data dictionaries with incomplete Neurobagel …
…annotations (#163) * skip columns without annotations - required now that the schema makes annotations optional * Introduce get_annotated_columns * Refactor get_annotated_columns to return column name and content * Refactor utils to use only annotated columns * Update test data description * add check + test that no annotated columns in data dict raises error * add check + test that >=1 column about participant ID * add example with participant ID column lacking neurobagel annotations --------- Co-authored-by: Alyssa Dai <[email protected]>
- Loading branch information
Showing
9 changed files
with
250 additions
and
21 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
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,82 @@ | ||
{ | ||
"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", | ||
"Levels": { | ||
"PAT": "Patient", | ||
"CTRL": "Control subject" | ||
}, | ||
"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" | ||
} | ||
} | ||
}, | ||
"someOtherColumn": { | ||
"Description": "This is cool in BIDS, but not in Neurobagel" | ||
} | ||
} |
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,73 @@ | ||
{ | ||
"participant_id": { | ||
"Description": "A participant ID" | ||
}, | ||
"session_id": { | ||
"Description": "A session ID", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:SessionID", | ||
"Label": "Unique session identifier" | ||
} | ||
} | ||
}, | ||
"group": { | ||
"Description": "Group variable", | ||
"Levels": { | ||
"PAT": "Patient", | ||
"CTRL": "Control subject" | ||
}, | ||
"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
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