-
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] Gracefully handle user providing phenotypic file as .csv (#212)
* Setup basic pheno.tsv validation for now only checks the file ending of the pheno file * Also ensure that fake .tsv files get flagged Someone sharing a .tsv file that really is a .csv will also get flagged * Use futures for python3.9 support Co-authored-by: Alyssa Dai <[email protected]> * Disallow all file endings other than .tsv * Saner error handling and clearer descriptions Co-authored-by: Alyssa Dai <[email protected]> * Error out on single column input * Make new output API happy --------- Co-authored-by: Alyssa Dai <[email protected]>
- Loading branch information
Showing
8 changed files
with
189 additions
and
20 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,81 @@ | ||
{ | ||
"participant_id": { | ||
"Description": "A participant ID", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:ParticipantID", | ||
"Label": "Unique participant identifier" | ||
}, | ||
"Identifies": "participant" | ||
} | ||
}, | ||
"session_id": { | ||
"Description": "A session ID", | ||
"Annotations": { | ||
"IsAbout": { | ||
"TermURL": "nb:SessionID", | ||
"Label": "Unique session identifier" | ||
}, | ||
"Identifies": "session" | ||
} | ||
}, | ||
"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": "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,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,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