I am working on DTI data where I am assessing the connectivity of a particular ROI. But I have divided this ROI into multiple sub-regions and so I want to do probtrackx2 for each sub-region in each patient.
SO, I created a probtrackx2 loop but i keep getting errors. I think it just overwrites the files because all the outcomes end in the same folder. How can I fix this?
Or how can I ask it to create a sub-directory for each sub-region in the loop?
Here's what I used before
for a in $(ls); do echo $a; echo probtrackx2 -s ../../DTI/CO_4/CO_4_DTI.bedpostX/merged
-m /data/QM/y.fathy/DTI/CO_4/CO_4_DTI.bedpostX/nodif_brain_mask.nii.gz -x /data/QM/y.fathy/cases/CO_4/subregions_nodif/$a -l --onewaycondition -c 0.2 -S 2000 --steplength=0.5 -P 5000 --fibthresh=0.01 --distthresh=0.0 --sampvox=0.0 --forcedir --opd --dir=/data/QM/y.fathy/DTI/CO_4/CO_4_DTI.bedpostX/Probtrack/subregions; done
I would appreciate your reply. Thanks.