forked from sanjay-boddu/linuxbrew-automation
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path04-misc.sh
executable file
·137 lines (86 loc) · 5.33 KB
/
04-misc.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
#!/bin/bash
##### Functions start
function print_this {
printf '%.0s*' {1..125}; echo
printf "%s" "$@"; echo
printf '%.0s*' {1..125}; echo
}
##### Functions end
# Check if 01-base.sh and 02-gui-bioinfo-and-internal.sh scripts are run successfully
if [[ ! -f "$ENSEMBL_LINUXBREW_DIR/.base_libs_installed" || ! -f "$ENSEMBL_LINUXBREW_DIR/.additional_libs_installed" || ! -f "$ENSEMBL_LINUXBREW_DIR/.perl_and_python_dependencies_installed" ]]; then
print_this "This scripts needs base, additional, perl and python dependencies installed. Install them before running this script. Aborting!"
return
fi
if [ -z "$IS_A_DOCKER_INSTALL" ]; then
read -p "Symlinks will be created into $SHARED_PATH directory pointing to $ENSEMBL_LINUXBREW_DIR directory. Continue?: " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
print_this "Aborting!"
return
fi
fi
#if [[ -z $ENSEMBL_SOFTWARE_DEPENDENCIES_DIR || ! -d $ENSEMBL_SOFTWARE_DEPENDENCIES_DIR ]]; then
# printf "\n%s\n" "****** ENSEMBL_SOFTWARE_DEPENDENCIES_DIR is either not set or $ENSEMBL_SOFTWARE_DEPENDENCIES_DIR directory is empty ******"
# return
#fi
if [ ! -z "$IS_A_DOCKER_INSTALL" ]; then
print_this "Installing MS TrueType fonts"
sudo yum install epel-release -y
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum install msttcore-fonts-installer -y
print_this "Code expects font files in ucfirst in some places. Therefore, creating symlinks"
pushd /usr/share/fonts/msttcore
find ./ -type f -name '[a-z]*.ttf' -printf "%f\n" | while read file; do sudo ln -s $file ${file^}; done;
popd
# Finally create symlink to $ENSEMBL_SOFTWARE_DEPENDENCIES_DIR/fonts where code is configured to look for fonts
ln -s /usr/share/fonts/msttcore ${ENSEMBL_SOFTWARE_DEPENDENCIES_DIR}/fonts
print_this "Done installing MS TrueType fonts"
fi
#print_this "Setting up fonts"
#if [[ -d '/usr/share/fonts/msttcore/' ]]; then
# ln -s /usr/share/fonts/msttcore ${ENSEMBL_SOFTWARE_DEPENDENCIES_DIR}/fonts
# printf "\n%s\n%s\n" "***** Microsoft True Type fonts found *****" "****** ln -s /usr/share/fonts/msttcore/ ${ENSEMBL_SOFTWARE_DEPENDENCIES_DIR}/fonts ******"
#elif [[ -d '/usr/local/share/fonts/msttcore/' ]]; then
# ln -s /usr/local/share/fonts/msttcore/ ${ENSEMBL_SOFTWARE_DEPENDENCIES_DIR}/fonts
# printf "\n%s\n%s\n" "***** Microsoft True Type fonts found *****" "****** ln -s /usr/local/share/fonts/msttcore/ ${ENSEMBL_SOFTWARE_DEPENDENCIES_DIR}/fonts ******"
#else
# printf "\n%s\n" "****** Looks like Microsoft True Type fonts are not installed on your machine. Please install them before proceeding ******"
# return
#fi
print_this "Installing hubcheck and FileChameleon"
#At the moment, utils hosts hubcheck and FileChameleon
[ -d "$ENSEMBL_SOFTWARE_DEPENDENCIES_DIR/utils" ] || mkdir $ENSEMBL_SOFTWARE_DEPENDENCIES_DIR/utils
pushd $ENSEMBL_SOFTWARE_DEPENDENCIES_DIR/utils
wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/hubCheck
git clone https://github.com/Ensembl/format-transcriber.git
popd
ln -s ${ENSEMBL_SOFTWARE_DEPENDENCIES_DIR}/utils/format-transcriber/ ${ENSEMBL_SOFTWARE_DEPENDENCIES_DIR}/FileChameleon
#Following symlinks makes configuration easy as we can avoid hardcoding paths in Sitedefs.
mkdir -p $SHARED_PATH
mkdir -p $SHARED_PATH/apache
mkdir -p $SHARED_PATH/progressiveCactusFake/submodules/hal/chain
mkdir -p $SHARED_PATH/progressiveCactusFake/submodules/hal/maf
ln -s $ENSEMBL_LINUXBREW_DIR/opt/httpd22/libexec $SHARED_PATH/apache/modules
ln -s $ENSEMBL_LINUXBREW_DIR/opt/httpd22/bin/httpd $SHARED_PATH/apache/httpd
ln -s $ENSEMBL_LINUXBREW_DIR/opt/hdf5@* $SHARED_PATH/progressiveCactusFake/submodules/hdf5
ln -s $ENSEMBL_LINUXBREW_DIR/opt/sonlib $SHARED_PATH/progressiveCactusFake/submodules/sonLib
ln -s $ENSEMBL_LINUXBREW_DIR/opt/hal/lib/ $SHARED_PATH/progressiveCactusFake/submodules/hal/lib
ln -s $ENSEMBL_LINUXBREW_DIR/opt/hal/lib/ $SHARED_PATH/progressiveCactusFake/submodules/hal/chain/inc
ln -s $ENSEMBL_LINUXBREW_DIR/opt/hal/lib/ $SHARED_PATH/progressiveCactusFake/submodules/hal/maf/inc
ln -s $ENSEMBL_LINUXBREW_DIR/opt/emboss $SHARED_PATH/emboss
ln -s $ENSEMBL_LINUXBREW_DIR/opt/genewise $SHARED_PATH/genewise
ln -s $ENSEMBL_LINUXBREW_DIR/opt/jdk@8/bin/java $SHARED_PATH/java
ln -s $ENSEMBL_LINUXBREW_DIR/opt/r2r/bin/r2r $SHARED_PATH/r2r
ln -s $ENSEMBL_LINUXBREW_DIR/opt/bioperl-169/libexec $SHARED_PATH/bioperl
ln -s $ENSEMBL_LINUXBREW_DIR/opt/htslib/include $SHARED_PATH/htslib
ln -s $ENSEMBL_LINUXBREW_DIR/opt/kent/bin/gfClient $SHARED_PATH/gfClient
ln -s $ENSEMBL_LINUXBREW_DIR/opt/blast/bin $SHARED_PATH/ncbi-blast
ln -s $ENSEMBL_LINUXBREW_DIR/opt/nginx-full/bin/nginx $SHARED_PATH/nginx
ln -s $ENSEMBL_LINUXBREW_DIR/opt/repeatmasker/bin/RepeatMasker $SHARED_PATH/RepeatMasker
ln -s $ENSEMBL_LINUXBREW_DIR/opt/crossmap/bin/CrossMap.py $SHARED_PATH/CrossMap.py
ln -s $ENSEMBL_LINUXBREW_DIR/opt/kent/bin/wigToBigWig $SHARED_PATH/wigToBigWig
ln -s $ENSEMBL_LINUXBREW_DIR/opt/kent/bin/bigWigToWig $SHARED_PATH/bigWigToWig
ln -s $ENSEMBL_LINUXBREW_DIR/opt/htslib/bin/bgzip $SHARED_PATH/bgzip
ln -s $ENSEMBL_LINUXBREW_DIR/opt/samtools/bin/samtools $SHARED_PATH/samtools
ln -s $ENSEMBL_LINUXBREW_DIR/opt/htslib/bin/tabix $SHARED_PATH/tabix
ln -s $ENSEMBL_SOFTWARE_DEPENDENCIES_DIR/1000G-tools/vcftools/lib/perl5/site_perl/ $SHARED_PATH/vcftools_perl_lib