|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +set -eu |
| 4 | + |
| 5 | +git rm --ignore-unmatch -fr [a-zA-Z]* |
| 6 | +mkdir -p {code,derivatives{,/fmriprep-{20.2.7,23.1.3},/mriqc-23.1.0,/neurobagel-0.0.1},sourcedata{,/tabular{,/demographics,/assesments},/raw/sub-001/ses-A,/dicoms}} |
| 7 | + |
| 8 | +cat >| dataset_description.json <<EOF |
| 9 | +{ |
| 10 | + "Name": "Example how nipoppy dataset could be presented as project-type BIDS dataset", |
| 11 | + "Description": "Demonstration for the https://github.com/bids-standard/bids-specification/pull/1861", |
| 12 | + "BIDSVersion": "1.10.0", |
| 13 | + "DatasetType": "project", |
| 14 | + "Authors": [ |
| 15 | + "Yaroslav O. Halchenko", "Samuel Nastase" |
| 16 | + ] |
| 17 | +} |
| 18 | +EOF |
| 19 | + |
| 20 | +cat >| CHANGES << EOF |
| 21 | +0.0.1 2024-06-20 |
| 22 | +
|
| 23 | + - Started to work on this support of the DatasetType project |
| 24 | +
|
| 25 | +EOF |
| 26 | + |
| 27 | +cat >| README.md << EOF |
| 28 | +This is an example of an entire project/study level BIDS dataset. |
| 29 | +Built taking a hierarchy depicted on |
| 30 | +https://github.com/neurodatascience/nipoppy?tab=readme-ov-file#nipoppy |
| 31 | +and turning it into a valid BIDS layout. |
| 32 | +
|
| 33 | +Some files (e.g. bagel.csv) are specific to nipoppy etc projects, but since |
| 34 | +located under folders where bids layout is not enforced -- should be just fine. |
| 35 | +
|
| 36 | +Some outstanding issues with validator(s) which were ran into while trying to |
| 37 | +get "proper" validation working using deno bids-validator (mark when solved) |
| 38 | +
|
| 39 | +- [ ] https://github.com/bids-standard/bids-validator/issues/2007 |
| 40 | +
|
| 41 | +EOF |
| 42 | + |
| 43 | +cat >| derivatives/bagel.csv << EOF |
| 44 | +bids_id,participant_id,session,has_mri_data,pipeline_name,pipeline_version,pipeline_starttime,pipeline_complete |
| 45 | +sub-MNI001,MNI001,1,TRUE,freesurfer,6.0.1,2022-05-24 13:43,SUCCESS |
| 46 | +sub-MNI001,MNI001,2,TRUE,freesurfer,6.0.1,2022-05-24 13:46,SUCCESS |
| 47 | +sub-MNI001,MNI001,3,TRUE,freesurfer,6.0.1,UNAVAILABLE,INCOMPLETE |
| 48 | +EOF |
| 49 | + |
| 50 | +cat >| sourcedata/tabular/bagel.csv << EOF |
| 51 | +bids_id,participant_id,session,assessment_name,assessment_score |
| 52 | +sub-MNI001,MNI001,1,group,Patient |
| 53 | +sub-MNI001,MNI001,2,group,Patient |
| 54 | +EOF |
| 55 | + |
| 56 | +touch sourcedata/tabular/manifest.csv |
| 57 | +echo '{}' > code/global_config.json |
| 58 | + |
| 59 | +# populate empty folders with some placeholder .dotfile |
| 60 | +find * -type d | while read d; do |
| 61 | + if ! /bin/ls -a "$d" | grep -q '[a-z]'; then |
| 62 | + touch $d/.fill |
| 63 | + fi |
| 64 | +done |
| 65 | +git add * |
0 commit comments