Quick sheet

<aside> 💡 Log in to Calcus (Terminal): ssh [email protected]

</aside>

<aside> 💡 DICOM files should be placed in ./sourcedata directory within Your project

</aside>

<aside> 💡 Activate (install) dcm2bids source neurodesk/bin/activate

</aside>

<aside> 💡 Run conversion script tail -n +2 ../kj23a.csv | parallel -j 4 --colsep ',' ../run_dcm2bids.sh "{1}" {4} {5}

</aside>

Create Your Project’s directory

Go to /home/repo

Activate (install) dcm2bids source neurodesk/bin/activate

Create an empty structure of directories dcm2bids_scaffold -o project

Go to Your project’s directory cd project

Put or create a link to config.json in project/code/ directory.

Get DICOM data

Your DICOM files are always available through xnat.nencki.edu.pl from any computer, but Calcus has a better, direct connection. Please make sure the ./sourcedata directory is available within Your project. It should be synced with XNAT every night. Let me know if something is missing.

Prepare Your CSV dictionary

Export XNAT sessions to CSV

Put the CSV in project’s directory. You can’t upload the file to /home/repo using SMB (Finder) but You can move it in Terminal withcp ~/new.csv /home/repo/project/

run_dcm2bids expects xnat session id, subject’s name and **optionally session/timepoint in respective order. Please make sure that similar output will be generated.

tail -n +2 ./kj23a.csv | parallel --colsep ',' echo dcm2bids: "{1}" {4} {5}
#output
dcm2bids: e831a96a-8aa5-4a S2WIO824
dcm2bids: ec6ae1fe-ab74-47 S2WIO928
dcm2bids: ee0e6d2e-9d0d-43 S2WIO773
dcm2bids: ee5ad927-5bb8-4f S2WIO68
dcm2bids: f3aebf90-e568-45 S2WIO716
dcm2bids: fa0660ca-5509-48 S2WIO464 2
dcm2bids: fbf45fa9-0c7f-43 S2WIO389 2
dcm2bids: fc9d9ac6-e50c-4d S2WIO304 1
dcm2bids: fda17c32-2e88-45 S2WIO158 2
dcm2bids: fe8f99be-d955-4f S2WIO870 2
dcm2bids: ff7543be-c3a8-46 S2WIO68 2

Batch conversion

Run tail -n +2 ../kj23a.csv | parallel -j 4 --colsep ',' ../run_dcm2bids.sh "{1}" {4} {5}