From c05650476b4e925c2bf6e7369ab8d321ce83ad48 Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 3 Jul 2019 22:10:03 -0500 Subject: Fixed bug for creating one of the third party links on the trait page Changed text in several pages (submit trait, mapping error) Changed header menu structure some --- wqflask/base/webqtlConfig.py | 2 +- wqflask/wqflask/show_trait/show_trait.py | 7 ++++++- wqflask/wqflask/templates/base.html | 29 +++++++++++++------------- wqflask/wqflask/templates/gsearch_gene.html | 9 ++++---- wqflask/wqflask/templates/gsearch_pheno.html | 5 ++--- wqflask/wqflask/templates/index_page_orig.html | 1 - wqflask/wqflask/templates/mapping_error.html | 6 ++++++ wqflask/wqflask/templates/submit_trait.html | 19 ++++++++--------- 8 files changed, 42 insertions(+), 36 deletions(-) diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py index a08acb0a..b9e6abd8 100644 --- a/wqflask/base/webqtlConfig.py +++ b/wqflask/base/webqtlConfig.py @@ -53,7 +53,7 @@ ABA_URL = "http://mouse.brain-map.org/search/show?search_type=gene&search_term=% EBIGWAS_URL = "https://www.ebi.ac.uk/gwas/search?query=%s" WIKI_PI_URL = "http://severus.dbmi.pitt.edu/wiki-pi/index.php/search?q=%s" ENSEMBLETRANSCRIPT_URL="http://useast.ensembl.org/Mus_musculus/Transcript/Idhistory?t=%s" -DBSNP = 'http://www.ncbi.nlm.nih.gov/SNP/snp_ref.cgi?type=rs&rs=%s' +DBSNP = 'http://ensembl.org/Mus_musculus/Variation/Population?v=%s' # Temporary storage (note that this TMPDIR can be set as an # environment variable - use utility.tools.TEMPDIR when you diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py index 5178ece8..5c349bf3 100644 --- a/wqflask/wqflask/show_trait/show_trait.py +++ b/wqflask/wqflask/show_trait/show_trait.py @@ -291,7 +291,12 @@ class ShowTrait(object): FROM GeneList_rn33 WHERE geneSymbol = '{}'""".format(self.this_trait.symbol) - kgId, chr, transcript_start, transcript_end = g.db.execute(query).fetchall()[0] if len(g.db.execute(query).fetchall()) > 0 else None + results = g.db.execute(query).fetchone() + if results: + kgId, chr, transcript_start, transcript_end = results + else: + kgId = chr = transcript_start = transcript_end = None + if chr and transcript_start and transcript_end and kgId: transcript_start = int(transcript_start*1000000) # Convert to bases from megabases transcript_end = int(transcript_end*1000000) diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index 3fd9faf5..b1977b7f 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -44,10 +44,19 @@ Intro
To study a record, click on its Record ID below.
Check records below and click Add button to add to selection.