Browse code

bash_profile (heron) - v3.4 - Switch from SGE to Slurm

Fred authored on20/12/2025 22:36:07
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 3.3
3
+# Version: 3.4
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2024-12-16
5
+# Modified in: 2025-12-20
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v3.4 - 2025-12-20: switch SGE commands to Slurm commands / remove linuxbrew, system and perl lib paths, aliases
12 13
 # v3.3 - 2024-12-16: switch from miniconda to miniforge
13 14
 # v3.2 - 2022-09-10: add timeout on welcome message
14 15
 # v3.1 - 2021-05-19: updates related to severs and SGE config changes (e.g., queue) / new env variable added
... ...
@@ -49,17 +50,13 @@
49 50
 # Specific aliases #
50 51
 #==================#
51 52
 
52
-alias pqsub='qsub -V -cwd -o $HOME/status -j y -r y -S /bin/bash'
53
-alias pqsubR='qsub -V -cwd -o $HOME/status -j y -r y -S $(which Rscript)'
54
-alias pqrsh='qrsh -V -cwd -q interactive.q -pty y bash -li'
53
+alias psrun='srun --export=ALL --pty --partition=interactive bash -li'
55 54
 alias plocate='locate -d "$mlocate_db"'
56 55
 alias xterm='xterm -bg black -fg white -rightbar -geometry 200x35'
57 56
 
58 57
 [[ $HOSTNAME =~ heron* ]] && alias ssh="ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no"
59 58
 alias zeus='ssh zeus'
60
-alias mendel='ssh mendel'
61
-alias crow='ssh crow'
62
-alias bulmer='ssh bulmer'
59
+alias titan='ssh titan'
63 60
 
64 61
 alias pypm="pypm -g"    # Default parameter for pypm which is a package manager for python
65 62
 alias model_script_sh='cp $HOME/Templates/script.sh $1'
... ...
@@ -94,16 +91,6 @@ export PKG_CONFIG_PATH=$(/usr/bin/pkg-config --variable pc_path pkg-config)
94 91
 # Path variable
95 92
 [[ $SHLVL -eq 1 ]] && export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin:${PATH:+:$PATH}     # Personal path
96 93
 
97
-# Linuxbrew
98
-[[ $SHLVL -eq 1 && -d "$HOME/.linuxbrew" ]] && eval $("$HOME/.linuxbrew/bin/brew" shellenv)
99
-
100
-# Use of personal /lib* if recent OS
101
-# Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
102
-export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$HOME/local/lib:$HOME/local/lib64"
103
-
104
-# Perl
105
-export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto:~/local/lib/perl5/5.18.2:~/local/lib/perl5/site_perl:~/local/lib/perl5/site_perl/5.18.2:~/local/lib/perl5/site_perl/5.18.2/x86_64-linux:~/local/lib/perl5/5.18.2/x86_64-linux:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.8:/usr/lib/perl5/site_perl:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.8:/usr/lib/perl5/vendor_perl:/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/5.8.8
106
-
107 94
 # Python
108 95
 export PYTHONIOENCODING=utf-8
109 96
 
... ...
@@ -134,16 +121,12 @@ export VIMHOME=$HOME/.vim
134 121
 # Biom completion
135 122
 [[ $(which biom &> /dev/null ; echo $?) == 0 ]] && eval "$(_BIOM_COMPLETE=source biom)"
136 123
 
137
-# Linuxbrew completion
138
-[[ -s "$HOME/.linuxbrew/etc/bash_completion.d/brew" ]] && source "$HOME/.linuxbrew/etc/bash_completion.d/brew"
139
-
140
-
141 124
 # SSH environment setup
142 125
 SSH_KEY_LIST="$HOME/.ssh/key_list"  # File with full path of keys (one per line) to load with start_agent
143 126
 [[ -f "$SSH_KEY_LIST" ]] && SSH_KEYS=($(cat $SSH_KEY_LIST))
144 127
 #lifetime="-t 259200" # seconds => 3 days
145 128
 
146
-if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ compute.*) ]]
129
+if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ n[0-9]*) ]]
147 130
 then
148 131
     if [[ -n "$SSH_CONNECTION" ]]
149 132
     then
... ...
@@ -166,7 +149,7 @@ fi
166 149
 
167 150
 # Display forwarding
168 151
 # dependency: proxy-dsiplay
169
-if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ zeus* || $HOSTNAME =~ compute.*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
152
+if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ zeus* || $HOSTNAME =~ n[0-9]*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
170 153
 then
171 154
     proxy-display :99
172 155
 fi
... ...
@@ -204,13 +187,13 @@ name=${HOSTNAME%%.*}
204 187
 nb=$(printf "%${#name}s\n" "" | sed "s/ /=/g")
205 188
 
206 189
 # Server message
207
-if [[ ! $HOSTNAME =~ compute.* && -z $STY && -z $LC_STY ]]
190
+if [[ ! $HOSTNAME =~ n[0-9]* && -z $STY && -z $LC_STY ]]
208 191
 then
209 192
     bash .welcome.msg
210 193
 fi
211 194
 
212 195
 # Info on disk space and cores
213
-if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ compute.*) && (-z $LC_STY || $LC_STY != 1) ]]
196
+if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ n[0-9].*) && (-z $LC_STY || $LC_STY != 1) ]]
214 197
 then
215 198
     mydisk="/master"
216 199
     dspace=$(timeout 5s df -h 2> /dev/null)
... ...
@@ -227,7 +210,7 @@ then
227 210
 
228 211
     if [[ ($name == "zeus") && (-z $LC_STY || $LC_STY != 1) ]]
229 212
     then
230
-        cores=$(timeout 5s qstat -g c)
213
+        cores=$(timeout 5s sinfo -o "%P|%a|%l|%D|%t|%C" | column -t -s "|")
231 214
         echo -e "\033[33mCores available:\033[00m\n"
232 215
         echo -e "$cores\n"
233 216
     fi
Browse code

bash_profile (heron) - v3.3 - Switch from miniconda to miniforge

Fred authored on16/12/2024 20:18:41
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 3.2
3
+# Version: 3.3
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2022-09-10
5
+# Modified in: 2024-12-16
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v3.3 - 2024-12-16: switch from miniconda to miniforge
12 13
 # v3.2 - 2022-09-10: add timeout on welcome message
13 14
 # v3.1 - 2021-05-19: updates related to severs and SGE config changes (e.g., queue) / new env variable added
14 15
 # v3.0 - 2020-03-01: Linuxbrew added / Miniconda added / some Python env variables removed / R env variables removed / PATH setup improved / misc updates
... ...
@@ -120,8 +121,8 @@ export CONSED_HOME=~/local/bin/consed.d
120 121
 # Vim
121 122
 export VIMHOME=$HOME/.vim
122 123
 
123
-# Miniconda
124
-[[ -d "$HOME/.miniconda3" ]] && source "$HOME/.miniconda3/etc/profile.d/conda.sh"
124
+# Miniforge
125
+[[ -d "$HOME/.miniforge3" ]] && source "$HOME/.miniforge3/etc/profile.d/conda.sh"
125 126
 [[ -n $CONDA_DEFAULT_ENV ]]  && conda activate $CONDA_DEFAULT_ENV
126 127
 
127 128
 # OPAM completion
Browse code

bash_profile (heron) - v3.2 - Add timeout on welcome message

Fred authored on09/09/2022 22:18:40
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 3.1
3
+# Version: 3.2
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2021-05-19
5
+# Modified in: 2022-09-10
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v3.2 - 2022-09-10: add timeout on welcome message
12 13
 # v3.1 - 2021-05-19: updates related to severs and SGE config changes (e.g., queue) / new env variable added
13 14
 # v3.0 - 2020-03-01: Linuxbrew added / Miniconda added / some Python env variables removed / R env variables removed / PATH setup improved / misc updates
14 15
 # v2.3 - 2019-03-10: alias updated / R hack for medusa2 added / no ssh key usage or storage for heron
... ...
@@ -211,19 +212,24 @@ fi
211 212
 if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ compute.*) && (-z $LC_STY || $LC_STY != 1) ]]
212 213
 then
213 214
     mydisk="/master"
214
-    echo ""
215
-    for i in $mydisk
216
-    do
217
-        [[ ! $(df -h 2> /dev/null | grep "$i ") ]] && continue
218
-        echo -e "\033[33mSpace available on $i [% Used/Total/Free]:\033[00m $(df -h 2> /dev/null | grep "$i " | awk '{print $5" / "$2" / "$4}')"
219
-    done
220
-    echo ""
215
+    dspace=$(timeout 5s df -h 2> /dev/null)
216
+    if [[ -n "$dspace" ]]
217
+    then
218
+        echo ""
219
+        for i in $mydisk
220
+        do
221
+            [[ ! $(grep "$i " <<< "$dspace") ]] && continue
222
+            echo -e "\033[33mSpace available on $i [% Used/Total/Free]:\033[00m $(grep "$i " <<< "$dspace" | awk '{print $5" / "$2" / "$4}' | head -n 1)"
223
+        done
224
+        echo ""
225
+    fi
221 226
 
