-
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.
[MNT] Deprecate Cognitive Atlas vocab namespace & add check for unsup…
…ported namespaces (#410) * update test data README * update type hint * add test for phenotypic TSV with unrecognized vocab namespace * add check for unrecognized namespaces in data dict * add global var and check for deprecated namespaces * test extraction of unsupported namespaces * test deprecated namespace extraction and move checks to data dict validation * fix outdated docs link in README * add script to regenerate JSONLDs in neurobagel_examples submodule * rework example5 to have unsupported vocabs in data dict - example5 previously wasn't used anywhere and was conceptually a duplicate of example9 * update neurobagel_examples submodule * update tests * update JSONLD regeneration script docstring Co-authored-by: Sebastian Urchs <[email protected]> --------- Co-authored-by: Sebastian Urchs <[email protected]>
- Loading branch information
Showing
17 changed files
with
281 additions
and
37 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
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,41 @@ | ||
#!/bin/bash | ||
|
||
# Steps to use: | ||
# 1. cd into the tests/neurobagel_examples submodule and create a new branch that will contain the updated example files | ||
# 2. Navigate back to the bagel-cli repository root directory and run this script from there to regenerate the example synthetic JSONLD files inside of the tests/neurobagel_examples submodule | ||
# in neurobagel_examples. | ||
# 3. Navigate again to tests/neurobagel_examples and from there, commit the changes, push the changes to the submodule origin, and open a PR there to merge the updated examples. | ||
|
||
docker build -t bagel . | ||
cd tests | ||
|
||
data_dir=neurobagel_examples/data-upload | ||
|
||
# Phenotypic data only JSONLD | ||
docker run --rm --volume=$PWD:/data/neurobagel/bagel-cli -w /data/neurobagel/bagel-cli bagel pheno \ | ||
--pheno "${data_dir}/example_synthetic.tsv" \ | ||
--dictionary "${data_dir}/example_synthetic.json" \ | ||
--name "BIDS synthetic" \ | ||
--output "${data_dir}/example_synthetic.jsonld" \ | ||
--overwrite | ||
|
||
# Phenotypic & BIDS data JSONLD | ||
docker run --rm --volume=$PWD:/data/neurobagel/bagel-cli -w /data/neurobagel/bagel-cli bagel bids \ | ||
--jsonld-path ${data_dir}/example_synthetic.jsonld \ | ||
--bids-dir bids-examples/synthetic \ | ||
--output ${data_dir}/pheno-bids-output/example_synthetic_pheno-bids.jsonld \ | ||
--overwrite | ||
|
||
# Phenotypic & derivatives data JSONLD | ||
docker run --rm --volume=$PWD:/data/neurobagel/bagel-cli -w /data/neurobagel/bagel-cli bagel derivatives \ | ||
--tabular ${data_dir}/nipoppy_proc_status_synthetic.tsv \ | ||
--jsonld-path ${data_dir}/example_synthetic.jsonld \ | ||
--output "${data_dir}/pheno-derivatives-output/example_synthetic_pheno-derivatives.jsonld" \ | ||
--overwrite | ||
|
||
# Phenotypic, BIDS, and derivatives data JSONLD | ||
docker run --rm --volume=$PWD:/data/neurobagel/bagel-cli -w /data/neurobagel/bagel-cli bagel derivatives \ | ||
--tabular ${data_dir}/nipoppy_proc_status_synthetic.tsv \ | ||
--jsonld-path "${data_dir}/pheno-bids-output/example_synthetic_pheno-bids.jsonld" \ | ||
--output "${data_dir}/pheno-bids-derivatives-output/example_synthetic_pheno-bids-derivatives.jsonld" \ | ||
--overwrite |
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
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
participant_id session_id group | ||
sub-01 ses-01 PAT | ||
sub-01 ses-02 PAT | ||
sub-02 ses-01 OTHER | ||
sub-02 ses-02 CTRL | ||
participant_id session_id group tool_item1 tool_item2 other_tool_item1 | ||
sub-01 ses-01 PAT 11.0 "missing" "none" | ||
sub-01 ses-02 PAT "missing" 12.0 "none" | ||
sub-02 ses-01 OTHER "missing" "missing" "none" | ||
sub-02 ses-02 OTHER "missing" "missing" "none" | ||
sub-03 ses-01 CTRL 10.0 8.0 "ok" | ||
sub-03 ses-02 CTRL 10.0 8.0 "bad" |
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
Oops, something went wrong.