Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions proj-nipoppy/.recreate_hierarchy
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/bin/bash

set -eu

git rm --ignore-unmatch -fr [a-zA-Z]*
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}}

cat >| dataset_description.json <<EOF
{
"Name": "Example how nipoppy dataset could be presented as 'study'-type BIDS dataset",
"Description": "Demonstration for the https://github.com/bids-standard/bids-specification/pull/1972",
"BIDSVersion": "1.11.0",
"DatasetType": "study",
"Authors": [
"Yaroslav O. Halchenko", "Samuel Nastase"
],
"GeneratedBy": [
{
"Name": "Script to produce this dataset",
"CodeURL": "file://./recreate-hierarchy"
}
],
"License": "PDDL"
}
EOF

cat >| CHANGES << EOF
0.0.3 2024-10-28

- Changed to use "study" instead of "project".
- Refer to https://github.com/bids-standard/bids-specification/pull/1972 .

0.0.2 2024-10-28

- Updated to reflect addressed in bids-validator issues and
to merge "master" branch of the bids-examples project.
Added GeneratedBy and License.

0.0.1 2024-06-20

- Started to work on this support of the DatasetType project

EOF

cat >| README.md << EOF
This is an example of an entire study level BIDS dataset.
Built taking a hierarchy depicted on
https://github.com/neurodatascience/nipoppy?tab=readme-ov-file#nipoppy
and turning it into a valid BIDS layout.

Some files (e.g. bagel.csv) are specific to nipoppy etc projects, but since
located under folders where bids layout is not enforced -- should be just fine.

Some outstanding issues with validator(s) which were ran into while trying to
get "proper" validation working using deno bids-validator (mark when solved)

- [x] https://github.com/bids-standard/bids-validator/issues/2007

EOF

cat >| derivatives/bagel.csv << EOF
bids_id,participant_id,session,has_mri_data,pipeline_name,pipeline_version,pipeline_starttime,pipeline_complete
sub-MNI001,MNI001,1,TRUE,freesurfer,6.0.1,2022-05-24 13:43,SUCCESS
sub-MNI001,MNI001,2,TRUE,freesurfer,6.0.1,2022-05-24 13:46,SUCCESS
sub-MNI001,MNI001,3,TRUE,freesurfer,6.0.1,UNAVAILABLE,INCOMPLETE
EOF

cat >| sourcedata/tabular/bagel.csv << EOF
bids_id,participant_id,session,assessment_name,assessment_score
sub-MNI001,MNI001,1,group,Patient
sub-MNI001,MNI001,2,group,Patient
EOF

touch sourcedata/tabular/manifest.csv
echo '{}' > code/global_config.json

# populate empty folders with some placeholder .dotfile
find * -type d | while read d; do
if ! /bin/ls -a "$d" | grep -q '[a-z]'; then
touch $d/.fill
fi
done
git add *
15 changes: 15 additions & 0 deletions proj-nipoppy/CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
0.0.3 2024-10-28

- Changed to use "study" instead of "project".
- Refer to https://github.com/bids-standard/bids-specification/pull/1972 .

0.0.2 2024-10-28

- Updated to reflect addressed in bids-validator issues and
to merge "master" branch of the bids-examples project.
Added GeneratedBy and License.

0.0.1 2024-06-20

- Started to work on this support of the DatasetType project

13 changes: 13 additions & 0 deletions proj-nipoppy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This is an example of an entire study level BIDS dataset.
Built taking a hierarchy depicted on
https://github.com/neurodatascience/nipoppy?tab=readme-ov-file#nipoppy
and turning it into a valid BIDS layout.

Some files (e.g. bagel.csv) are specific to nipoppy etc projects, but since
located under folders where bids layout is not enforced -- should be just fine.

Some outstanding issues with validator(s) which were ran into while trying to
get "proper" validation working using deno bids-validator (mark when solved)

- [x] https://github.com/bids-standard/bids-validator/issues/2007

1 change: 1 addition & 0 deletions proj-nipoppy/code/global_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
16 changes: 16 additions & 0 deletions proj-nipoppy/dataset_description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"Name": "Example how nipoppy dataset could be presented as 'study'-type BIDS dataset",
"Description": "Demonstration for the https://github.com/bids-standard/bids-specification/pull/1972",
"BIDSVersion": "1.11.0",
"DatasetType": "study",
"Authors": [
"Yaroslav O. Halchenko", "Samuel Nastase"
],
"GeneratedBy": [
{
"Name": "Script to produce this dataset",
"CodeURL": "file://./recreate-hierarchy"
}
],
"License": "PDDL"
}
4 changes: 4 additions & 0 deletions proj-nipoppy/derivatives/bagel.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bids_id,participant_id,session,has_mri_data,pipeline_name,pipeline_version,pipeline_starttime,pipeline_complete
sub-MNI001,MNI001,1,TRUE,freesurfer,6.0.1,2022-05-24 13:43,SUCCESS
sub-MNI001,MNI001,2,TRUE,freesurfer,6.0.1,2022-05-24 13:46,SUCCESS
sub-MNI001,MNI001,3,TRUE,freesurfer,6.0.1,UNAVAILABLE,INCOMPLETE
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions proj-nipoppy/sourcedata/tabular/bagel.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bids_id,participant_id,session,assessment_name,assessment_score
sub-MNI001,MNI001,1,group,Patient
sub-MNI001,MNI001,2,group,Patient
Empty file.
Empty file.
Loading