forked from BrainModes/TVB-empirical-data-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runPipeline.sh
executable file
·57 lines (53 loc) · 1.78 KB
/
runPipeline.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
#!/bin/bash
# =============================================================================
# Authors: Michael Schirner, Simon Rothmeier, Petra Ritter
# BrainModes Research Group (head: P. Ritter)
# Charité University Medicine Berlin & Max Planck Institute Leipzig, Germany
# Correspondence: [email protected]
#
# When using this code please cite as follows:
# Schirner M, Rothmeier S, Jirsa V, McIntosh AR, Ritter P (in prep)
# Constructing subject-specific Virtual Brains from multimodal neuroimaging
#
# This software is distributed under the terms of the GNU General Public License
# as published by the Free Software Foundation. Further details on the GPL
# license can be found at http://www.gnu.org/copyleft/gpl.html.
# =============================================================================
# Required arguments:
# -s : The subjects Name i.e. the foldername
# -a : Abbreviation of the name, used by OSIRIX when reorganising the DICOMS into subfolders. See example below
#Example: ./runPipeline.sh -s CN_20120324 -a C_N
### Check Input ###
export usage="Example: ./pipeline.sh -s CN_20120324 -a C_N"
export subID=none
export split=none
while [ $# -gt 0 ]
do
case "$1" in
-s) subID="$2"; shift;;
-a) split="$2"; shift;;
-*) echo >&2 \
$usage
exit 1;;
*) break;; # terminate while loop
esac
shift
done
#Check if -a & -s have been set
if [ "$subID" == "none" ]
then
echo >&2 \
"Subjectname is missing! +++" \
$usage
exit 1;
elif [ "$split" == "none" ]
then
echo >&2 \
"Abbreviation is missing! +++" \
$usage
exit 1;
fi
### Check Input ###
#Run the Script in background
nohup ./pipeSubDK.sh ${subID} ${split} >& pipe_${subID}.log &
echo "The pipeline is now running in the background. Check the logs (pipe_${subID}.log). Come back again in ~16h"