-
Notifications
You must be signed in to change notification settings - Fork 7
/
gen_3col_files.sh
executable file
·44 lines (41 loc) · 1.07 KB
/
gen_3col_files.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
#!/usr/bin/env bash
maindir=`pwd`
baseout=${maindir}/fsl/EVfiles
if [ ! -d ${baseout} ]; then
mkdir -p $baseout
fi
sub=$1
nruns=$2
for run in `seq $nruns`; do
input=${maindir}/bids/sub-${sub}/func/sub-${sub}_task-trust_run-0${run}_events.tsv
output=${baseout}/sub-${sub}/trust
mkdir -p $output
if [ -e $input ]; then
bash BIDSto3col.sh $input ${output}/run-0${run}
else
echo "PATH ERROR: cannot locate ${input}."
exit
fi
done
for run in 1 2; do
input=${maindir}/bids/sub-${sub}/func/sub-${sub}_task-sharedreward_run-0${run}_events.tsv
output=${baseout}/sub-${sub}/sharedreward
mkdir -p $output
if [ -e $input ]; then
bash BIDSto3col.sh $input ${output}/run-0${run}
else
echo "PATH ERROR: cannot locate ${input}."
exit
fi
done
for run in 1 2; do
input=${maindir}/bids/sub-${sub}/func/sub-${sub}_task-ultimatum_run-0${run}_events.tsv
output=${baseout}/sub-${sub}/ultimatum
mkdir -p $output
if [ -e $input ]; then
bash BIDSto3col.sh $input ${output}/run-0${run}
else
echo "PATH ERROR: cannot locate ${input}."
exit
fi
done