Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 27 lines (20 sloc) 854 Bytes
#!/usr/bin/env bash
mproc=/data/projects/abcd-mid/raw/mproc
for sub in `cat ID_147_RemovedBad.txt`; do
#clean up existing output
bidsroot=/data/projects/abcd-mid/bids
rm -rf ${bidsroot}/sub-${sub}
rm -rf ${bidsroot}/.heudiconv/${sub}
echo "found `ls -1 raw/fasttrack/sub-${sub}/ses-baselineYear1Arm1/*/*/*.dcm | wc -l` dicoms"
echo $sub
#convert functionals to bids format
docker run --rm -it -v /data/projects/abcd-mid:/data:ro \
-v ${bidsroot}:/output \
nipy/heudiconv:latest \
-d /data/raw/fasttrack/sub-{subject}/ses-baselineYear1Arm1/*/*/*.dcm -s $sub \
-f /data/heuristics_new.py -c dcm2niix -b --minmeta -o /output
done
sudo chmod -R 775 /data/projects/abcd-mid/bids
sudo python Add_IntendedFor.py
# raw/fasttrack/sub-NDARINVRJPAKY38/ses-baselineYear1Arm1/*/*/*.dcm
# raw/fasttrack/sub-{subject}/ses-baselineYear1Arm1/*/*/*.dcms