-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathjob_tractmaps
executable file
·30 lines (22 loc) · 1.04 KB
/
job_tractmaps
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
#!/bin/bash
subject=$1
module load gcc/9.3.0 fsl
#copy everything to tmpdir
mkdir -p $SLURM_TMPDIR/results/diffparc $SLURM_TMPDIR/results/hcp_mmp
cp -Rv config resources workflow $SLURM_TMPDIR
cp -Rv results/diffparc/${subject} $SLURM_TMPDIR/results/diffparc/
cp -Rv results/diffparc/tpl* $SLURM_TMPDIR/results/diffparc/
cp -Rv results/hcp_mmp/${subject} $SLURM_TMPDIR/results/hcp_mmp/
cp -Rv results/hcp_mmp/tpl* $SLURM_TMPDIR/results/hcp_mmp/
pushd $SLURM_TMPDIR
snakemake --touch -j1 #touch the files to make sure
targets=''
for k in `seq 2 7`
do
targets="$targets results/tractmap/${subject}/${subject}_space-MNI152NLin6Asym_label-fullBF_method-spectralcosine_k-${k}_tractmap4d.nii.gz"
done
snakemake --use-singularity --singularity-args='\-e' --singularity-prefix /project/6050199/akhanf/singularity/snakemake_containers/ --rerun-incomplete --keep-going --show-failed-logs --resources gpus=1 -j8 $targets
popd
#copy tractmap results from tmpdir to this dir
mkdir -p results/tractmap
cp -Rv $SLURM_TMPDIR/results/tractmap/${subject} results/tractmap/