-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSetUpHCPPipeline_DeDriftAndResample.sh
executable file
·144 lines (105 loc) · 5.13 KB
/
SetUpHCPPipeline_DeDriftAndResample.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#!/bin/bash
script_name="SetUpHCPPipeline_DeDriftAndResample.sh"
echo "${script_name}: This script must be SOURCED to correctly setup the environment prior to running"
echo "${script_name}: any of the other HCP scripts contained here."
if [ "${COMPUTE}" = "" ] ; then
echo "${script_name}: COMPUTE value unset. Setting to the default of CHPC"
export COMPUTE="CHPC"
fi
if [ "${COMPUTE}" = "CHPC" ] ; then
echo ""
echo "${script_name}: Setting up for processing on ${COMPUTE}"
if [ "${CLUSTER}" = "1.0" ] ; then
echo ""
echo "${script_name}: Setting up for CHPC cluster ${CLUSTER}"
echo ""
echo "${script_name}: Setting up FSL"
export FSLDIR=/export/fsl-5.0.9
source ${FSLDIR}/etc/fslconf/fsl.sh
echo "${script_name}: Set up to use FSL at ${FSLDIR}"
echo ""
echo "${script_name}: Setting up FreeSurfer"
export FSL_DIR="${FSLDIR}"
export FREESURFER_HOME=/export/freesurfer-5.3-HCP
source ${FREESURFER_HOME}/SetUpFreeSurfer.sh
echo "${script_name}: Set up to use FreeSurfer at ${FREESURFER_HOME}"
echo ""
echo "${script_name}: Setting up Python"
export EPD_PYTHON_HOME=/export/epd-7.3.2
export PATH=${EPD_PYTHON_HOME}/bin:${PATH}
echo "${script_name}: Set up to use EPD Python at ${EPD_PYTHON_HOME}"
echo ""
echo "${script_name}: Setting up Workbench (a.k.a. CARET7)"
export CARET7DIR=/home/HCPpipeline/pipeline_tools/workbench-v1.1.1/bin_rh_linux64
echo "${script_name}: Set up to use Workbench at ${CARET7DIR}"
echo ""
echo "${script_name}: Setting up HCP Pipelines"
export HCPPIPEDIR=/home/HCPpipeline/pipeline_tools/Pipelines_DeDriftAndResample
export HCPPIPEDIR_Config=${HCPPIPEDIR}/global/config
export HCPPIPEDIR_Global=${HCPPIPEDIR}/global/scripts
export HCPPIPEDIR_Templates=${HCPPIPEDIR}/global/templates
export HCPPIPEDIR_PreFS=${HCPPIPEDIR}/PreFreeSurfer/scripts
export HCPPIPEDIR_FS=${HCPPIPEDIR}/FreeSurfer/scripts
export HCPPIPEDIR_PostFS=${HCPPIPEDIR}/PostFreeSurfer/scripts
export HCPPIPEDIR_fMRISurf=${HCPPIPEDIR}/fMRISurface/scripts
export HCPPIPEDIR_fMRIVol=${HCPPIPEDIR}/fMRIVolume/scripts
export HCPPIPEDIR_dMRI=${HCPPIPEDIR}/DiffusionPreprocessing/scripts
export HCPPIPEDIR_tfMRIAnalysis=${HCPPIPEDIR}/TaskfMRIAnalysis/scripts
export HCPPIPEDIR_FIX=${HCPPIPEDIR}/catalog/FIX_HCP/resources/scripts
echo "${script_name}: Set up to use HCP Pipeline Scripts at ${HCPPIPEDIR}"
export MSMBin=/home/HCPpipeline/pipeline_tools/MSM-2015.01.14-RHEL5
echo "${script_name}: Set up to use MSM binary at ${MSMBin}"
export OCTAVE_HOME=/export/octave-3.6.3
echo "${script_name}: Set up to use Octave at ${OCTAVE_HOME}"
elif [ "${CLUSTER}" = "2.0" ] ; then
echo ""
echo "${script_name}: Setting up for CHPC cluster ${CLUSTER}"
echo ""
echo "${script_name}: Setting up FSL"
export FSLDIR=/act/fsl-5.0.9
source ${FSLDIR}/etc/fslconf/fsl.sh
echo "${script_name}: Set up to use FSL at ${FSLDIR}"
echo ""
echo "${script_name}: Setting up FreeSurfer"
export FSL_DIR="${FSLDIR}"
export FREESURFER_HOME=/act/freesurfer-5.3-HCP
source ${FREESURFER_HOME}/SetUpFreeSurfer.sh
echo "${script_name}: Set up to use FreeSurfer at ${FREESURFER_HOME}"
echo ""
echo "${script_name}: Setting up Python"
export EPD_PYTHON_HOME=${HOME}/export/epd-7.3.2
export PATH=${EPD_PYTHON_HOME}/bin:${PATH}
echo "${script_name}: Set up to use EPD Python at ${EPD_PYTHON_HOME}"
echo ""
echo "${script_name}: Setting up Workbench (a.k.a. CARET7)"
export CARET7DIR=${HOME}/pipeline_tools/workbench-v1.1.1/bin_rh_linux64
echo "${script_name}: Set up to use Workbench at ${CARET7DIR}"
echo ""
echo "${script_name}: Setting up HCP Pipelines"
export HCPPIPEDIR=${HOME}/pipeline_tools/Pipelines_DeDriftAndResample
export HCPPIPEDIR_Config=${HCPPIPEDIR}/global/config
export HCPPIPEDIR_Global=${HCPPIPEDIR}/global/scripts
export HCPPIPEDIR_Templates=${HCPPIPEDIR}/global/templates
export HCPPIPEDIR_PreFS=${HCPPIPEDIR}/PreFreeSurfer/scripts
export HCPPIPEDIR_FS=${HCPPIPEDIR}/FreeSurfer/scripts
export HCPPIPEDIR_PostFS=${HCPPIPEDIR}/PostFreeSurfer/scripts
export HCPPIPEDIR_fMRISurf=${HCPPIPEDIR}/fMRISurface/scripts
export HCPPIPEDIR_fMRIVol=${HCPPIPEDIR}/fMRIVolume/scripts
export HCPPIPEDIR_dMRI=${HCPPIPEDIR}/DiffusionPreprocessing/scripts
export HCPPIPEDIR_tfMRIAnalysis=${HCPPIPEDIR}/TaskfMRIAnalysis/scripts
export HCPPIPEDIR_FIX=${HCPPIPEDIR}/catalog/FIX_HCP/resources/scripts
echo "${script_name}: Set up to use HCP Pipelines at ${HCPPIPEDIR}"
export MSMBin=${HOME}/pipeline_tools/MSM-2015.01.14
echo "${script_name}: Set up to use MSM binary at ${MSMBin}"
export OCTAVE_HOME=/export/octave-3.6.3
echo "${script_name}: Set up to use Octave at ${OCTAVE_HOME}"
else # unhandled value for ${CLUSTER}
echo "${script_name}: Processing set up for cluster ${CLUSTER} is currently not supported."
echo "${script_name}: EXITING WITH NON-ZERO EXIT STATUS (UNSUCCESSFUL EXECUTION)"
exit 1
fi
else # unhandled value for ${COMPUTE}
echo "${script_name}: Processing setup for ${COMPUTE} is currently not supported."
echo "${script_name}: EXITING WITH NON-ZERO EXIT STATUS (UNSUCCESSFUL EXECUTION)"
exit 1
fi