222 227
     if [[ ($name == "zeus") && (-z $LC_STY || $LC_STY != 1) ]]
223 228
     then
229
+        cores=$(timeout 5s qstat -g c)
224 230
         echo -e "\033[33mCores available:\033[00m\n"
225
-        qstat -g c
226
-        echo -e "\n"
231
+        echo -e "$cores\n"
227 232
     fi
228 233
 fi
229 234
 
235
+unset dspace
Browse code

bash_profile (heron) - v3.1 - See Versions section for details

Fred authored on19/05/2021 20:59:09
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 3.0
3
+# Version: 3.1
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2020-03-01
5
+# Modified in: 2021-05-19
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v3.1 - 2021-05-19: updates related to severs and SGE config changes (e.g., queue) / new env variable added
12 13
 # v3.0 - 2020-03-01: Linuxbrew added / Miniconda added / some Python env variables removed / R env variables removed / PATH setup improved / misc updates
13 14
 # v2.3 - 2019-03-10: alias updated / R hack for medusa2 added / no ssh key usage or storage for heron
14 15
 # v2.2 - 2017-04-23: server name updated / SSH connection through screen improved / welcome message improved
... ...
@@ -48,13 +49,12 @@
48 49
 
49 50
 alias pqsub='qsub -V -cwd -o $HOME/status -j y -r y -S /bin/bash'
50 51
 alias pqsubR='qsub -V -cwd -o $HOME/status -j y -r y -S $(which Rscript)'
51
-alias pqrsh='qrsh -V -cwd -pty y bash -li'
52
+alias pqrsh='qrsh -V -cwd -q interactive.q -pty y bash -li'
52 53
 alias plocate='locate -d "$mlocate_db"'
53 54
 alias xterm='xterm -bg black -fg white -rightbar -geometry 200x35'
54 55
 
55 56
 [[ $HOSTNAME =~ heron* ]] && alias ssh="ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no"
56
-alias medusa2='ssh medusa2'
57
-alias perseus='ssh perseus'
57
+alias zeus='ssh zeus'
58 58
 alias mendel='ssh mendel'
59 59
 alias crow='ssh crow'
60 60
 alias bulmer='ssh bulmer'
... ...
@@ -86,27 +86,18 @@ bind 'set show-all-if-unmodified off'
86 86
 # Paths #
87 87
 #-------#
88 88
 
89
+# Package config
90
+export PKG_CONFIG_PATH=$(/usr/bin/pkg-config --variable pc_path pkg-config)
91
+
89 92
 # Path variable
90
-[[ $SHLVL -eq 1 ]] && export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin:$PATH     # Personal path
93
+[[ $SHLVL -eq 1 ]] && export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin:${PATH:+:$PATH}     # Personal path
91 94
 
92 95
 # Linuxbrew
93 96
 [[ $SHLVL -eq 1 && -d "$HOME/.linuxbrew" ]] && eval $("$HOME/.linuxbrew/bin/brew" shellenv)
94 97
 
95 98
 # Use of personal /lib* if recent OS
96 99
 # Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
97
-export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib:$HOME/local/lib64"
98
-
99
-# Special paths for perseus, medusa and nodes
100
-if [[ $HOSTNAME =~ perseus* || $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.* ]]
101
-then
102
-    # System path
103
-    export PATH=$PATH:/opt/openmpi/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin:/opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/lx26-amd64:/usr/bin:/usr/local/bin:/bin:/usr/java/latest/bin
104
-    # Grid Engine path
105
-    export PATH=$PATH:/opt/gridengine/bin/linux-x64
106
-    # R
107
-    echo -e "\n\e[33mWarning:\e[00m Hard alias for R. If not needed, please edit .bash_profile.\n"
108
-    alias R="$HOME/local/pckg/R-3.3.1/bin/R"
109
-fi
100
+export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$HOME/local/lib:$HOME/local/lib64"
110 101
 
111 102
 # Perl
112 103
 export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto:~/local/lib/perl5/5.18.2:~/local/lib/perl5/site_perl:~/local/lib/perl5/site_perl/5.18.2:~/local/lib/perl5/site_perl/5.18.2/x86_64-linux:~/local/lib/perl5/5.18.2/x86_64-linux:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.8:/usr/lib/perl5/site_perl:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.8:/usr/lib/perl5/vendor_perl:/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/5.8.8
... ...
@@ -173,7 +164,7 @@ fi
173 164
 
174 165
 # Display forwarding
175 166
 # dependency: proxy-dsiplay
176
-if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ perseus* || $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
167
+if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ zeus* || $HOSTNAME =~ compute.*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
177 168
 then
178 169
     proxy-display :99
179 170
 fi
... ...
@@ -219,7 +210,7 @@ fi
219 210
 # Info on disk space and cores
220 211
 if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ compute.*) && (-z $LC_STY || $LC_STY != 1) ]]
221 212
 then
222
-    mydisk="/master /data"
213
+    mydisk="/master"
223 214
     echo ""
224 215
     for i in $mydisk
225 216
     do
... ...
@@ -228,7 +219,7 @@ then
228 219
     done
229 220
     echo ""
230 221
 
231
-    if [[ ($name == "perseus" || $name == "medusa2") && (-z $LC_STY || $LC_STY != 1) ]]
222
+    if [[ ($name == "zeus") && (-z $LC_STY || $LC_STY != 1) ]]
232 223
     then
233 224
         echo -e "\033[33mCores available:\033[00m\n"
234 225
         qstat -g c
Browse code

bash_profile (heron) - v3.0 - See Versions section for details

Fred authored on01/03/2020 22:04:11
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 2.3
3
+# Version: 3.0
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2019-03-10
5
+# Modified in: 2020-03-01
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v3.0 - 2020-03-01: Linuxbrew added / Miniconda added / some Python env variables removed / R env variables removed / PATH setup improved / misc updates
12 13
 # v2.3 - 2019-03-10: alias updated / R hack for medusa2 added / no ssh key usage or storage for heron
13 14
 # v2.2 - 2017-04-23: server name updated / SSH connection through screen improved / welcome message improved
14 15
 # v2.1 - 2016-07-25: bug about space corrected / exit if not interactive (due to Grid Engine)
... ...
@@ -37,10 +38,7 @@
37 38
 [[ -z "$PS1" ]] && return
38 39
 
39 40
 # Load bashrc file
40
-if [[ -f ~/.bashrc ]]
41
-then
42
-	source ~/.bashrc
43
-fi
41
+[[ -f ~/.bashrc ]] && source ~/.bashrc
44 42
 
45 43
 
46 44
 
... ...
@@ -89,14 +87,14 @@ bind 'set show-all-if-unmodified off'
89 87
 #-------#
90 88
 
91 89
 # Path variable
92
-export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin:$PATH     # Personal path
90
+[[ $SHLVL -eq 1 ]] && export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin:$PATH     # Personal path
91
+
92
+# Linuxbrew
93
+[[ $SHLVL -eq 1 && -d "$HOME/.linuxbrew" ]] && eval $("$HOME/.linuxbrew/bin/brew" shellenv)
93 94
 
94 95
 # Use of personal /lib* if recent OS
95
-if [[ $(lsb_release -r 2> /dev/null | cut -f 2) > 6.4 || $(grep -i "version_id" /etc/os-release 2> /dev/null | cut -d "\"" -f 2) > 6.4 ]]
96
-then
97
-    # Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
98
-    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib:$HOME/local/lib64"
99
-fi
96
+# Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
97
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib:$HOME/local/lib64"
100 98
 
101 99
 # Special paths for perseus, medusa and nodes
102 100
 if [[ $HOSTNAME =~ perseus* || $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.* ]]
... ...
@@ -114,10 +112,7 @@ fi
114 112
 export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto:~/local/lib/perl5/5.18.2:~/local/lib/perl5/site_perl:~/local/lib/perl5/site_perl/5.18.2:~/local/lib/perl5/site_perl/5.18.2/x86_64-linux:~/local/lib/perl5/5.18.2/x86_64-linux:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.8:/usr/lib/perl5/site_perl:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.8:/usr/lib/perl5/vendor_perl:/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/5.8.8
115 113
 
116 114
 # Python
117
-python_version=$(python --version 2>&1 | cut -d " " -f2 | cut -d "." -f -2)
118
-export PYTHONPATH=$HOME/local/lib/python${python_version}/site-packages
119 115
 export PYTHONIOENCODING=utf-8
120
-unset python_version
121 116
 
122 117
 
123 118
 #----------#
... ...
@@ -133,20 +128,12 @@ export CONSED_HOME=~/local/bin/consed.d
133 128
 # Vim
134 129
 export VIMHOME=$HOME/.vim
135 130
 
136
-# R
137
-R_version=$(R --version | head -1 | cut -d " " -f 3)
138
-export R_LIBS_HOME="$HOME/.R-libs"
139
-
140
-if [[ ! -d "${R_LIBS_HOME}/${R_version}" ]]
141
-then
142
-    mkdir "${R_LIBS_HOME}/${R_version}"
143
-fi
144
-
145
-export R_LIBS="${R_LIBS_HOME}/${R_version}"
146
-
131
+# Miniconda
132
+[[ -d "$HOME/.miniconda3" ]] && source "$HOME/.miniconda3/etc/profile.d/conda.sh"
133
+[[ -n $CONDA_DEFAULT_ENV ]]  && conda activate $CONDA_DEFAULT_ENV
147 134
 
148 135
 # OPAM completion
149
-source $HOME/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
136
+[[ $SHLVL -eq 1 ]] && source $HOME/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
150 137
 
151 138
 # Git completion
152 139
 [[ -s "/etc/bash_completion.d/git" ]] && source /etc/bash_completion.d/git
... ...
@@ -154,6 +141,9 @@ source $HOME/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
154 141
 # Biom completion
155 142
 [[ $(which biom &> /dev/null ; echo $?) == 0 ]] && eval "$(_BIOM_COMPLETE=source biom)"
156 143
 
144
+# Linuxbrew completion
145
+[[ -s "$HOME/.linuxbrew/etc/bash_completion.d/brew" ]] && source "$HOME/.linuxbrew/etc/bash_completion.d/brew"
146
+
157 147
 
158 148
 # SSH environment setup
159 149
 SSH_KEY_LIST="$HOME/.ssh/key_list"  # File with full path of keys (one per line) to load with start_agent
Browse code

bash_profile (heron) - v2.3 - See Versions section for details

Fred authored on10/03/2019 22:28:44
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 2.2
3
+# Version: 2.3
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2017-04-23
5
+# Modified in: 2019-03-10
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v2.3 - 2019-03-10: alias updated / R hack for medusa2 added / no ssh key usage or storage for heron
12 13
 # v2.2 - 2017-04-23: server name updated / SSH connection through screen improved / welcome message improved
13 14
 # v2.1 - 2016-07-25: bug about space corrected / exit if not interactive (due to Grid Engine)
14 15
 # v2.0 - 2016-06-12: PATH setup improved / start_agent with multikey management / start_agent calling improved / screen behaviour added / welcome message improved / alias updated
... ...
@@ -53,7 +54,8 @@ alias pqrsh='qrsh -V -cwd -pty y bash -li'
53 54
 alias plocate='locate -d "$mlocate_db"'
54 55
 alias xterm='xterm -bg black -fg white -rightbar -geometry 200x35'
55 56
 
56
-alias medusa='ssh medusa'
57
+[[ $HOSTNAME =~ heron* ]] && alias ssh="ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no"
58
+alias medusa2='ssh medusa2'
57 59
 alias perseus='ssh perseus'
58 60
 alias mendel='ssh mendel'
59 61
 alias crow='ssh crow'
... ...
@@ -80,6 +82,7 @@ export LC_NUMERIC=en_US.UTF-8   # To always have . as decimal separator
80 82
 export LC_NAME=en_US.UTF-8
81 83
 LC_ALL=
82 84
 
85
+bind 'set show-all-if-unmodified off'
83 86
 
84 87
 #-------#
85 88
 # Paths #
... ...
@@ -102,6 +105,9 @@ then
102 105
     export PATH=$PATH:/opt/openmpi/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin:/opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/lx26-amd64:/usr/bin:/usr/local/bin:/bin:/usr/java/latest/bin
103 106
     # Grid Engine path
104 107
     export PATH=$PATH:/opt/gridengine/bin/linux-x64
108
+    # R
109
+    echo -e "\n\e[33mWarning:\e[00m Hard alias for R. If not needed, please edit .bash_profile.\n"
110
+    alias R="$HOME/local/pckg/R-3.3.1/bin/R"
105 111
 fi
106 112
 
107 113
 # Perl
... ...
@@ -154,7 +160,7 @@ SSH_KEY_LIST="$HOME/.ssh/key_list"  # File with full path of keys (one per line)
154 160
 [[ -f "$SSH_KEY_LIST" ]] && SSH_KEYS=($(cat $SSH_KEY_LIST))
155 161
 #lifetime="-t 259200" # seconds => 3 days
156 162
 
157
-if [[ ! $HOSTNAME =~ compute.* ]]
163
+if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ compute.*) ]]
158 164
 then
159 165
     if [[ -n "$SSH_CONNECTION" ]]
160 166
     then
... ...
@@ -177,7 +183,7 @@ fi
177 183
 
178 184
 # Display forwarding
179 185
 # dependency: proxy-dsiplay
180
-if [[ ! ($HOSTNAME =~ perseus* || $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
186
+if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ perseus* || $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
181 187
 then
182 188
     proxy-display :99
183 189
 fi
Browse code

Bash profile (heron) improved

bash_profile (heron) - v2.2 - see Versions section for details
welcome.msg updated

Fred authored on23/04/2017 23:04:10
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 2.1
3
+# Version: 2.2
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2016-07-25
5
+# Modified in: 2017-04-23
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v2.2 - 2017-04-23: server name updated / SSH connection through screen improved / welcome message improved
12 13
 # v2.1 - 2016-07-25: bug about space corrected / exit if not interactive (due to Grid Engine)
13 14
 # v2.0 - 2016-06-12: PATH setup improved / start_agent with multikey management / start_agent calling improved / screen behaviour added / welcome message improved / alias updated
14 15
 # v1.10 - 2015-08-17: Python lib adapted to the current version of Python / Consed env variable added / plocate updated to handle several db / pypm alias added / library path updated
... ...
@@ -53,7 +54,7 @@ alias plocate='locate -d "$mlocate_db"'
53 54
 alias xterm='xterm -bg black -fg white -rightbar -geometry 200x35'
54 55
 
55 56
 alias medusa='ssh medusa'
56
-alias medusa2='ssh medusa2'
57
+alias perseus='ssh perseus'
57 58
 alias mendel='ssh mendel'
58 59
 alias crow='ssh crow'
59 60
 alias bulmer='ssh bulmer'
... ...
@@ -88,14 +89,14 @@ LC_ALL=
88 89
 export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin:$PATH     # Personal path
89 90
 
90 91
 # Use of personal /lib* if recent OS
91
-if [[ $HOSTNAME != heron* && $(lsb_release -r | cut -f 2) > 6.4 ]]
92
+if [[ $(lsb_release -r 2> /dev/null | cut -f 2) > 6.4 || $(grep -i "version_id" /etc/os-release 2> /dev/null | cut -d "\"" -f 2) > 6.4 ]]
92 93
 then
93 94
     # Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
94 95
     export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib:$HOME/local/lib64"
95 96
 fi
96 97
 
97
-# Special paths for medusa and nodes
98
-if [[ $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.* ]]
98
+# Special paths for perseus, medusa and nodes
99
+if [[ $HOSTNAME =~ perseus* || $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.* ]]
99 100
 then
100 101
     # System path
101 102
     export PATH=$PATH:/opt/openmpi/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin:/opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/lx26-amd64:/usr/bin:/usr/local/bin:/bin:/usr/java/latest/bin
... ...
@@ -137,6 +138,17 @@ fi
137 138
 
138 139
 export R_LIBS="${R_LIBS_HOME}/${R_version}"
139 140
 
141
+
142
+# OPAM completion
143
+source $HOME/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
144
+
145
+# Git completion
146
+[[ -s "/etc/bash_completion.d/git" ]] && source /etc/bash_completion.d/git
147
+
148
+# Biom completion
149
+[[ $(which biom &> /dev/null ; echo $?) == 0 ]] && eval "$(_BIOM_COMPLETE=source biom)"
150
+
151
+
140 152
 # SSH environment setup
141 153
 SSH_KEY_LIST="$HOME/.ssh/key_list"  # File with full path of keys (one per line) to load with start_agent
142 154
 [[ -f "$SSH_KEY_LIST" ]] && SSH_KEYS=($(cat $SSH_KEY_LIST))
... ...
@@ -165,37 +177,32 @@ fi
165 177
 
166 178
 # Display forwarding
167 179
 # dependency: proxy-dsiplay
168
-if [[ ! ($HOSTNAME =~ medusa* || $HOSTNAME =~ compute.*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
180
+if [[ ! ($HOSTNAME =~ perseus* || $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
169 181
 then
170 182
     proxy-display :99
171 183
 fi
172 184
 
173 185
 # Improvement of screen usage (prevent screen session withing screen session)
174
-if [[ -n $STY || -f /tmp/${USER}_sty.lock ]]
186
+if [[ -n $STY || -n $LC_STY ]]
175 187
 then
176
-    # Create a screen lock with level of screen
177
-    if [[ -f /tmp/${USER}_sty.lock ]]
188
+    # Create a screen variable with level of screen
189
+    if [[ -z $LC_STY ]]
178 190
     then
179
-        export LC_STY=$(($(cat /tmp/${USER}_sty.lock) + 1))
180
-    else
181 191
         export LC_STY=1
182 192
     fi
183 193
 
184 194
     # ssh function to change the behaviour of ssh
185 195
     function ssh {
186
-        /usr/bin/ssh $@ "echo $LC_STY > /tmp/${USER}_sty.lock" &&
187
-        /usr/bin/ssh -t $@ "cd \"$PWD\" && exec $SHELL -l"
196
+        /usr/bin/ssh -t $@ "export LC_STY=$(($LC_STY + 1)) && cd \"$PWD\" && exec $SHELL -l"
188 197
     }
189 198
 
190 199
     # Alias updated
191 200
     for i in $(alias | grep "screen" | cut -d " " -f 2 | cut -d "=" -f 1)
192 201
     do
193
-        eval "alias $i=\"echo You are already running in a screen session.\""
202
+        eval "alias $i=\"echo You are already in a screen session.\""
194 203
     done
195 204
 
196 205
     [[ $LC_STY -gt 1 ]] && function screen { echo -e "This would start a within screen session. This is not recommanded. But if you need it, call $(which screen)." ; }
197
-
198
-    [[ -f /tmp/${USER}_sty.lock ]] && rm /tmp/${USER}_sty.lock
199 206
 fi
200 207
 
201 208
 
... ...
@@ -210,10 +217,7 @@ nb=$(printf "%${#name}s\n" "" | sed "s/ /=/g")
210 217
 # Server message
211 218
 if [[ ! $HOSTNAME =~ compute.* && -z $STY && -z $LC_STY ]]
212 219
 then
213
-    nb=$nb=======
214
-    echo -e "\n\n"
215
-    cat .welcome.msg | sed "s/HOSTNAME/$(echo $name Server | sed "s/^[m,h]/\U&/")/" | sed "s/=\*/$nb/g"
216
-    echo -e "\n"
220
+    bash .welcome.msg
217 221
 fi
218 222
 
219 223
 # Info on disk space and cores
... ...
@@ -224,11 +228,11 @@ then
224 228
     for i in $mydisk
225 229
     do
226 230
         [[ ! $(df -h 2> /dev/null | grep "$i ") ]] && continue
227
-        echo -e "\033[33mSpace available on $i [%/Total/free]:\033[00m $(df -h 2> /dev/null | grep "$i " | awk '{print $5" / "$2" / "$4}')"
231
+        echo -e "\033[33mSpace available on $i [% Used/Total/Free]:\033[00m $(df -h 2> /dev/null | grep "$i " | awk '{print $5" / "$2" / "$4}')"
228 232
     done
229 233
     echo ""
230 234
 
231
-    if [[ ($name == "medusa" || $name == "medusa2") && (-z $LC_STY || $LC_STY != 1) ]]
235
+    if [[ ($name == "perseus" || $name == "medusa2") && (-z $LC_STY || $LC_STY != 1) ]]
232 236
     then
233 237
         echo -e "\033[33mCores available:\033[00m\n"
234 238
         qstat -g c
Browse code

bash_profile (heron) - v2.1 - Correct bugs

Fred authored on26/07/2016 14:36:30
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 2.0
3
+# Version: 2.1
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2016-06-12
5
+# Modified in: 2016-07-25
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v2.1 - 2016-07-25: bug about space corrected / exit if not interactive (due to Grid Engine)
12 13
 # v2.0 - 2016-06-12: PATH setup improved / start_agent with multikey management / start_agent calling improved / screen behaviour added / welcome message improved / alias updated
13 14
 # v1.10 - 2015-08-17: Python lib adapted to the current version of Python / Consed env variable added / plocate updated to handle several db / pypm alias added / library path updated
14 15
 # v1.9 - 2015-04-20: Python env variable added / alias updated
... ...
@@ -29,6 +30,11 @@
29 30
 # Get the aliases and functions #
30 31
 #===============================#
31 32
 
33
+# If not running interactively, don't do anything
34
+## Required because Grid Engine runs any shell as login shell by default leading to unwanted messages in the job status
35
+[[ -z "$PS1" ]] && return
36
+
37
+# Load bashrc file
32 38
 if [[ -f ~/.bashrc ]]
33 39
 then
34 40
 	source ~/.bashrc
... ...
@@ -134,7 +140,7 @@ export R_LIBS="${R_LIBS_HOME}/${R_version}"
134 140
 # SSH environment setup
135 141
 SSH_KEY_LIST="$HOME/.ssh/key_list"  # File with full path of keys (one per line) to load with start_agent
136 142
 [[ -f "$SSH_KEY_LIST" ]] && SSH_KEYS=($(cat $SSH_KEY_LIST))
137
-lifetime=259200 # seconds => 3 days
143
+#lifetime="-t 259200" # seconds => 3 days
138 144
 
139 145
 if [[ ! $HOSTNAME =~ compute.* ]]
140 146
 then
... ...
@@ -149,10 +155,10 @@ then
149 155
             if [[ $(ssh-add -l &> /dev/null; echo $?) != 0 ]]
150 156
             then
151 157
                 pkill -u $USER ssh-agent
152
-                eval start_agent -t $lifetime ${SSH_KEYS[@]}
158
+                eval start_agent $lifetime ${SSH_KEYS[@]}
153 159
             fi
154 160
         else
155
-            eval start_agent -t $lifetime ${SSH_KEYS[@]}
161
+            eval start_agent $lifetime ${SSH_KEYS[@]}
156 162
         fi
157 163
     fi
158 164
 fi
... ...
@@ -211,7 +217,7 @@ then
211 217
 fi
212 218
 
213 219
 # Info on disk space and cores
214
-if [[ $name != "heron" && (-z $LC_STY || $LC_STY != 1) ]]
220
+if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ compute.*) && (-z $LC_STY || $LC_STY != 1) ]]
215 221
 then
216 222
     mydisk="/master /data"
217 223
     echo ""
Browse code

bash_profile (heron) - v2.0 - Behavior improved & updates

Improvements of PATH setup, start_agent calling and ssh multikey management, screen behavior

Fred authored on12/06/2016 23:29:13
Showing1 changed files
... ...
@@ -1,18 +1,19 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 1.10
3
+# Version: 2.0
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2015-08-17
5
+# Modified in: 2016-06-12
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v2.0 - 2016-06-12: PATH setup improved / start_agent with multikey management / start_agent calling improved / screen behaviour added / welcome message improved / alias updated
12 13
 # v1.10 - 2015-08-17: Python lib adapted to the current version of Python / Consed env variable added / plocate updated to handle several db / pypm alias added / library path updated
13 14
 # v1.9 - 2015-04-20: Python env variable added / alias updated
14 15
 # v1.8 - 2014-12-02: proxy-display added (resolve $DISPLAY problem with screen)
15
-# v1.7 - 2014-10-22: alias added / conditional modification of PATH and Ld_LIBRARY_PATH to be able to use eog and evince on other server (crow, ...)
16
+# v1.7 - 2014-10-22: alias added / conditional modification of PATH and LD_LIBRARY_PATH to be able to use eog and evince on other server (crow, ...)
16 17
 # v1.6 - 2014-10-15: alias added / LC* added / LS_COLORS removed / PATH updated / LD_LIBRARY_PATH updated
17 18
 # v1.5 - 2014-09-30: improve screen session detection to print welcome message at server connection even if screen session is running elsewhere
18 19
 # v1.4 - 2014-08-14: adapt behavior of the start screen regarding the screen program
... ...
@@ -45,11 +46,11 @@ alias pqrsh='qrsh -V -cwd -pty y bash -li'
45 46
 alias plocate='locate -d "$mlocate_db"'
46 47
 alias xterm='xterm -bg black -fg white -rightbar -geometry 200x35'
47 48
 
48
-alias medusa='ssh -Y medusa'
49
-alias medusa2='ssh -Y medusa2'
50
-alias mendel='ssh -Y mendel'
51
-alias crow='ssh -Y crow'
52
-alias bulmer='ssh -Y bulmer'
49
+alias medusa='ssh medusa'
50
+alias medusa2='ssh medusa2'
51
+alias mendel='ssh mendel'
52
+alias crow='ssh crow'
53
+alias bulmer='ssh bulmer'
53 54
 
54 55
 alias pypm="pypm -g"    # Default parameter for pypm which is a package manager for python
55 56
 alias model_script_sh='cp $HOME/Templates/script.sh $1'
... ...
@@ -78,9 +79,25 @@ LC_ALL=
78 79
 #-------#
79 80
 
80 81
 # Path variable
81
-export PATH=:$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin:$PATH     # Personal path
82
+export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin:$PATH     # Personal path
82 83
 
83
-# Perl variables
84
+# Use of personal /lib* if recent OS
85
+if [[ $HOSTNAME != heron* && $(lsb_release -r | cut -f 2) > 6.4 ]]
86
+then
87
+    # Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
88
+    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib:$HOME/local/lib64"
89
+fi
90
+
91
+# Special paths for medusa and nodes
92
+if [[ $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.* ]]
93
+then
94
+    # System path
95
+    export PATH=$PATH:/opt/openmpi/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin:/opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/lx26-amd64:/usr/bin:/usr/local/bin:/bin:/usr/java/latest/bin
96
+    # Grid Engine path
97
+    export PATH=$PATH:/opt/gridengine/bin/linux-x64
98
+fi
99
+
100
+# Perl
84 101
 export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto:~/local/lib/perl5/5.18.2:~/local/lib/perl5/site_perl:~/local/lib/perl5/site_perl/5.18.2:~/local/lib/perl5/site_perl/5.18.2/x86_64-linux:~/local/lib/perl5/5.18.2/x86_64-linux:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.8:/usr/lib/perl5/site_perl:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.8:/usr/lib/perl5/vendor_perl:/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/5.8.8
85 102
 
86 103
 # Python
... ...
@@ -89,18 +106,6 @@ export PYTHONPATH=$HOME/local/lib/python${python_version}/site-packages
89 106
 export PYTHONIOENCODING=utf-8
90 107
 unset python_version
91 108
 
92
-# Special paths for medusa and nodes
93
-if [[ $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.* ]]
94
-then
95
-    # Path variable
96
-    export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin     # Personal path
97
-    export PATH=$PATH:/opt/openmpi/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin:/opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/lx26-amd64:/usr/bin:/usr/local/bin:/bin:/usr/java/latest/bin # System path
98
-    export PATH=$PATH:/opt/gridengine/bin/linux-x64 # System path needed for the new medusa
99
-
100
-    # Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
101
-    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib:$HOME/local/lib64" # Otherwise pb with heron  #:$LD_LIBRARY_PATH"
102
-fi
103
-
104 109
 
105 110
 #----------#
106 111
 # Programs #
... ...
@@ -127,18 +132,27 @@ fi
127 132
 export R_LIBS="${R_LIBS_HOME}/${R_version}"
128 133
 
129 134
 # SSH environment setup
135
+SSH_KEY_LIST="$HOME/.ssh/key_list"  # File with full path of keys (one per line) to load with start_agent
136
+[[ -f "$SSH_KEY_LIST" ]] && SSH_KEYS=($(cat $SSH_KEY_LIST))
137
+lifetime=259200 # seconds => 3 days
138
+
130 139
 if [[ ! $HOSTNAME =~ compute.* ]]
131 140
 then
132 141
     if [[ -n "$SSH_CONNECTION" ]]
133 142
     then
134 143
         # Source SSH settings, if applicable
144
+        # Loading keys
135 145
         if [[ -f "${SSH_ENV}" ]]
136 146
         then
137
-            source "${SSH_ENV}" > /dev/null
138
-            #ps ${SSH_AGENT_PID} doesn't work under cywgin
139
-            ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || start_agent
140
-        else    
141
-            start_agent
147
+            source "$SSH_ENV"
148
+            # Check if the ssh key is still stored
149
+            if [[ $(ssh-add -l &> /dev/null; echo $?) != 0 ]]
150
+            then
151
+                pkill -u $USER ssh-agent
152
+                eval start_agent -t $lifetime ${SSH_KEYS[@]}
153
+            fi
154
+        else
155
+            eval start_agent -t $lifetime ${SSH_KEYS[@]}
142 156
         fi
143 157
     fi
144 158
 fi
... ...
@@ -150,6 +164,34 @@ then
150 164
     proxy-display :99
151 165
 fi
152 166
 
167
+# Improvement of screen usage (prevent screen session withing screen session)
168
+if [[ -n $STY || -f /tmp/${USER}_sty.lock ]]
169
+then
170
+    # Create a screen lock with level of screen
171
+    if [[ -f /tmp/${USER}_sty.lock ]]
172
+    then
173
+        export LC_STY=$(($(cat /tmp/${USER}_sty.lock) + 1))
174
+    else
175
+        export LC_STY=1
176
+    fi
177
+
178
+    # ssh function to change the behaviour of ssh
179
+    function ssh {
180
+        /usr/bin/ssh $@ "echo $LC_STY > /tmp/${USER}_sty.lock" &&
181
+        /usr/bin/ssh -t $@ "cd \"$PWD\" && exec $SHELL -l"
182
+    }
183
+
184
+    # Alias updated
185
+    for i in $(alias | grep "screen" | cut -d " " -f 2 | cut -d "=" -f 1)
186
+    do
187
+        eval "alias $i=\"echo You are already running in a screen session.\""
188
+    done
189
+
190
+    [[ $LC_STY -gt 1 ]] && function screen { echo -e "This would start a within screen session. This is not recommanded. But if you need it, call $(which screen)." ; }
191
+
192
+    [[ -f /tmp/${USER}_sty.lock ]] && rm /tmp/${USER}_sty.lock
193
+fi
194
+
153 195
 
154 196
 
155 197
 #=================#
... ...
@@ -159,17 +201,29 @@ fi
159 201
 name=${HOSTNAME%%.*}
160 202
 nb=$(printf "%${#name}s\n" "" | sed "s/ /=/g")
161 203
 
162
-if [[ ! $HOSTNAME =~ compute.* &&  -z $STY ]]
204
+# Server message
205
+if [[ ! $HOSTNAME =~ compute.* && -z $STY && -z $LC_STY ]]
163 206
 then
164 207
     nb=$nb=======
165 208
     echo -e "\n\n"
166 209
     cat .welcome.msg | sed "s/HOSTNAME/$(echo $name Server | sed "s/^[m,h]/\U&/")/" | sed "s/=\*/$nb/g"
167
-    echo -e "\n\n"
168
-
210
+    echo -e "\n"
211
+fi
169 212
 
170
-    if [[ $(echo $name) == "medusa" || $(echo $name) == "medusa2" ]]
213
+# Info on disk space and cores
214
+if [[ $name != "heron" && (-z $LC_STY || $LC_STY != 1) ]]
215
+then
216
+    mydisk="/master /data"
217
+    echo ""
218
+    for i in $mydisk
219
+    do
220
+        [[ ! $(df -h 2> /dev/null | grep "$i ") ]] && continue
221
+        echo -e "\033[33mSpace available on $i [%/Total/free]:\033[00m $(df -h 2> /dev/null | grep "$i " | awk '{print $5" / "$2" / "$4}')"
222
+    done
223
+    echo ""
224
+
225
+    if [[ ($name == "medusa" || $name == "medusa2") && (-z $LC_STY || $LC_STY != 1) ]]
171 226
     then
172
-        echo -e "\033[33mSpace available on /master [%/Total/free]:\033[00m $(df -h | grep "/master " | awk '{print $5" / "$2" / "$4}')\n"
173 227
         echo -e "\033[33mCores available:\033[00m\n"
174 228
         qstat -g c
175 229
         echo -e "\n"
Browse code

bash_profile (heron) - v1.10 - Update variables and alias

Python variable improved and alias created, Consed variable added, locate command improved, library path updated

Fred authored on17/08/2015 23:33:25
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 1.9
3
+# Version: 1.10
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2015-04-20
5
+# Modified in: 2015-08-17
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v1.10 - 2015-08-17: Python lib adapted to the current version of Python / Consed env variable added / plocate updated to handle several db / pypm alias added / library path updated
12 13
 # v1.9 - 2015-04-20: Python env variable added / alias updated
13 14
 # v1.8 - 2014-12-02: proxy-display added (resolve $DISPLAY problem with screen)
14 15
 # v1.7 - 2014-10-22: alias added / conditional modification of PATH and Ld_LIBRARY_PATH to be able to use eog and evince on other server (crow, ...)
... ...
@@ -41,7 +42,7 @@ fi
41 42
 alias pqsub='qsub -V -cwd -o $HOME/status -j y -r y -S /bin/bash'
42 43
 alias pqsubR='qsub -V -cwd -o $HOME/status -j y -r y -S $(which Rscript)'
43 44
 alias pqrsh='qrsh -V -cwd -pty y bash -li'
44
-alias plocate='locate -d "$HOME/.mlocate.db"'
45
+alias plocate='locate -d "$mlocate_db"'
45 46
 alias xterm='xterm -bg black -fg white -rightbar -geometry 200x35'
46 47
 
47 48
 alias medusa='ssh -Y medusa'
... ...
@@ -50,6 +51,7 @@ alias mendel='ssh -Y mendel'
50 51
 alias crow='ssh -Y crow'
51 52
 alias bulmer='ssh -Y bulmer'
52 53
 
54
+alias pypm="pypm -g"    # Default parameter for pypm which is a package manager for python
53 55
 alias model_script_sh='cp $HOME/Templates/script.sh $1'
54 56
 
55 57
 
... ...
@@ -82,8 +84,10 @@ export PATH=:$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin:$PATH
82 84
 export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto:~/local/lib/perl5/5.18.2:~/local/lib/perl5/site_perl:~/local/lib/perl5/site_perl/5.18.2:~/local/lib/perl5/site_perl/5.18.2/x86_64-linux:~/local/lib/perl5/5.18.2/x86_64-linux:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.8:/usr/lib/perl5/site_perl:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.8:/usr/lib/perl5/vendor_perl:/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/5.8.8
83 85
 
84 86
 # Python
85
-export PYTHONPATH=$HOME/local/lib/python2.6/site-packages
87
+python_version=$(python --version 2>&1 | cut -d " " -f2 | cut -d "." -f -2)
88
+export PYTHONPATH=$HOME/local/lib/python${python_version}/site-packages
86 89
 export PYTHONIOENCODING=utf-8
90
+unset python_version
87 91
 
88 92
 # Special paths for medusa and nodes
89 93
 if [[ $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.* ]]
... ...
@@ -94,7 +98,7 @@ then
94 98
     export PATH=$PATH:/opt/gridengine/bin/linux-x64 # System path needed for the new medusa
95 99
 
96 100
     # Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
97
-    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib" #:$HOME/local/lib64" #Otherwise pb with heron  #:$LD_LIBRARY_PATH"
101
+    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib:$HOME/local/lib64" # Otherwise pb with heron  #:$LD_LIBRARY_PATH"
98 102
 fi
99 103
 
100 104
 
... ...
@@ -102,6 +106,12 @@ fi
102 106
 # Programs #
103 107
 #----------#
104 108
 
109
+# Locate
110
+export mlocate_db=$(ls -1 "$HOME/.mlocate.db"* | tr "\n" ":")
111
+
112
+# Consed
113
+export CONSED_HOME=~/local/bin/consed.d
114
+
105 115
 # Vim
106 116
 export VIMHOME=$HOME/.vim
107 117
 
Browse code

bash_profile (heron) - v1.9 - Update env variable and alias

Fred authored on20/04/2015 23:06:22
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 1.8
3
+# Version: 1.9
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2014-12-02
5
+# Modified in: 2015-04-20
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v1.9 - 2015-04-20: Python env variable added / alias updated
12 13
 # v1.8 - 2014-12-02: proxy-display added (resolve $DISPLAY problem with screen)
13 14
 # v1.7 - 2014-10-22: alias added / conditional modification of PATH and Ld_LIBRARY_PATH to be able to use eog and evince on other server (crow, ...)
14 15
 # v1.6 - 2014-10-15: alias added / LC* added / LS_COLORS removed / PATH updated / LD_LIBRARY_PATH updated
... ...
@@ -39,8 +40,8 @@ fi
39 40
 
40 41
 alias pqsub='qsub -V -cwd -o $HOME/status -j y -r y -S /bin/bash'
41 42
 alias pqsubR='qsub -V -cwd -o $HOME/status -j y -r y -S $(which Rscript)'
42
-alias qrsh='qrsh -V -cwd -pty y bash -li'
43
-alias locate='locate -d "$HOME/.mlocate.db"'
43
+alias pqrsh='qrsh -V -cwd -pty y bash -li'
44
+alias plocate='locate -d "$HOME/.mlocate.db"'
44 45
 alias xterm='xterm -bg black -fg white -rightbar -geometry 200x35'
45 46
 
46 47
 alias medusa='ssh -Y medusa'
... ...
@@ -48,8 +49,6 @@ alias medusa2='ssh -Y medusa2'
48 49
 alias mendel='ssh -Y mendel'
49 50
 alias crow='ssh -Y crow'
50 51
 alias bulmer='ssh -Y bulmer'
51
-alias bauhaus='ssh -Y bauhaus'
52
-alias u2='ssh -Y u2'
53 52
 
54 53
 alias model_script_sh='cp $HOME/Templates/script.sh $1'
55 54
 
... ...
@@ -84,6 +83,7 @@ export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto:~/local/lib
84 83
 
85 84
 # Python
86 85
 export PYTHONPATH=$HOME/local/lib/python2.6/site-packages
86
+export PYTHONIOENCODING=utf-8
87 87
 
88 88
 # Special paths for medusa and nodes
89 89
 if [[ $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.* ]]
Browse code

bash_profile (heron) - v1.8 - Add proxy-display

Fred authored on02/12/2014 17:49:44
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 1.7
3
+# Version: 1.8
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2014-10-22
5
+# Modified in: 2014-12-02
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v1.8 - 2014-12-02: proxy-display added (resolve $DISPLAY problem with screen)
12 13
 # v1.7 - 2014-10-22: alias added / conditional modification of PATH and Ld_LIBRARY_PATH to be able to use eog and evince on other server (crow, ...)
13 14
 # v1.6 - 2014-10-15: alias added / LC* added / LS_COLORS removed / PATH updated / LD_LIBRARY_PATH updated
14 15
 # v1.5 - 2014-09-30: improve screen session detection to print welcome message at server connection even if screen session is running elsewhere
... ...
@@ -132,6 +133,13 @@ then
132 133
     fi
133 134
 fi
134 135
 
136
+# Display forwarding
137
+# dependency: proxy-dsiplay
138
+if [[ ! ($HOSTNAME =~ medusa* || $HOSTNAME =~ compute.*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
139
+then
140
+    proxy-display :99
141
+fi
142
+
135 143
 
136 144
 
137 145
 #=================#
Browse code

bash_profile (heron) - v1.7 - Adapt to medusa needs

Add conditional modification of paths to avoid bug on servers other than medusa

Fred authored on22/10/2014 19:19:28
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 1.6
3
+# Version: 1.7
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2014-10-15
5
+# Modified in: 2014-10-22
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v1.7 - 2014-10-22: alias added / conditional modification of PATH and Ld_LIBRARY_PATH to be able to use eog and evince on other server (crow, ...)
12 13
 # v1.6 - 2014-10-15: alias added / LC* added / LS_COLORS removed / PATH updated / LD_LIBRARY_PATH updated
13 14
 # v1.5 - 2014-09-30: improve screen session detection to print welcome message at server connection even if screen session is running elsewhere
14 15
 # v1.4 - 2014-08-14: adapt behavior of the start screen regarding the screen program
... ...
@@ -45,6 +46,9 @@ alias medusa='ssh -Y medusa'
45 46
 alias medusa2='ssh -Y medusa2'
46 47
 alias mendel='ssh -Y mendel'
47 48
 alias crow='ssh -Y crow'
49
+alias bulmer='ssh -Y bulmer'
50
+alias bauhaus='ssh -Y bauhaus'
51
+alias u2='ssh -Y u2'
48 52
 
49 53
 alias model_script_sh='cp $HOME/Templates/script.sh $1'
50 54
 
... ...
@@ -54,7 +58,11 @@ alias model_script_sh='cp $HOME/Templates/script.sh $1'
54 58
 # User specific environment and startup programs #
55 59
 #================================================#
56 60
 
57
-# Locale variables (get with locale command)
61
+#--------#
62
+# Locale #
63
+#--------#
64
+
65
+# Get with locale command
58 66
 export LANG=en_US.UTF-8
59 67
 export LC_CTYPE=en_US.UTF-8
60 68
 export LC_TIME=en_US.UTF-8      # Fix timestamp to english format (french connection problem)
... ...
@@ -62,13 +70,13 @@ export LC_NUMERIC=en_US.UTF-8   # To always have . as decimal separator
62 70
 export LC_NAME=en_US.UTF-8
63 71
 LC_ALL=
64 72
 
65
-# Path variable
66
-export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin     # Personal path
67
-export PATH=$PATH:/opt/openmpi/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin:/opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/lx26-amd64:/usr/bin:/usr/local/bin:/bin:/usr/java/latest/bin # System path
68
-export PATH=$PATH:/opt/gridengine/bin/linux-x64 # System path needed for the new medusa
69 73
 
70
-# Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
71
-export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib" #:$HOME/local/lib64" #Otherwise pb with heron  #:$LD_LIBRARY_PATH"
74
+#-------#
75
+# Paths #
76
+#-------#
77
+
78
+# Path variable
79
+export PATH=:$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin:$PATH     # Personal path
72 80
 
73 81
 # Perl variables
74 82
 export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto:~/local/lib/perl5/5.18.2:~/local/lib/perl5/site_perl:~/local/lib/perl5/site_perl/5.18.2:~/local/lib/perl5/site_perl/5.18.2/x86_64-linux:~/local/lib/perl5/5.18.2/x86_64-linux:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.8:/usr/lib/perl5/site_perl:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.8:/usr/lib/perl5/vendor_perl:/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/5.8.8
... ...
@@ -76,6 +84,23 @@ export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto:~/local/lib
76 84
 # Python
77 85
 export PYTHONPATH=$HOME/local/lib/python2.6/site-packages
78 86
 
87
+# Special paths for medusa and nodes
88
+if [[ $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.* ]]
89
+then
90
+    # Path variable
91
+    export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin     # Personal path
92
+    export PATH=$PATH:/opt/openmpi/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin:/opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/lx26-amd64:/usr/bin:/usr/local/bin:/bin:/usr/java/latest/bin # System path
93
+    export PATH=$PATH:/opt/gridengine/bin/linux-x64 # System path needed for the new medusa
94
+
95
+    # Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
96
+    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib" #:$HOME/local/lib64" #Otherwise pb with heron  #:$LD_LIBRARY_PATH"
97
+fi
98
+
99
+
100
+#----------#
101
+# Programs #
102
+#----------#
103
+
79 104
 # Vim
80 105
 export VIMHOME=$HOME/.vim
81 106
 
... ...
@@ -90,7 +115,6 @@ fi
90 115
 
91 116
 export R_LIBS="${R_LIBS_HOME}/${R_version}"
92 117
 
93
-
94 118
 # SSH environment setup
95 119
 if [[ ! $HOSTNAME =~ compute.* ]]
96 120
 then
Browse code

bash_profile (heron) - v1.6 - Modify lib path due to bug on server

Fred authored on19/10/2014 00:48:41
Showing1 changed files
... ...
@@ -68,7 +68,7 @@ export PATH=$PATH:/opt/openmpi/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/
68 68
 export PATH=$PATH:/opt/gridengine/bin/linux-x64 # System path needed for the new medusa
69 69
 
70 70
 # Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
71
-export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib:$HOME/local/lib64" #:$LD_LIBRARY_PATH"
71
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib" #:$HOME/local/lib64" #Otherwise pb with heron  #:$LD_LIBRARY_PATH"
72 72
 
73 73
 # Perl variables
74 74
 export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto:~/local/lib/perl5/5.18.2:~/local/lib/perl5/site_perl:~/local/lib/perl5/site_perl/5.18.2:~/local/lib/perl5/site_perl/5.18.2/x86_64-linux:~/local/lib/perl5/5.18.2/x86_64-linux:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.8:/usr/lib/perl5/site_perl:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.8:/usr/lib/perl5/vendor_perl:/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/5.8.8
Browse code

bash_profile (heron) - v1.6 - Update env variables

Fred authored on15/10/2014 23:34:18
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 1.5
3
+# Version: 1.6
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2014-09-30
5
+# Modified in: 2014-10-15
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v1.6 - 2014-10-15: alias added / LC* added / LS_COLORS removed / PATH updated / LD_LIBRARY_PATH updated
12 13
 # v1.5 - 2014-09-30: improve screen session detection to print welcome message at server connection even if screen session is running elsewhere
13 14
 # v1.4 - 2014-08-14: adapt behavior of the start screen regarding the screen program
14 15
 # v1.3 - 2014-08-06: part for SSH environment setup moved from .bashrc to avoid setting up SSH environment when connection to a node (qrsh)
... ...
@@ -43,38 +44,37 @@ alias xterm='xterm -bg black -fg white -rightbar -geometry 200x35'
43 44
 alias medusa='ssh -Y medusa'
44 45
 alias medusa2='ssh -Y medusa2'
45 46
 alias mendel='ssh -Y mendel'
47
+alias crow='ssh -Y crow'
46 48
 
47 49
 alias model_script_sh='cp $HOME/Templates/script.sh $1'
48 50
 
49 51
 
50 52
 
51
-
52 53
 #================================================#
53 54
 # User specific environment and startup programs #
54 55
 #================================================#
55 56
 
56
-# Fix timestamp to english format (french connection problem)
57
-export LC_TIME=en_US.UTF-8
58
-
59
-# Specific locale variables (get with locale command)
60
-export LC_NUMERIC=en_US.UTF-8  # to always have . as decimal separator
61
-
62
-# Color definition
63
-export LS_COLORS='di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'
57
+# Locale variables (get with locale command)
58
+export LANG=en_US.UTF-8
59
+export LC_CTYPE=en_US.UTF-8
60
+export LC_TIME=en_US.UTF-8      # Fix timestamp to english format (french connection problem)
61
+export LC_NUMERIC=en_US.UTF-8   # To always have . as decimal separator
62
+export LC_NAME=en_US.UTF-8
63
+LC_ALL=
64 64
 
65 65
 # Path variable
66 66
 export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin     # Personal path
67
-export PATH=$PATH:/opt/openmpi/bin:/usr/bin:/usr/java/latest/bin:/usr/local/bin:/bin:/usr/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin/:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin://opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/lx26-amd64 # System path
67
+export PATH=$PATH:/opt/openmpi/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin:/opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/lx26-amd64:/usr/bin:/usr/local/bin:/bin:/usr/java/latest/bin # System path
68 68
 export PATH=$PATH:/opt/gridengine/bin/linux-x64 # System path needed for the new medusa
69 69
 
70 70
 # Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
71
-export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib" # :$HOME/local/lib64" #:$LD_LIBRARY_PATH"
71
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib:$HOME/local/lib64" #:$LD_LIBRARY_PATH"
72 72
 
73 73
 # Perl variables
74
-export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto/:~/local/lib/perl5/5.18.2/:~/local/lib/perl5/site_perl/:~/local/lib/perl5/site_perl/5.18.2/:~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/:~/local/lib/perl5/5.18.2/x86_64-linux/:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.8:/usr/lib/perl5/site_perl:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.8:/usr/lib/perl5/vendor_perl:/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/5.8.8
74
+export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto:~/local/lib/perl5/5.18.2:~/local/lib/perl5/site_perl:~/local/lib/perl5/site_perl/5.18.2:~/local/lib/perl5/site_perl/5.18.2/x86_64-linux:~/local/lib/perl5/5.18.2/x86_64-linux:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.8:/usr/lib/perl5/site_perl:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.8:/usr/lib/perl5/vendor_perl:/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/5.8.8
75 75
 
76 76
 # Python
77
-export PYTHONPATH=$HOME/local/lib/python2.6/site-packages/
77
+export PYTHONPATH=$HOME/local/lib/python2.6/site-packages
78 78
 
79 79
 # Vim
80 80
 export VIMHOME=$HOME/.vim
Browse code

Screen improvements

screenrc - v1.3 - see Versions section for details
screen_profile (cygwin) - v0.1 - see Versions section for details
screen_profile (heron) - v0.0 - see Versions section for details
bash_profile (heron) - v1.5 - see Versions section for details

Fred authored on30/09/2014 18:30:15
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 1.4
3
+# Version: 1.5
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2014-08-14
5
+# Modified in: 2014-09-30
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v1.5 - 2014-09-30: improve screen session detection to print welcome message at server connection even if screen session is running elsewhere
12 13
 # v1.4 - 2014-08-14: adapt behavior of the start screen regarding the screen program
13 14
 # v1.3 - 2014-08-06: part for SSH environment setup moved from .bashrc to avoid setting up SSH environment when connection to a node (qrsh)
14 15
 # v1.2 - 2014-07-09: behaviour modified when login to a node using qrsh (qrsh alias modified / if loop correction for message)
... ...
@@ -116,7 +117,7 @@ fi
116 117
 name=${HOSTNAME%%.*}
117 118
 nb=$(printf "%${#name}s\n" "" | sed "s/ /=/g")
118 119
 
119
-if [[ ! $HOSTNAME =~ compute.* && ! $(ps ux | grep screen | grep -v grep) ]]
120
+if [[ ! $HOSTNAME =~ compute.* &&  -z $STY ]]
120 121
 then
121 122
     nb=$nb=======
122 123
     echo -e "\n\n"
Browse code

bash_profile (heron) - v1.4 - Adapt screen on node

Fred authored on14/08/2014 11:34:48
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 1.3
3
+# Version: 1.4
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2014-08-06
5
+# Modified in: 2014-08-14
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v1.4 - 2014-08-14: adapt behavior of the start screen regarding the screen program
12 13
 # v1.3 - 2014-08-06: part for SSH environment setup moved from .bashrc to avoid setting up SSH environment when connection to a node (qrsh)
13 14
 # v1.2 - 2014-07-09: behaviour modified when login to a node using qrsh (qrsh alias modified / if loop correction for message)
14 15
 # v1.1 - 2014-07-01: specific aliases needed for GridEngine added
... ...
@@ -115,7 +116,7 @@ fi
115 116
 name=${HOSTNAME%%.*}
116 117
 nb=$(printf "%${#name}s\n" "" | sed "s/ /=/g")
117 118
 
118
-if [[ ! $HOSTNAME =~ compute.* ]]
119
+if [[ ! $HOSTNAME =~ compute.* && ! $(ps ux | grep screen | grep -v grep) ]]
119 120
 then
120 121
     nb=$nb=======
121 122
     echo -e "\n\n"
Browse code

bashrc / bash_profile (heron) - Improve qrsh login

Fred authored on06/08/2014 16:43:38
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 1.2
3
+# Version: 1.3
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2014-07-09
5
+# Modified in: 2014-08-06
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v1.3 - 2014-08-06: part for SSH environment setup moved from .bashrc to avoid setting up SSH environment when connection to a node (qrsh)
12 13
 # v1.2 - 2014-07-09: behaviour modified when login to a node using qrsh (qrsh alias modified / if loop correction for message)
13 14
 # v1.1 - 2014-07-01: specific aliases needed for GridEngine added
14 15
 # v1.0 - 2014-06-28: rewriting for better interplay with .bashrc
... ...
@@ -88,6 +89,24 @@ fi
88 89
 export R_LIBS="${R_LIBS_HOME}/${R_version}"
89 90
 
90 91
 
92
+# SSH environment setup
93
+if [[ ! $HOSTNAME =~ compute.* ]]
94
+then
95
+    if [[ -n "$SSH_CONNECTION" ]]
96
+    then
97
+        # Source SSH settings, if applicable
98
+        if [[ -f "${SSH_ENV}" ]]
99
+        then
100
+            source "${SSH_ENV}" > /dev/null
101
+            #ps ${SSH_AGENT_PID} doesn't work under cywgin
102
+            ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || start_agent
103
+        else    
104
+            start_agent
105
+        fi
106
+    fi
107
+fi
108
+
109
+
91 110
 
92 111
 #=================#
93 112
 # Welcome message #
Browse code

bash_profile (heron) - v1.2 - Improve qrsh login

Fred authored on09/07/2014 13:39:03
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,115 @@
1
+# Title: .bash_profile
2
+# Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
+# Version: 1.2
4
+# Created in: 2012-05-25
5
+# Modified in: 2014-07-09
6
+
7
+
8
+#==========#
9
+# Versions #
10
+#==========#
11
+
12
+# v1.2 - 2014-07-09: behaviour modified when login to a node using qrsh (qrsh alias modified / if loop correction for message)
13
+# v1.1 - 2014-07-01: specific aliases needed for GridEngine added
14
+# v1.0 - 2014-06-28: rewriting for better interplay with .bashrc
15
+# v0.0 - 2012-05-25: creation
16
+
17
+
18
+
19
+#===============================#
20
+# Get the aliases and functions #
21
+#===============================#
22
+
23
+if [[ -f ~/.bashrc ]]
24
+then
25
+	source ~/.bashrc
26
+fi
27
+
28
+
29
+
30
+#==================#
31
+# Specific aliases #
32
+#==================#
33
+
34
+alias pqsub='qsub -V -cwd -o $HOME/status -j y -r y -S /bin/bash'
35
+alias pqsubR='qsub -V -cwd -o $HOME/status -j y -r y -S $(which Rscript)'
36
+alias qrsh='qrsh -V -cwd -pty y bash -li'
37
+alias locate='locate -d "$HOME/.mlocate.db"'
38
+alias xterm='xterm -bg black -fg white -rightbar -geometry 200x35'
39
+
40
+alias medusa='ssh -Y medusa'
41
+alias medusa2='ssh -Y medusa2'
42
+alias mendel='ssh -Y mendel'
43
+
44
+alias model_script_sh='cp $HOME/Templates/script.sh $1'
45
+
46
+
47
+
48
+
49
+#================================================#
50
+# User specific environment and startup programs #
51
+#================================================#
52
+
53
+# Fix timestamp to english format (french connection problem)
54
+export LC_TIME=en_US.UTF-8
55
+
56
+# Specific locale variables (get with locale command)
57
+export LC_NUMERIC=en_US.UTF-8  # to always have . as decimal separator
58
+
59
+# Color definition
60
+export LS_COLORS='di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'
61
+
62
+# Path variable
63
+export PATH=$HOME/local/bin:$HOME/local/share:$HOME/local/usr/local/bin     # Personal path
64
+export PATH=$PATH:/opt/openmpi/bin:/usr/bin:/usr/java/latest/bin:/usr/local/bin:/bin:/usr/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin/:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin://opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/lx26-amd64 # System path
65
+export PATH=$PATH:/opt/gridengine/bin/linux-x64 # System path needed for the new medusa
66
+
67
+# Location of bamtools lib (source: http://www.vcru.wisc.edu/simonlab/bioinformatics/programs/install/bamtools.htm)
68
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/local/lib" # :$HOME/local/lib64" #:$LD_LIBRARY_PATH"
69
+
70
+# Perl variables
71
+export PERL5LIB=~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/auto/:~/local/lib/perl5/5.18.2/:~/local/lib/perl5/site_perl/:~/local/lib/perl5/site_perl/5.18.2/:~/local/lib/perl5/site_perl/5.18.2/x86_64-linux/:~/local/lib/perl5/5.18.2/x86_64-linux/:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.8:/usr/lib/perl5/site_perl:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.8:/usr/lib/perl5/vendor_perl:/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi:/usr/lib/perl5/5.8.8
72
+
73
+# Python
74
+export PYTHONPATH=$HOME/local/lib/python2.6/site-packages/
75
+
76
+# Vim
77
+export VIMHOME=$HOME/.vim
78
+
79
+# R
80
+R_version=$(R --version | head -1 | cut -d " " -f 3)
81
+export R_LIBS_HOME="$HOME/.R-libs"
82
+
83
+if [[ ! -d "${R_LIBS_HOME}/${R_version}" ]]
84
+then
85
+    mkdir "${R_LIBS_HOME}/${R_version}"
86
+fi
87
+
88
+export R_LIBS="${R_LIBS_HOME}/${R_version}"
89
+
90
+
91
+
92
+#=================#
93
+# Welcome message #
94
+#=================#
95
+
96
+name=${HOSTNAME%%.*}
97
+nb=$(printf "%${#name}s\n" "" | sed "s/ /=/g")
98
+
99
+if [[ ! $HOSTNAME =~ compute.* ]]
100
+then
101
+    nb=$nb=======
102
+    echo -e "\n\n"
103
+    cat .welcome.msg | sed "s/HOSTNAME/$(echo $name Server | sed "s/^[m,h]/\U&/")/" | sed "s/=\*/$nb/g"
104
+    echo -e "\n\n"
105
+
106
+
107
+    if [[ $(echo $name) == "medusa" || $(echo $name) == "medusa2" ]]
108
+    then
109
+        echo -e "\033[33mSpace available on /master [%/Total/free]:\033[00m $(df -h | grep "/master " | awk '{print $5" / "$2" / "$4}')\n"
110
+        echo -e "\033[33mCores available:\033[00m\n"
111
+        qstat -g c
112
+        echo -e "\n"
113
+    fi
114
+fi
115
+