-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sh
executable file
·199 lines (182 loc) · 5.81 KB
/
setup.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
#!/bin/bash
echo How do you connect to GitHub? If you enter your username and password when you pull a private git repository, then answer https, otherwise answer ssh.
echo \(ssh or https\)
read CONN
if [ ! $CONN == "ssh" ] && [ ! $CONN == "https" ]; then
echo Please specify either ssh or https
else
module load anaconda3
module load rh
python3 -m pip install --upgrade pip
python3 -m pip install numpy
python3 -m pip install scipy==1.9
python3 -m pip install matplotlib
python3 -m pip install shapely
python3 -m pip install gitpython
python3 -m pip install statsmodels
python3 -m pip install multipy
python3 -m pip install opencv-python
python3 -m pip install pyqt5
python3 -m pip install ujson
python3 -m pip install scikit-learn
git pull
python3 -m pip install .
cd ..
path_line1="export CPATH=/projects/LEIFER/libraries/include:/projects/LEIFER/libraries/include/vxl/core:/projects/LEIFER/libraries/include/vxl/vcl:\$CPATH"
path_line2="export LD_LIBRARY_PATH=/projects/LEIFER/libraries/lib:\$LD_LIBRARY_PATH"
path_line3="export LIBRARY_PATH=/projects/LEIFER/libraries/lib:\$LIBRARY_PATH"
if ! grep -q "$path_line1" ~/.bashrc; then
echo "export CPATH=/projects/LEIFER/libraries/include:/projects/LEIFER/libraries/include/vxl/core:/projects/LEIFER/libraries/include/vxl/vcl:\$CPATH" >> ~/.bashrc
fi
if ! grep -q "$path_line2" ~/.bashrc; then
echo "export LD_LIBRARY_PATH=/projects/LEIFER/libraries/lib:\$LD_LIBRARY_PATH" >> ~/.bashrc
fi
if ! grep -q "$path_line3" ~/.bashrc; then
echo "export LIBRARY_PATH=/projects/LEIFER/libraries/lib:\$LIBRARY_PATH" >> ~/.bashrc
fi
export CPATH=/projects/LEIFER/libraries/include:/projects/LEIFER/libraries/include/vxl/core:/projects/LEIFER/libraries/include/vxl/vcl:$CPATH
export LD_LIBRARY_PATH=/projects/LEIFER/libraries/lib:$LD_LIBRARY_PATH
export LIBRARY_PATH=/projects/LEIFER/libraries/lib:$LIBRARY_PATH
FILE=multipy
if [ -d "$FILE" ]; then
echo "multipy already there"
else
git clone https://github.com/puolival/multipy.git
cd "$FILE"
python3 -m pip install .
cd ..
fi
FILE=mistofrutta
if [ -d "$FILE" ]; then
cd "$FILE"
git pull
python3 -m pip install .
cd ..
else
if [[ ! $CONN == "https" ]]; then
git clone [email protected]:francescorandi/mistofrutta.git
else
git clone https://github.com/francescorandi/mistofrutta.git
fi
cd "$FILE"
python3 -m pip install .
cd ..
fi
FILE=gmmreg-lw
if [ -d "$FILE" ]; then
cd "$FILE"
git checkout francesco
git pull
module unload rh
python3 -m pip install .
module load rh
cd ..
else
if [[ ! $CONN == "https" ]]; then
git clone [email protected]:leiferlab/gmmreg-lw.git
else
git clone https://github.com/leiferlab/gmmreg-lw.git
fi
cd "$FILE"
git checkout francesco
module unload rh
python3 -m pip install .
module load rh
cd ..
fi
FILE=savitzkygolay
if [ -d "$FILE" ]; then
cd "$FILE"
git pull
python3 -m pip install .
cd ..
else
if [[ ! $CONN == "https" ]]; then
git clone [email protected]:leiferlab/savitzkygolay.git
else
git clone https://github.com/leiferlab/savitzkygolay.git
fi
cd "$FILE"
python3 -m pip install .
cd ..
fi
FILE=fDLC_Neuron_ID
if [ -d "$FILE" ]; then
cd "$FILE"
git pull
python3 -m pip install .
cd ..
else
if [[ ! $CONN == "https" ]]; then
git clone [email protected]:francescorandi/fDLC_Neuron_ID.git
else
git clone https://github.com/francescorandi/fDLC_Neuron_ID.git
fi
cd "$FILE"
python3 -m pip install .
cd ..
fi
FILE=wormbrain
if [ -d "$FILE" ]; then
cd "$FILE"
git pull
git checkout develop
python3 -m pip install .
cd ..
else
if [[ ! $CONN == "https" ]]; then
git clone [email protected]:leiferlab/wormbrain.git
else
git clone https://github.com/leiferlab/wormbrain.git
fi
cd "$FILE"
git checkout develop
python3 -m pip install .
cd ..
fi
FILE=wormdatamodel
if [ -d "$FILE" ]; then
cd "$FILE"
git pull
git checkout develop
python3 -m pip install .
cd ..
else
if [[ ! $CONN == "https" ]]; then
git clone [email protected]:leiferlab/wormdatamodel.git
else
git clone https://github.com/leiferlab/wormdatamodel.git
fi
cd "$FILE"
git checkout develop
python3 -m pip install .
cd ..
fi
FILE=wormneuronsegmentation-c
if [ -d "$FILE" ]; then
cd "$FILE"
git pull
git checkout develop
python3 -m pip install .
cd ..
else
if [[ ! $CONN == "https" ]]; then
git clone [email protected]:leiferlab/wormneuronsegmentation-c.git
else
git clone https://github.com/leiferlab/wormneuronsegmentation-c.git
fi
cd "$FILE"
git checkout develop
python3 -m pip install .
cd ..
fi
echo -----
echo -----
echo -----
echo "You NEED TO copy pumpprobe/fdr.py into the install folder of multipy (fix old Python2 commands)"
echo "e.g. <>/.venv/lib/python3.8/site-packages/multipy if you are using a virtual environment"
echo "or ~/.local/lib/python3.8/site-packages/multipy if you installed the modules in your home folder"
echo -----
echo -----
echo -----
fi