-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_feat.sh
69 lines (49 loc) · 3.59 KB
/
run_feat.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
root=/media/labspace2/Projects/RMT-fMRI
#sid=(5 7 8 13 14 17 19 21 22 24 25 29 30)
#sid=(1 3 5 6 7 8 9 10 11 13 14 17 18 19 22 23 24 25 28 29 30)
sid=(1 3 5 6 7 8 9 10 11 13 14 17 18 19 21 22 23 24 25 28 29 30)
#sid=(1)
subjects=( "${sid[@]/#/NYU-}" )
for i in ${subjects[17]}; do
echo $i
proc=$root/PROCESSING_T1_v1/$i
listening=( `ls $proc/*LISTEN*.nii | grep -v _dn` )
verbgen=( `ls $proc/*VERB*.nii | grep -v _dn` )
sentcomp=( `ls $proc/*SENT*.nii | grep -v _dn` )
tapping=( `ls $proc/*PIANO*.nii | grep -v _dn | grep -v noisemap` )
mpr=( `ls -S $proc/*brain*` )
st=(`mrinfo -size $listening`)
cd $proc
if [ ${#tapping[@]} -eq 0 ]; then
tapping=( `ls $proc/*INDEX_TAP*.nii | grep -v _dn | grep -v noisemap` )
fi
echo $tapping
sed 's|'$root/PROCESSING/NYU-1/BRAIN_MAPPING_SENTENCECOMP_fMRI_SMS_s15'|'$listening'|g' /media/labspace2/Projects/RMT-fMRI/design_template_raw.fsf > $proc/design_listening_raw.fsf
sed -i 's|'$root/PROCESSING/NYU-1/BRAINMAPPINGAX3DMPR_s72_brain'|'$mpr'|g' $proc/design_listening_raw.fsf
sed -i 's|'TEMPDIRECTORY'|'${listening}.noproc.feat'|g' $proc/design_listening_raw.fsf
sed -i 's|'160'|'${st[3]}'|g' $proc/design_listening_raw.fsf
sed 's|'$root/PROCESSING/NYU-1/BRAIN_MAPPING_SENTENCECOMP_fMRI_SMS_s15'|'$verbgen'|g' /media/labspace2/Projects/RMT-fMRI/design_template_raw.fsf > $proc/design_verbgen_raw_ica.fsf
sed -i 's|'$root/PROCESSING/NYU-1/BRAINMAPPINGAX3DMPR_s72_brain'|'$mpr'|g' $proc/design_verbgen_raw_ica.fsf
sed -i 's|'TEMPDIRECTORY'|'${verbgen}.noprocica.feat'|g' $proc/design_verbgen_raw_ica.fsf
sed -i 's|'160'|'${st[3]}'|g' $proc/design_verbgen_raw_ica.fsf
sed 's|'$root/PROCESSING/NYU-1/BRAIN_MAPPING_SENTENCECOMP_fMRI_SMS_s15'|'$sentcomp'|g' /media/labspace2/Projects/RMT-fMRI/design_template_raw.fsf > $proc/design_sentcomp_raw.fsf
sed -i 's|'$root/PROCESSING/NYU-1/BRAINMAPPINGAX3DMPR_s72_brain'|'$mpr'|g' $proc/design_sentcomp_raw.fsf
sed -i 's|'TEMPDIRECTORY'|'${sentcomp}.noproc.feat'|g' $proc/design_sentcomp_raw.fsf
sed -i 's|'160'|'${st[3]}'|g' $proc/design_sentcomp_raw.fsf
sed 's|'$root/PROCESSING/NYU-1/BRAIN_MAPPING_SENTENCECOMP_fMRI_SMS_s15'|'$tapping'|g' /media/labspace2/Projects/RMT-fMRI/design_template_raw.fsf > $proc/design_piano_raw_ica.fsf
sed -i 's|'$root/PROCESSING/NYU-1/BRAINMAPPINGAX3DMPR_s72_brain'|'$mpr'|g' $proc/design_piano_raw_ica.fsf
sed -i 's|'TEMPDIRECTORY'|'${tapping}.noprocica.feat'|g' $proc/design_piano_raw_ica.fsf
sed -i 's|'160'|'${st[3]}'|g' $proc/design_piano_raw_ica.fsf
sed 's|'$root/PROCESSING/NYU-1/BRAIN_MAPPING_SENTENCECOMP_fMRI_SMS_s15'|'/media/labspace2/Projects/RMT-fMRI/PROCESSING_T1_v1/NYU-24/BRAIN_MAPPING_RIGHT_HAND_PIANO_s53_dncnn.nii'|g' /media/labspace2/Projects/RMT-fMRI/design_template_raw.fsf > $proc/design_piano_raw_dn3.fsf
sed -i 's|'$root/PROCESSING/NYU-1/BRAINMAPPINGAX3DMPR_s72_brain'|'$mpr'|g' $proc/design_piano_raw_dn3.fsf
sed -i 's|'TEMPDIRECTORY'|'${tapping}.noprocdncnn3.feat'|g' $proc/design_piano_raw_dn3.fsf
sed -i 's|'160'|'${st[3]}'|g' $proc/design_piano_raw_dn3.fsf
#feat $proc/design_listening_raw.fsf &
#feat $proc/design_verbgen_raw.fsf &
#feat $proc/design_sentcomp_raw.fsf &
feat $proc/design_piano_raw_dn3.fsf &
#~/Downloads/fix1.067/fix ${tapping}.noprocica.feat ~/Downloads/fix1.067/training_files/Standard.RData 20
#~/Downloads/fix1.067/fix ${verbgen}.noprocica.feat ~/Downloads/fix1.067/training_files/Standard.RData 20
wait
#fi
done