From a9029121b986a77ccb88c26dfc7ca2a13a212ac2 Mon Sep 17 00:00:00 2001
From: Martijn Vermaat <martijn@vermaat.name>
Date: Mon, 19 Sep 2011 13:15:12 +0000
Subject: [PATCH] Use NCBI mapping data from older build

We previously used the NCBI mapping data for the current build, but now a new
build was just released, the mapping data is missing (they are waiting for the
data and it should be up soon).

For now, we just use the mapping data for the archived previous build (it is
the build we were using until now anyway).


git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/branches/refactor-mutalyzer-branch@361 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1
---
 README                                 | 4 ++++
 extras/cron.d/mutalyzer-mapping-update | 4 +++-
 extras/post-install.sh                 | 3 ++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/README b/README
index 01467e83..dc504fa3 100644
--- a/README
+++ b/README
@@ -72,6 +72,10 @@ Todo list:
 - Check for os.path.join vulnerabilities.
 - Use a standard solution for the database migrations in extras/migrations.
 - Use something like Sphinx to generate development documentation from code.
+- There are some problems with the batch architecture, especially that there
+  cannot be multiple workers without synchronisation problems.
+  Good read: http://news.ycombinator.com/item?id=3002861
+  Suggestion: http://celeryproject.org/
 
 Code style guide:
 - Follow PEP 8 (code) and PEP 257 (docstrings).
diff --git a/extras/cron.d/mutalyzer-mapping-update b/extras/cron.d/mutalyzer-mapping-update
index ce361f78..cac1a976 100644
--- a/extras/cron.d/mutalyzer-mapping-update
+++ b/extras/cron.d/mutalyzer-mapping-update
@@ -1,3 +1,5 @@
 # Update the mapping database every sunday morning at 03:25 and 04:25
 #25 3 * * 7 www-data wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/ARCHIVE/BUILD.36.3/mapview/seq_gene.md.gz" -O - | zcat > /tmp/seq_gene.md; <MUTALYZER_BIN_MAPPING_UPDATE> hg18 /tmp/seq_gene.md reference
-#25 4 * * 7 www-data wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/mapview/seq_gene.md.gz" -O - | zcat > /tmp/seq_gene.md; <MUTALYZER_BIN_MAPPING_UPDATE> hg19 /tmp/seq_gene.md 'GRCh37.p2-Primary Assembly'
+#25 4 * * 7 www-data wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/ARCHIVE/BUILD.37.2/mapview/seq_gene.md.gz" -O - | zcat > /tmp/seq_gene.md; <MUTALYZER_BIN_MAPPING_UPDATE> hg19 /tmp/seq_gene.md 'GRCh37.p2-Primary Assembly'
+
+##25 4 * * 7 www-data wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/mapview/seq_gene.md.gz" -O - | zcat > /tmp/seq_gene.md; <MUTALYZER_BIN_MAPPING_UPDATE> hg19 /tmp/seq_gene.md 'GRCh37.p2-Primary Assembly'
diff --git a/extras/post-install.sh b/extras/post-install.sh
index 4ec0bb71..466efdde 100644
--- a/extras/post-install.sh
+++ b/extras/post-install.sh
@@ -220,7 +220,8 @@ EOF
 echo -e "${COLOR_INFO}Populating Mapping table with NCBI data (hg19)${COLOR_END}"
 
 # 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
+#wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/mapview/seq_gene.md.gz" -O - | zcat > /tmp/seq_gene.md
+wget "ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/ARCHIVE/BUILD.37.2/mapview/seq_gene.md.gz" -O - | zcat > /tmp/seq_gene.md
 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')
 
-- 
GitLab