Skip to content

Commit

Permalink
add script to regenerate JSONLDs in neurobagel_examples submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
alyssadai committed Dec 18, 2024
1 parent 4591d27 commit 4dc9f8b
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions generate_neurobagel_example_jsonlds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
# Run from repository root

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

0 comments on commit 4dc9f8b

Please sign in to comment.