-
Notifications
You must be signed in to change notification settings - Fork 0
/
SetUpHCPPipeline_TaskAnalysis.sh
executable file
·149 lines (114 loc) · 5.14 KB
/
SetUpHCPPipeline_TaskAnalysis.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
145
146
147
148
149
#!/bin/bash
script_name="SetUpHCPpipeline_TaskAnalysis.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.6
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.0/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_dev
# global
export HCPPIPEDIR_Config=${HCPPIPEDIR}/global/config
export HCPPIPEDIR_Global=${HCPPIPEDIR}/global/scripts
export HCPPIPEDIR_Templates=${HCPPIPEDIR}/global/templates
# Structural
export HCPPIPEDIR_PreFS=${HCPPIPEDIR}/PreFreeSurfer/scripts
export HCPPIPEDIR_FS=${HCPPIPEDIR}/FreeSurfer/scripts
export HCPPIPEDIR_PostFS=${HCPPIPEDIR}/PostFreeSurfer/scripts
# Functional
export HCPPIPEDIR_fMRISurf=${HCPPIPEDIR}/fMRISurface/scripts
export HCPPIPEDIR_fMRIVol=${HCPPIPEDIR}/fMRIVolume/scripts
# Diffusion
export HCPPIPEDIR_dMRI=${HCPPIPEDIR}/DiffusionPreprocessing/scripts
# Task Analysis
export HCPPIPEDIR_tfMRIAnalysis=${HCPPIPEDIR}/TaskfMRIAnalysis/scripts
# ICA+FIX
export HCPPIPEDIR_FIX=${HCPPIPEDIR}/catalog/FIX_HCP/resources/scripts
echo "${script_name}: Set up to use HCP Pipeline Scripts at ${HCPPIPEDIR}"
# MSM
export MSMBin=${NRG_PACKAGES}/tools.release/MSMSulc-v1.3-2014.02.10
echo "${script_name}: Set up to use MSM binary at ${MSMBin}"
elif [ "${CLUSTER}" = "2.0" ] ; then
echo ""
echo "${script_name}: Setting up for CHPC cluster ${CLUSTER}"
echo ""
echo "${script_name}: Setting up FSL"
export FSLDIR=/export/HCP/fsl-5.0.6-20150401
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.0-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/HCP/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.0/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_dev
# global
export HCPPIPEDIR_Config=${HCPPIPEDIR}/global/config
export HCPPIPEDIR_Global=${HCPPIPEDIR}/global/scripts
export HCPPIPEDIR_Templates=${HCPPIPEDIR}/global/templates
# Structural
export HCPPIPEDIR_PreFS=${HCPPIPEDIR}/PreFreeSurfer/scripts
export HCPPIPEDIR_FS=${HCPPIPEDIR}/FreeSurfer/scripts
export HCPPIPEDIR_PostFS=${HCPPIPEDIR}/PostFreeSurfer/scripts
# Functional
export HCPPIPEDIR_fMRISurf=${HCPPIPEDIR}/fMRISurface/scripts
export HCPPIPEDIR_fMRIVol=${HCPPIPEDIR}/fMRIVolume/scripts
# Diffusion
export HCPPIPEDIR_dMRI=${HCPPIPEDIR}/DiffusionPreprocessing/scripts
# Task Analysis
export HCPPIPEDIR_tfMRIAnalysis=${HCPPIPEDIR}/TaskfMRIAnalysis/scripts
# ICA+FIX
export HCPPIPEDIR_FIX=${HCPPIPEDIR}/catalog/FIX_HCP/resources/scripts
echo "${script_name}: Set up to use HCP Pipeline Scripts at ${HCPPIPEDIR}"
# MSM
export MSMBin=${NRG_PACKAGES}/tools.release/MSMSulc-v1.3-2014.02.10
echo "${script_name}: Set up to use MSM binary at ${MSMBin}"
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 set up for COMPUTE environment ${COMPUTE} is currently not supported."
echo "${script_name}: EXITING WITH NON-ZERO EXIT STATUS (UNSUCCESSFUL EXECUTION)"
fi