From fb9553f8495a19d968e4aaaf5a4201acbe9564bb Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 22 Jun 2024 16:22:00 +0900 Subject: [PATCH 1/6] Script construction of the nipoppy-inpsired project dataset --- proj-nipoppy/.recreate_hierarchy | 65 ++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100755 proj-nipoppy/.recreate_hierarchy diff --git a/proj-nipoppy/.recreate_hierarchy b/proj-nipoppy/.recreate_hierarchy new file mode 100755 index 000000000..9395ba031 --- /dev/null +++ b/proj-nipoppy/.recreate_hierarchy @@ -0,0 +1,65 @@ +#!/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 <| CHANGES << EOF +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 project/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) + +- [ ] 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 * From 648a57de32987cea0cc1a94ca9231b49e3a2d451 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 22 Jun 2024 16:23:12 +0900 Subject: [PATCH 2/6] [DATALAD RUNCMD] ./.recreate_hierarchy === Do not change lines below === { "chain": [], "cmd": "./.recreate_hierarchy", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "proj-nipoppy" } ^^^ Do not change lines above ^^^ --- proj-nipoppy/CHANGES | 4 ++++ proj-nipoppy/README.md | 13 +++++++++++++ proj-nipoppy/code/global_config.json | 1 + proj-nipoppy/dataset_description.json | 9 +++++++++ proj-nipoppy/derivatives/bagel.csv | 4 ++++ proj-nipoppy/derivatives/fmriprep-20.2.7/.fill | 0 proj-nipoppy/derivatives/fmriprep-23.1.3/.fill | 0 proj-nipoppy/derivatives/mriqc-23.1.0/.fill | 0 proj-nipoppy/derivatives/neurobagel-0.0.1/.fill | 0 proj-nipoppy/sourcedata/dicoms/.fill | 0 proj-nipoppy/sourcedata/raw/sub-001/ses-A/.fill | 0 proj-nipoppy/sourcedata/tabular/assesments/.fill | 0 proj-nipoppy/sourcedata/tabular/bagel.csv | 3 +++ proj-nipoppy/sourcedata/tabular/demographics/.fill | 0 proj-nipoppy/sourcedata/tabular/manifest.csv | 0 15 files changed, 34 insertions(+) create mode 100644 proj-nipoppy/CHANGES create mode 100644 proj-nipoppy/README.md create mode 100644 proj-nipoppy/code/global_config.json create mode 100644 proj-nipoppy/dataset_description.json create mode 100644 proj-nipoppy/derivatives/bagel.csv create mode 100644 proj-nipoppy/derivatives/fmriprep-20.2.7/.fill create mode 100644 proj-nipoppy/derivatives/fmriprep-23.1.3/.fill create mode 100644 proj-nipoppy/derivatives/mriqc-23.1.0/.fill create mode 100644 proj-nipoppy/derivatives/neurobagel-0.0.1/.fill create mode 100644 proj-nipoppy/sourcedata/dicoms/.fill create mode 100644 proj-nipoppy/sourcedata/raw/sub-001/ses-A/.fill create mode 100644 proj-nipoppy/sourcedata/tabular/assesments/.fill create mode 100644 proj-nipoppy/sourcedata/tabular/bagel.csv create mode 100644 proj-nipoppy/sourcedata/tabular/demographics/.fill create mode 100644 proj-nipoppy/sourcedata/tabular/manifest.csv diff --git a/proj-nipoppy/CHANGES b/proj-nipoppy/CHANGES new file mode 100644 index 000000000..89d9fc1bc --- /dev/null +++ b/proj-nipoppy/CHANGES @@ -0,0 +1,4 @@ +0.0.1 2024-06-20 + + - Started to work on this support of the DatasetType project + diff --git a/proj-nipoppy/README.md b/proj-nipoppy/README.md new file mode 100644 index 000000000..491344fb5 --- /dev/null +++ b/proj-nipoppy/README.md @@ -0,0 +1,13 @@ +This is an example of an entire project/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) + +- [ ] https://github.com/bids-standard/bids-validator/issues/2007 + diff --git a/proj-nipoppy/code/global_config.json b/proj-nipoppy/code/global_config.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/proj-nipoppy/code/global_config.json @@ -0,0 +1 @@ +{} diff --git a/proj-nipoppy/dataset_description.json b/proj-nipoppy/dataset_description.json new file mode 100644 index 000000000..599a5fd42 --- /dev/null +++ b/proj-nipoppy/dataset_description.json @@ -0,0 +1,9 @@ +{ + "Name": "Example how nipoppy dataset could be presented as project-type BIDS dataset", + "Description": "Demonstration for the https://github.com/bids-standard/bids-specification/pull/1861", + "BIDSVersion": "1.10.0", + "DatasetType": "project", + "Authors": [ + "Yaroslav O. Halchenko", "Samuel Nastase" + ] +} diff --git a/proj-nipoppy/derivatives/bagel.csv b/proj-nipoppy/derivatives/bagel.csv new file mode 100644 index 000000000..4f4e3dfca --- /dev/null +++ b/proj-nipoppy/derivatives/bagel.csv @@ -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 diff --git a/proj-nipoppy/derivatives/fmriprep-20.2.7/.fill b/proj-nipoppy/derivatives/fmriprep-20.2.7/.fill new file mode 100644 index 000000000..e69de29bb diff --git a/proj-nipoppy/derivatives/fmriprep-23.1.3/.fill b/proj-nipoppy/derivatives/fmriprep-23.1.3/.fill new file mode 100644 index 000000000..e69de29bb diff --git a/proj-nipoppy/derivatives/mriqc-23.1.0/.fill b/proj-nipoppy/derivatives/mriqc-23.1.0/.fill new file mode 100644 index 000000000..e69de29bb diff --git a/proj-nipoppy/derivatives/neurobagel-0.0.1/.fill b/proj-nipoppy/derivatives/neurobagel-0.0.1/.fill new file mode 100644 index 000000000..e69de29bb diff --git a/proj-nipoppy/sourcedata/dicoms/.fill b/proj-nipoppy/sourcedata/dicoms/.fill new file mode 100644 index 000000000..e69de29bb diff --git a/proj-nipoppy/sourcedata/raw/sub-001/ses-A/.fill b/proj-nipoppy/sourcedata/raw/sub-001/ses-A/.fill new file mode 100644 index 000000000..e69de29bb diff --git a/proj-nipoppy/sourcedata/tabular/assesments/.fill b/proj-nipoppy/sourcedata/tabular/assesments/.fill new file mode 100644 index 000000000..e69de29bb diff --git a/proj-nipoppy/sourcedata/tabular/bagel.csv b/proj-nipoppy/sourcedata/tabular/bagel.csv new file mode 100644 index 000000000..e9c85fc12 --- /dev/null +++ b/proj-nipoppy/sourcedata/tabular/bagel.csv @@ -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 diff --git a/proj-nipoppy/sourcedata/tabular/demographics/.fill b/proj-nipoppy/sourcedata/tabular/demographics/.fill new file mode 100644 index 000000000..e69de29bb diff --git a/proj-nipoppy/sourcedata/tabular/manifest.csv b/proj-nipoppy/sourcedata/tabular/manifest.csv new file mode 100644 index 000000000..e69de29bb From 4f231b00fcba96782e3ddee1ac1214fa84e5026e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 28 Oct 2024 11:57:05 -0400 Subject: [PATCH 3/6] update changelgo for demo nipoppy project --- proj-nipoppy/.recreate_hierarchy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/proj-nipoppy/.recreate_hierarchy b/proj-nipoppy/.recreate_hierarchy index 9395ba031..3758ef8ec 100755 --- a/proj-nipoppy/.recreate_hierarchy +++ b/proj-nipoppy/.recreate_hierarchy @@ -18,6 +18,11 @@ cat >| dataset_description.json <| CHANGES << EOF +0.0.2 2024-10-28 + + - Updated to reflect addressed in bids-validator issues and + to merge "master" branch of the bids-examples project + 0.0.1 2024-06-20 - Started to work on this support of the DatasetType project @@ -36,7 +41,7 @@ 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) -- [ ] https://github.com/bids-standard/bids-validator/issues/2007 +- [x] https://github.com/bids-standard/bids-validator/issues/2007 EOF From 728b9caf49ecc94db4648722f655c57910b69460 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 28 Oct 2024 11:57:21 -0400 Subject: [PATCH 4/6] [DATALAD RUNCMD] ./.recreate_hierarchy === Do not change lines below === { "chain": [ "648a57de32987cea0cc1a94ca9231b49e3a2d451" ], "cmd": "./.recreate_hierarchy", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "proj-nipoppy" } ^^^ Do not change lines above ^^^ --- proj-nipoppy/CHANGES | 5 +++++ proj-nipoppy/README.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/proj-nipoppy/CHANGES b/proj-nipoppy/CHANGES index 89d9fc1bc..34dab6582 100644 --- a/proj-nipoppy/CHANGES +++ b/proj-nipoppy/CHANGES @@ -1,3 +1,8 @@ +0.0.2 2024-10-28 + + - Updated to reflect addressed in bids-validator issues and + to merge "master" branch of the bids-examples project + 0.0.1 2024-06-20 - Started to work on this support of the DatasetType project diff --git a/proj-nipoppy/README.md b/proj-nipoppy/README.md index 491344fb5..79d7af8da 100644 --- a/proj-nipoppy/README.md +++ b/proj-nipoppy/README.md @@ -9,5 +9,5 @@ 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) -- [ ] https://github.com/bids-standard/bids-validator/issues/2007 +- [x] https://github.com/bids-standard/bids-validator/issues/2007 From a4e93f801fbc723e9a174797227423e4882feba3 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 28 Oct 2024 12:00:56 -0400 Subject: [PATCH 5/6] detabify dataset_description.json --- proj-nipoppy/.recreate_hierarchy | 2 +- proj-nipoppy/dataset_description.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proj-nipoppy/.recreate_hierarchy b/proj-nipoppy/.recreate_hierarchy index 3758ef8ec..3689d89ae 100755 --- a/proj-nipoppy/.recreate_hierarchy +++ b/proj-nipoppy/.recreate_hierarchy @@ -8,7 +8,7 @@ mkdir -p {code,derivatives{,/fmriprep-{20.2.7,23.1.3},/mriqc-23.1.0,/neurobagel- cat >| dataset_description.json < Date: Mon, 28 Oct 2024 12:29:37 -0400 Subject: [PATCH 6/6] GeneratedBy and License --- proj-nipoppy/.recreate_hierarchy | 12 ++++++++++-- proj-nipoppy/CHANGES | 3 ++- proj-nipoppy/dataset_description.json | 9 ++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/proj-nipoppy/.recreate_hierarchy b/proj-nipoppy/.recreate_hierarchy index 3689d89ae..fe03a2b89 100755 --- a/proj-nipoppy/.recreate_hierarchy +++ b/proj-nipoppy/.recreate_hierarchy @@ -13,7 +13,14 @@ cat >| dataset_description.json <| CHANGES << EOF 0.0.2 2024-10-28 - Updated to reflect addressed in bids-validator issues and - to merge "master" branch of the bids-examples project + to merge "master" branch of the bids-examples project. + Added GeneratedBy and License. 0.0.1 2024-06-20 diff --git a/proj-nipoppy/CHANGES b/proj-nipoppy/CHANGES index 34dab6582..fa8cc5a3c 100644 --- a/proj-nipoppy/CHANGES +++ b/proj-nipoppy/CHANGES @@ -1,7 +1,8 @@ 0.0.2 2024-10-28 - Updated to reflect addressed in bids-validator issues and - to merge "master" branch of the bids-examples project + to merge "master" branch of the bids-examples project. + Added GeneratedBy and License. 0.0.1 2024-06-20 diff --git a/proj-nipoppy/dataset_description.json b/proj-nipoppy/dataset_description.json index 8aa3477d4..a66534a48 100644 --- a/proj-nipoppy/dataset_description.json +++ b/proj-nipoppy/dataset_description.json @@ -5,5 +5,12 @@ "DatasetType": "project", "Authors": [ "Yaroslav O. Halchenko", "Samuel Nastase" - ] + ], + "GeneratedBy": [ + { + "Name": "Script to produce this dataset", + "CodeURL": "file://./recreate-hierarchy" + } + ], + "License": "PDDL" }