aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2019-06-04 11:20:28 -0500
committerzsloan2019-06-04 11:20:28 -0500
commit34d962fe1e0dd5e30f067e7a30fcbd8931f2aacb (patch)
treed8267d201fd761972a528e7033d4be5ecdda5dfe /wqflask
parent204f85b24ddb7f2556d0f4de5e68620c89d2dd75 (diff)
downloadgenenetwork2-34d962fe1e0dd5e30f067e7a30fcbd8931f2aacb.tar.gz
Added GeneMANIA link
Fixed issue that caused error when creating UCSC RefSeq link Fixed issue that sometimes caused an error for phenotype searches Changed some text on collections page
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/base/webqtlConfig.py2
-rw-r--r--wqflask/wqflask/show_trait/show_trait.py11
-rw-r--r--wqflask/wqflask/templates/collections/view.html4
-rw-r--r--wqflask/wqflask/templates/search_result_page.html6
-rw-r--r--wqflask/wqflask/templates/show_trait_details.html6
5 files changed, 22 insertions, 7 deletions
diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py
index b14cc4b0..a08acb0a 100644
--- a/wqflask/base/webqtlConfig.py
+++ b/wqflask/base/webqtlConfig.py
@@ -43,6 +43,7 @@ HOMOLOGENE_ID = "http://www.ncbi.nlm.nih.gov/homologene/?term=%s"
GENOTATION_URL = "http://www.genotation.org/Getd2g.pl?gene_list=%s"
GTEX_URL = "https://www.gtexportal.org/home/gene/%s"
GENEBRIDGE_URL = "https://www.systems-genetics.org/modules_by_gene/%s?organism=%s"
+GENEMANIA_URL = "https://genemania.org/search/%s/%s"
UCSC_REFSEQ = "http://genome.cse.ucsc.edu/cgi-bin/hgTracks?db=%s&hgg_gene=%s&hgg_chrom=chr%s&hgg_start=%s&hgg_end=%s"
BIOGPS_URL = "http://biogps.org/?org=%s#goto=genereport&id=%s"
STRING_URL = "http://string-db.org/newstring_cgi/show_network_section.pl?identifier=%s"
@@ -87,4 +88,3 @@ if not valid_path(JSON_GENODIR):
PORTADDR = "http://50.16.251.170"
INFOPAGEHREF = '/dbdoc/%s.html'
CGIDIR = '/webqtl/' #XZ: The variable name 'CGIDIR' should be changed to 'PYTHONDIR'
-SCRIPTFILE = 'main.py'
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index 66d3a448..e10b31c0 100644
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -257,7 +257,7 @@ class ShowTrait(object):
self.genbank_link = webqtlConfig.GENBANK_ID % genbank_id
self.genotation_link = self.gtex_link = self.genebridge_link = self.ucsc_blat_link = self.biogps_link = None
- self.string_link = self.panther_link = self.aba_link = self.ebi_gwas_link = self.wiki_pi_link = None
+ self.string_link = self.panther_link = self.aba_link = self.ebi_gwas_link = self.wiki_pi_link = self.genemania_link = None
if self.this_trait.symbol:
self.genotation_link = webqtlConfig.GENOTATION_URL % self.this_trait.symbol
self.gtex_link = webqtlConfig.GTEX_URL % self.this_trait.symbol
@@ -266,7 +266,10 @@ class ShowTrait(object):
self.ebi_gwas_link = webqtlConfig.EBIGWAS_URL % self.this_trait.symbol
if self.dataset.group.species == "mouse" or self.dataset.group.species == "human":
- self.genebridge_link = webqtlConfig.GENEBRIDGE_URL % (self.this_trait.symbol, self.dataset.group.species)
+ if self.dataset.group.species == "mouse":
+ self.genemania_link = webqtlConfig.GENEMANIA_URL % ("mus-musculus", self.this_trait.symbol)
+ else:
+ self.genemania_link = webqtlConfig.GENEMANIA_URL % ("homo-sapiens", self.this_trait.symbol)
if self.dataset.group.species == "mouse":
self.aba_link = webqtlConfig.ABA_URL % self.this_trait.symbol
@@ -282,8 +285,10 @@ class ShowTrait(object):
self.ucsc_blat_link = webqtlConfig.UCSC_REFSEQ % ('mm10', self.this_trait.refseq_transcriptid, chr, transcript_start, transcript_end)
if self.dataset.group.species == "rat":
+ self.genemania_link = webqtlConfig.GENEMANIA_URL % ("rattus-norvegicus", self.this_trait.symbol)
+
query = """SELECT kgID, chromosome, txStart, txEnd
- FROM GeneLink_rn33
+ 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
diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html
index 8d22b2a8..7e1001fc 100644
--- a/wqflask/wqflask/templates/collections/view.html
+++ b/wqflask/wqflask/templates/collections/view.html
@@ -84,8 +84,8 @@
<button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button>
<button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect All</button>
<button class="btn btn-default" id="invert"><span class="glyphicon glyphicon-resize-vertical"></span> Invert</button>
- <button class="btn btn-danger" id="remove" disabled="disabled"><i class="icon-minus-sign"></i> Delete From Collection</button>
- <button class="btn" id="add" disabled="disabled"><i class="icon-plus-sign"></i> Copy Record to Other Collection</button>
+ <button class="btn btn-danger" id="remove" disabled="disabled"><i class="icon-minus-sign"></i> Delete Rows</button>
+ <button class="btn" id="add" disabled="disabled"><i class="icon-plus-sign"></i> Copy to Other Collection</button>
<br />
<br />
<form id="export_form" method="POST" action="/export_traits_csv">
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index e20ea2d3..bf434452 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -324,7 +324,11 @@
'width': "500px",
'data': null,
'render': function(data, type, row, meta) {
- return decodeURIComponent(escape(data.description))
+ try {
+ return decodeURIComponent(escape(data.description))
+ } catch {
+ return escape(data.description)
+ }
}
},
{
diff --git a/wqflask/wqflask/templates/show_trait_details.html b/wqflask/wqflask/templates/show_trait_details.html
index 09f36021..43efa314 100644
--- a/wqflask/wqflask/templates/show_trait_details.html
+++ b/wqflask/wqflask/templates/show_trait_details.html
@@ -88,6 +88,12 @@
</a>
&nbsp;&nbsp;
{% endif %}
+ {% if genemania_link %}
+ <a href="{{ genemania_link }}" title="GeneMANIA">
+ GeneMANIA
+ </a>
+ &nbsp;&nbsp;
+ {% endif %}
{% if unigene_link %}
<a href="{{ unigene_link }}" title="NCBI UniGene">
UniGene