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