Skip to content
Snippets Groups Projects
Commit 4e06a57c authored by Vermaat's avatar Vermaat
Browse files

Make install/upgrade scripts a bit more robust

git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/trunk@391 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1
parent 18e228a6
No related branches found
No related tags found
No related merge requests found
...@@ -13,9 +13,11 @@ ...@@ -13,9 +13,11 @@
# #
# Todo: # Todo:
# - Copy doc to /usr/share/doc # - Copy doc to /usr/share/doc
# - Check if MySQL user/database exist before creating
# - General cleanup # - General cleanup
set -e set -e
set -u
COLOR_INFO='\033[32m' COLOR_INFO='\033[32m'
COLOR_WARNING='\033[33m' COLOR_WARNING='\033[33m'
...@@ -155,9 +157,11 @@ EOF ...@@ -155,9 +157,11 @@ EOF
echo -e "${COLOR_INFO}Populating Mapping table with NCBI data (hg18)${COLOR_END}" echo -e "${COLOR_INFO}Populating Mapping table with NCBI data (hg18)${COLOR_END}"
# Populate Mapping table with NCBI data (hg18) # Populate Mapping table with NCBI data (hg18)
wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/ARCHIVE/BUILD.36.3/mapview/seq_gene.md.gz" -O - | zcat > /tmp/seq_gene.md MAPPING=$(mktemp)
wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/ARCHIVE/BUILD.36.3/mapview/seq_gene.md.gz" -O - | zcat > $MAPPING
echo -e "${COLOR_INFO}Importing NCBI mapping data, this may take a few minutes (hg18)${COLOR_END}" echo -e "${COLOR_INFO}Importing NCBI mapping data, this may take a few minutes (hg18)${COLOR_END}"
$($BIN_MAPPING_UPDATE hg18 /tmp/seq_gene.md reference) $($BIN_MAPPING_UPDATE hg18 $MAPPING reference)
rm $MAPPING
echo -e "${COLOR_INFO}Creating tables in hg19 database${COLOR_END}" echo -e "${COLOR_INFO}Creating tables in hg19 database${COLOR_END}"
...@@ -223,10 +227,12 @@ EOF ...@@ -223,10 +227,12 @@ EOF
echo -e "${COLOR_INFO}Populating Mapping table with NCBI data (hg19)${COLOR_END}" echo -e "${COLOR_INFO}Populating Mapping table with NCBI data (hg19)${COLOR_END}"
# Populate Mapping table with UCSC data (hg19) # Populate Mapping table with UCSC data (hg19)
#wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/mapview/seq_gene.md.gz" -O - | zcat > /tmp/seq_gene.md MAPPING=$(mktemp)
wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/ARCHIVE/BUILD.37.2/mapview/seq_gene.md.gz" -O - | zcat > /tmp/seq_gene.md #wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/mapview/seq_gene.md.gz" -O - | zcat > $MAPPING
wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/ARCHIVE/BUILD.37.2/mapview/seq_gene.md.gz" -O - | zcat > $MAPPING
echo -e "${COLOR_INFO}Importing NCBI mapping data, this may take a few minutes (hg19)${COLOR_END}" echo -e "${COLOR_INFO}Importing NCBI mapping data, this may take a few minutes (hg19)${COLOR_END}"
$($BIN_MAPPING_UPDATE hg19 /tmp/seq_gene.md 'GRCh37.p2-Primary Assembly') $($BIN_MAPPING_UPDATE hg19 $MAPPING 'GRCh37.p2-Primary Assembly')
rm $MAPPING
echo -e "${COLOR_INFO}Creating tables in mutalyzer database${COLOR_END}" echo -e "${COLOR_INFO}Creating tables in mutalyzer database${COLOR_END}"
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
# sudo bash extras/post-upgrade.sh # sudo bash extras/post-upgrade.sh
set -e set -e
set -u
COLOR_INFO='\033[32m' COLOR_INFO='\033[32m'
COLOR_WARNING='\033[33m' COLOR_WARNING='\033[33m'
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
# sudo bash extras/pre-install.sh # sudo bash extras/pre-install.sh
set -e set -e
set -u
COLOR_INFO='\033[32m' COLOR_INFO='\033[32m'
COLOR_WARNING='\033[33m' COLOR_WARNING='\033[33m'
...@@ -44,15 +45,10 @@ apt-get install -y \ ...@@ -44,15 +45,10 @@ apt-get install -y \
echo -e "${COLOR_INFO}Installing latest soaplib from git master${COLOR_END}" echo -e "${COLOR_INFO}Installing latest soaplib from git master${COLOR_END}"
mkdir -p /tmp/mutalyzer-install pushd $(mktemp -d)
pushd /tmp/mutalyzer-install git clone https://github.com/soaplib/soaplib.git .
git clone https://github.com/soaplib/soaplib.git
cd soaplib
python setup.py install python setup.py install
popd popd
rm -Rf /tmp/mutalyzer-install
echo -e "${COLOR_INFO}Installing suds using easy_install${COLOR_END}" echo -e "${COLOR_INFO}Installing suds using easy_install${COLOR_END}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment