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