Skip to content

Commit

Permalink
Merge pull request #27 from josephmje/gh-pages
Browse files Browse the repository at this point in the history
ENH: Update bids
  • Loading branch information
josephmje authored Sep 2, 2021
2 parents 0b559c9 + 8356f9d commit ed4548c
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 17 deletions.
6 changes: 3 additions & 3 deletions binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ gzip -d data/dicom_examples/0219191_mystudy-0219-1114/dcm/*dcm.gz
rm data/0219191_mystudy-0219-1114.tar.gz

# Convert DICOM to NIfTI
mkdir -p data/dicom_examples/nii
dcm2niix -z y -o data/dicom_examples/nii data/dicom_examples/0219191_mystudy-0219-1114/dcm
rm -fr data/dicom_examples/nii/*scout*
mkdir -p data/dicom_examples/0219191_mystudy-0219-1114/nii
dcm2niix -z y -o data/dicom_examples/0219191_mystudy-0219-1114/nii data/dicom_examples/0219191_mystudy-0219-1114/dcm
rm -fr data/dicom_examples/0219191_mystudy-0219-1114/nii/*scout*

# Set up git
git config --global --add user.name "Carl Jacobi"
Expand Down
16 changes: 10 additions & 6 deletions code/03-brain-imaging-data-structure.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,7 @@
"source": [
"%%bash\n",
"\n",
"cd ../data/dicom_examples/0219191_mystudy-0219-1114\n",
"mkdir dcm2bids\n",
"\n",
"dcm2bids_scaffold dcm2bids/"
"dcm2bids_scaffold -o ../data/dicom_examples/0219191_mystudy-0219-1114/dcm2bids/"
]
},
{
Expand All @@ -207,7 +204,9 @@
"source": [
"%%bash\n",
"\n",
"dcm2bids_helper -d ../data/dicom_examples/0219191_mystudy-0219-1114"
"dcm2bids_helper \\\n",
" -d ../data/dicom_examples/0219191_mystudy-0219-1114/dcm \\\n",
" -o ../data/dicom_examples/0219191_mystudy-0219-1114/dcm2bids"
]
},
{
Expand All @@ -218,7 +217,12 @@
"source": [
"%%bash\n",
"\n",
"dcm2bids -d 0219191_mystudy-0219-1114/ -p 01 -s 01 -c code/config.json -o dcm2bids/"
"mkdir -p ../data/dicom_examples/0219191_mystudy-0219-1114/dcm2bids/rawdata\n",
"dcm2bids \\\n",
" -d ../data/dicom_examples/0219191_mystudy-0219-1114/dcm \\\n",
" -p 01 -s 01 \\\n",
" -c ../data/dicom_examples/0219191_mystudy-0219-1114/dcm2bids/code/config.json \\\n",
" -o ../data/dicom_examples/0219191_mystudy-0219-1114/dcm2bids/rawdata"
]
},
{
Expand Down
40 changes: 32 additions & 8 deletions code/05-bids-derivatives.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,51 @@
"[BIDS Apps](https://bids-apps.neuroimaging.io/) are containerized applications that run on BIDS data structures. \n",
"\n",
"Some examples include:\n",
"- freesurfer\n",
"- fmriprep (https://fmriprep.readthedocs.io/en/stable/citing.html)\n",
"- mriqc\n",
"- fmriprep\n",
"- freesurfer\n",
"- ciftify\n",
"- SPM\n",
"- MRtrix3_connectome\n",
"\n",
"They rely on 2 technologies for container computing:\n",
"- Docker\n",
"- <b>Docker</b>\n",
" - for building, hosting, and running containers on local hardware (Windows, Mac OS, Linux) or in the cloud\n",
"- Singularity\n",
" - for running containers on high performance compute clusters"
"- <b>Singularity</b>\n",
" - for running containers on high performance compute clusters\n",
" \n",
"<img src=\"../fig/bids_app.png\" alt=\"Drawing\" align=\"middle\" width=\"500px\"/>"
]
},
{
"cell_type": "markdown",
"id": "026bb764",
"metadata": {},
"source": [
"Building a singularity container is as easy as:\n",
" \n",
" `singularity build mriqc-0.16.1.simg docker://poldracklab/mriqc:0.16.1`"
]
},
{
"cell_type": "markdown",
"id": "65420f23",
"metadata": {},
"source": [
"To run the container:\n",
"\n",
"```\n",
"singularity run --cleanenv \\\n",
" -B bids_folder:/data \\\n",
" mriqc-0.16.1.simg \\\n",
" /data /data/derivatives participant\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e2234bf1",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Binary file added fig/bids_app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ed4548c

Please sign in to comment.