forked from McIntosh-Lab/tvb-ukbb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init_vars
executable file
·130 lines (105 loc) · 6.45 KB
/
init_vars
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
#!/bin/bash
#
# Script name: init_vars
#
# Description: Script to initalise the variables needed for the pipeline.
#
# Authors: Fidel Alfaro-Almagro, Stephen M. Smith & Mark Jenkinson
#
# Copyright 2017 University of Oxford
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###########################################
# #
# USER MUST MODIFY THE INDICATED LINES #
# #
###########################################
# UKBB ROOT DIR LOCATION
export BBDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd ..; pwd )"
#SETUP FSL
export FSLDIR=/opt/fsl #TO BE MODIFIED BY USER (DEFAULT FOR SINGULARITY)
. $FSLDIR/etc/fslconf/fsl.sh
export FSLCONFDIR="${FSLDIR}/config"
export FSLOUTPUTTYPE="NIFTI_GZ"
export FSLGECUDAQ=cuda.q #TO BE MODIFIED BY USER
#TODO implement this in the files
export QUEUE_STANDARD="all.q" #TO BE MODIFIED BY USER
export QUEUE_MORE_MEM="bigmem_16.q" #TO BE MODIFIED BY USER
export QUEUE_MAX_MEM="bigmem_64.q" #TO BE MODIFIED BY USER
#SETUP AFNI
# export AFNIDIR=/opt/afni #TO BE MODIFIED BY USER
export AFNIDIR="/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Compiler/gcc9/afni/20.3.05"
#SETUP FREESURFER
# export FREESURFER_HOME=/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/freesurfer/5.3.0/bin/freesurfer #TO BE MODIFIED BY USER
# if usin on Compute Canada, load module first
source $EBROOTFREESURFER/FreeSurferEnv.sh
# source $FREESURFER_HOME/SetUpFreeSurfer.sh > /dev/null
#SETUP ANTS
export ANTSPATH="/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Compiler/gcc9/ants/2.3.5/bin"
export SOFTDIR="/opt/tvb-pipeline" #TO BE MODIFIED BY USER (DEFAULT FOR SINGULARITY)
# SET UP MATLAB
export MCROOT="/opt/mcr" #TO BE MODIFIED BY USER (DEFAULT FOR SINGULARITY)
export MCRV="v93"
#Move $FSLDIR/bin before $FREESURFER_HOME in the path
FSLDIRseddable=`echo $FSLDIR | sed 's|/|\\\/|g'`
PATH=`echo $PATH | sed "s|$FSLDIR/bin||g"`
export PATH="$FSLDIR/bin:$PATH"
#SETUP EXTERNAL LIBRARIES
export R_LIBS="/usr/lib/R/library" #TO BE MODIFIED BY USER (DEFAULT FOR SINGULARITY)
export R_DIR="/usr/lib/R" #TO BE MODIFIED BY USER (DEFAULT FOR SINGULARITY)
#SET LOCALE FOR FLOATING POINT FORMATTING
export LC_ALL=C
#ENV VARIABLES FOR BIOBANK
export BB_BIN_DIR="$BBDIR/tvb-ukbb"
export FSLGPUDIR="$BB_BIN_DIR/bb_diffusion_pipeline/bb_bedpostx"
#export MNI="$FSLDIR/data/standard/MNI152_T1_1mm.nii.gz"
#export MNI_mask="$FSLDIR/data/standard/MNI152_T1_1mm_brain_mask.nii.gz"
#export MNI_brain="$FSLDIR/data/standard/MNI152_T1_1mm_brain.nii.gz"
#export MNI_dir="$FSLDIR/data/standard"
export templ="$BB_BIN_DIR/templates" #TO BE MODIFIED BY USER
#AGE-SPECIFIC TEMPLATES
export TEMPLATE_BRAIN="nihpd_asym_04.5-08.5_brain.nii.gz" #TO BE MODIFIED BY USER
export TEMPLATE_T1="nihpd_asym_04.5-08.5_t1w.nii.gz" #TO BE MODIFIED BY USER
export TEMPLATE_MASK="nihpd_asym_04.5-08.5_mask.nii.gz" #TO BE MODIFIED BY USER
export TEMPLATE_MASK_dil_1mm="nihpd_asym_04.5-08.5_mask_dil5_1mm_modified.nii.gz" #TO BE MODIFIED BY USER
export TEMPLATE_MASK_dil_2mm="nihpd_asym_04.5-08.5_mask_dil2_2mm.nii.gz" #TO BE MODIFIED BY USER
export TEMPLATE_BRAIN_2mm="nihpd_asym_04.5-08.5_brain_2mm.nii.gz" #TO BE MODIFIED BY USER
export TEMPLATE_T1_2mm="nihpd_asym_04.5-08.5_t1w_2mm.nii.gz" #TO BE MODIFIED BY USER
export TEMPLATE_MASK_2mm="nihpd_asym_04.5-08.5_mask_2mm.nii.gz" #TO BE MODIFIED BY USER
export CEREBELLUM_MASK="cerebellum_to_nihpd_dil1.nii.gz" #TO BE MODIFIED BY USER
export BRAINSTEM_MASK="brainstem_to_nihpd_dil1.nii.gz" #TO BE MODIFIED BY USER
export PYTHONPATH="$SOFTDIR/software/env/bin/python"
export FSL_FIXDIR="$BB_BIN_DIR/bb_functional_pipeline/bb_fix_dir"
export PARC_IMG="$templ/parcellations/TVB_SchaeferTian/TVB_SchaeferTian_220_to_nihpd.nii.gz" #TO BE MODIFIED BY USER
export PARC_LUT="$templ/parcellations/TVB_SchaeferTian/TVB_SchaeferTian_220_LUT.tsv" #TO BE MODIFIED BY USER
#export SUSCEPT_ROIS="$templ/parcellations/TVB_SchaeferTian/SusceptibilityROIs_SchaeferTian_420.nii.gz" #TO BE MODIFIED BY USER
export numROI="220" #TO BE MODIFIED BY USER
export SLICE_TIMING_FILE="$BB_BIN_DIR/bb_data/slice_timing_odd_even.txt" #ADDED FOR SLICE TIMING CORRECTION
export TRAINING_FILE="Calgary_Training.RData" #TO BE MODIFIED BY USER
export SynB0="y" #TO BE MODIFIED BY USER
export PE_direction="0 -1 0" #TO BE MODIFIED BY USER
#export numROI="316" #TO BE MODIFIED BY USER
export topupValue="0.1" #TO BE MODIFIED BY USER - leave empty "" for no value
export topupValue_default="" #TO BE MODIFIED BY USER - leave empty "" for no value
#export EPIfactor="50" #TO BE MODIFIED BY USER
# set to 1 for single shell diffusion data and 2 for multi-shell
export DIFF_SHELL_TYPE="2"
#INCLUDE 3 MAIN BIOBANK DIRECTORIES IN PATH
export PATH="$BB_BIN_DIR/bb_pipeline_tools/:$BB_BIN_DIR/bb_general_tools/:$PATH"
#SET PATH FOR MCR
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$MCROOT/$MCRV/runtime/glnxa64:$MCROOT/$MCRV/bin/glnxa64:$MCROOT/$MCRV/sys/os/glnxa64:$MCROOT/$MCRV/sys/opengl/lib/glnxa64:$LD_LIBRARY_PATH"
export MATLAB_COMPILER_RUNTIME="$MCROOT/$MCRV"
export XAPPLRESDIR="$MCROOT/$MCRV/X11/app-defaults"
# source activate $SOFTDIR/software/env
source activate $SOFTDIR/software/env