-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain
executable file
·47 lines (37 loc) · 989 Bytes
/
main
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
#!/bin/bash
#PBS -l nodes=1:ppn=16
#PBS -l walltime=02:00:00
set -xe
INPUT=$(jq -r .bold config.json)
MASK=$(jq -r .mask config.json)
NHOOD=$(jq -r .neighborhood config.json)
FWHM=$(jq -r .fwhm config.json)
if [ $MASK == "null" ]; then
MASK=""
fi
OPTS=""
if [ ! -z "$MASK" ]; then
OPTS="$OPTS -mask $MASK"
fi
mkdir -p reho
time singularity run -e \
docker://anibalsolon/app-reho:v0.0.1 \
/opt/afni/3dReHo \
-inset $INPUT \
-prefix reho/reho.nii.gz \
-nneigh $NHOOD \
$OPTS
time singularity run -e \
docker://anibalsolon/app-reho:v0.0.1 \
sh ./zscore.sh reho/reho.nii.gz reho/reho_norm.nii.gz
mv reho/reho_norm.nii.gz reho/reho.nii.gz
if [ "$FWHM" != "0" ]; then
time singularity run -e \
docker://anibalsolon/app-reho:v0.0.1 \
/opt/afni/3dBlurToFWHM \
-input reho/reho.nii.gz \
-prefix reho/reho_smooth.nii.gz \
-FWHM $FWHM \
$OPTS
mv reho/reho_smooth.nii.gz reho/reho.nii.gz
fi