-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathToneCounting_AnalysisScript.sh
40 lines (32 loc) · 1.43 KB
/
ToneCounting_AnalysisScript.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
#!/bin/bash
# Generate the subject list to make modifying this script
# to run just a subset of subjects easier.
for id in `seq 1 14` ; do
subj="sub-$id"
echo "===> Starting processing of $subj"
echo
cd $subj
# If the brain mask doesn’t exist, create it
if [ ! -f anat/${subj}_T1w_brain_f02.nii.gz ]; then
echo "Skull-stripped brain not found, using bet with a fractional intensity threshold of 0.5"
# Note: This fractional intensity appears to work well for most of the subjects in the
# Flanker dataset. You may want to change it if you modify this script for your own study.
bet2 anat/${subj}_T1w.nii.gz \
anat/${subj}_T1w_brain.nii.gz
fi
# Copy the design files into the subject directory, and then
# change “sub-01” to the current subject number
cp ../design_run1.fsf .
# Note that we are using the | character to delimit the patterns
# instead of the usual / character because there are / characters
# in the pattern.
sed -i '' "s|sub-01|${subj}|g" \
design_run1.fsf
# Now everything is set up to run feat
echo "===> Starting feat for run 1"
feat design_run1.fsf
echo
# Go back to the directory containing all of the subjects, and repeat the loop
cd ..
done
echo