Demo of automatic conversion of DICOMs into BIDS and managing data using DataLad [120x36]

by DataLad
GNU/Linux ◆ xterm ◆ zsh 358 views

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

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

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

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

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

datalad ls -r demo # 2.90 sec help

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

git log --pretty=oneline # 0.05 sec

cat dataset_description.json # 0.05 sec

git grep TODO # 0.06 sec

git annex list # 0.10 sec

datalad metadata sourcedata/sub-phantom1sid1 # 1.20 sec help

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

cd ~/950_bids_test4-process # 0.06 sec

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

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

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

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

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

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

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

cd # 0.05 sec

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

cd ~/950_bids_test4-process # 0.05 sec

datalad update --merge -r # 6.64 sec help

git status # all clear # 0.06 sec

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

git log --pretty=oneline # 0.05 sec