Demo of automatic conversion of DICOMs into BIDS and managing data using DataLad [80x24]

by DataLad
GNU/Linux ◆ xterm ◆ zsh 485 views

List of the commands (with timing after #) executed in the asciinema:

set -eu # Fail early if any error happens # 0.07 sec

datalad install -r -g -J4 ///dicoms/dartmouth-phantoms/bids_test4-20161014 # 62.79 sec help

wget https://raw.githubusercontent.com/nipy/heudiconv/master/heuristics/dbic_bids.py # 0.58 sec

heudiconv --bids --datalad -f ./dbic_bids.py -o demo bids_test4-20161014/phantom-[1-5]/*{scout,T1w}* # 61.18 sec

datalad ls -r demo # 3.00 sec help

cd demo/Halchenko/Yarik/950_bids_test4 # 0.07 sec

git log --pretty=oneline # 0.08 sec

cat dataset_description.json # 0.07 sec

git grep TODO # 0.07 sec

git annex list # 0.12 sec

datalad metadata sourcedata/sub-phantom1sid1 # 1.15 sec help

datalad install -g -r -s localhost:$PWD ~/950_bids_test4-process # 6.90 sec help

cd ~/950_bids_test4-process # 0.08 sec

datalad create -d . derivatives/preprocess1 # 3.52 sec help

source /etc/fsl/fsl.sh # to enable FSL on NeuroDebian systems # 0.07 sec

mkdir -p derivatives/preprocess1/sub-phantom1sid1/ses-localizer/anat/ # create target output directory # 0.08 sec

bet {,derivatives/preprocess1/}sub-phantom1sid1/ses-localizer/anat/sub-phantom1sid1_ses-localizer_T1w.nii.gz # 1.54 sec

datalad add -m 'added initial preprocessing (well -- BETing output)' derivatives/preprocess1/* # 1.69 sec help

sed -i -e 's,First1 Last1,Data Lad,g' -e '/TODO/d' dataset_description.json # 0.08 sec

datalad save -m 'Finished initial preprocessing, specified PI in dataset description and removed TODOs.' # 1.39 sec help

cd # 0.07 sec

heudiconv --bids --datalad -f ./dbic_bids.py -o demo bids_test4-20161014/phantom-[6-9]/*{scout,T1w}* # 34.17 sec

cd ~/950_bids_test4-process # 0.07 sec

datalad update --merge -r # 8.01 sec help

git status # all clear # 0.07 sec

cat dataset_description.json # and our changes are still in place # 0.07 sec

git log --pretty=oneline # 0.07 sec