aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGN22020-04-24 13:00:33 -0500
committerGN22020-04-24 13:00:33 -0500
commitc5c9f0e793ca729aa14dc38b7e8de1cb713ed730 (patch)
tree19be06df890054f1b3deff6ecbffaad749e028b3
parent6ce3ec06ffd9539ab4317f09f54564bd28b90087 (diff)
parent4d6c499b9a6bb668d1cba07aac20599438a726c0 (diff)
downloadgenenetwork2-c5c9f0e793ca729aa14dc38b7e8de1cb713ed730.tar.gz
Merge branch 'testing' of https://github.com/genenetwork/genenetwork2 into HEAD
-rw-r--r--wqflask/base/data_set.py62
-rw-r--r--wqflask/wqflask/templates/base.html6
-rw-r--r--wqflask/wqflask/templates/credits.html55
-rw-r--r--wqflask/wqflask/views.py6
4 files changed, 124 insertions, 5 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index ebf3f021..fae62875 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -67,7 +67,6 @@ DS_NAME_MAP = {}
def create_dataset(dataset_name, rebuild=True, dataset_type = None, get_samplelist = True, group_name = None):
if not dataset_type:
dataset_type = Dataset_Getter(dataset_name)
- logger.debug("dataset_type", dataset_type)
dataset_ob = DS_NAME_MAP[dataset_type]
dataset_class = globals()[dataset_ob]
@@ -96,7 +95,6 @@ Publish or ProbeSet. E.g.
self.datasets = {}
if rebuild: #ZS: May make this the only option
data = json.loads(requests.get("http://gn2.genenetwork.org/api/v_pre1/gen_dropdown").content)
- logger.debug("THE DATA:", data)
#data = gen_menu.gen_dropdown_json()
else:
file_name = "wqflask/static/new/javascript/dataset_menu_structure.json"
@@ -120,7 +118,65 @@ Publish or ProbeSet. E.g.
logger.debugf(5, "datasets",self.datasets)
def __call__(self, name):
- return self.datasets[name]
+ if name not in self.datasets:
+ mrna_expr_query = """
+ SELECT
+ ProbeSetFreeze.Id
+ FROM
+ ProbeSetFreeze
+ WHERE
+ ProbeSetFreeze.Name = "{0}"
+ """.format(name)
+
+ results = g.db.execute(geno_query).fetchall()
+ if len(results):
+ self.datasets[name] = "ProbeSet"
+ return self.datasets[name]
+
+ group_name = name.replace("Publish", "")
+
+ pheno_query = """SELECT InfoFiles.GN_AccesionId
+ FROM InfoFiles, PublishFreeze, InbredSet
+ WHERE InbredSet.Name = '{0}' AND
+ PublishFreeze.InbredSetId = InbredSet.Id AND
+ InfoFiles.InfoPageName = PublishFreeze.Name""".format(group_name)
+
+ results = g.db.execute(pheno_query).fetchall()
+ if len(results):
+ self.datasets[name] = "Publish"
+ return self.datasets[name]
+
+ #ZS: For when there isn't an InfoFiles ID; not sure if this and the preceding query are both necessary
+ other_pheno_query = """SELECT PublishFreeze.Name
+ FROM PublishFreeze, InbredSet
+ WHERE InbredSet.Name = '{}' AND
+ PublishFreeze.InbredSetId = InbredSet.Id""".format(group_name)
+
+ results = g.db.execute(other_pheno_query).fetchall()
+ if len(results):
+ self.datasets[name] = "Publish"
+ return self.datasets[name]
+
+ geno_query = """
+ SELECT
+ GenoFreezeId
+ FROM
+ GenoFreeze
+ WHERE
+ GenoFreeze.Name = "{0}"
+ {1}
+ """.format(name)
+
+ results = g.db.execute(geno_query).fetchall()
+ if len(results):
+ self.datasets[name] = "Geno"
+ return self.datasets[name]
+
+ #ZS: It shouldn't ever reach this
+ return None
+
+ else:
+ return self.datasets[name]
# Do the intensive work at startup one time only
Dataset_Getter = Dataset_Types()
diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html
index 487cf3f2..f9d4e859 100644
--- a/wqflask/wqflask/templates/base.html
+++ b/wqflask/wqflask/templates/base.html
@@ -132,13 +132,15 @@
This site is currently operated by
<a href="mailto:rwilliams@uthsc.edu">Rob Williams</a>,
<a href="http://thebird.nl/">Pjotr Prins</a>,
+ <a href="http://www.senresearch.org">Saunak Sen</a>,
<a href="mailto:zachary.a.sloan@gmail.com">Zachary Sloan</a>,
<a href="mailto:acenteno@uthsc.edu">Arthur Centeno</a>,
and <a href="mailto:cfische7@uthsc.edu">Christian Fischer</a>.
</p>
<p>Design and code by Pjotr Prins, Zach Sloan, Arthur Centeno, Christan Fischer, Danny Arends, Sam Ockman, Lei Yan, Xiaodong Zhou, Christian Fernandez,
- Ning Liu, Rudi Alberts, Elissa Chesler, Sujoy Roy, Evan G. Williams, Alexander G. Williams, Kenneth Manly, Jintao Wang, and Robert W. Williams,
- <a href="http://genenetwork.org/credit.html">colleagues</a>.</p>
+ Ning Liu, Rudi Alberts, Elissa Chesler, Sujoy Roy, Evan G. Williams, Alexander G. Williams, Kenneth Manly, Jintao Wang, Robert W. Williams, and
+ <!--<a href="http://genenetwork.org/credit.html">colleagues</a>.</p>-->
+ <a href="/credits">colleagues</a>.</p>
<br />
<p>GeneNetwork support from:</p>
<ul>
diff --git a/wqflask/wqflask/templates/credits.html b/wqflask/wqflask/templates/credits.html
new file mode 100644
index 00000000..95c424cc
--- /dev/null
+++ b/wqflask/wqflask/templates/credits.html
@@ -0,0 +1,55 @@
+{% extends "base.html" %}
+{% block title %}Credit{% endblock %}
+{% block content %}
+
+<Table width= "100%" cellSpacing=0 cellPadding=5><TR>
+<!-- Body Start from Here -->
+<TD valign="top" height="200" width="100%">
+ <P class="title"><H2>Web site design and coding</H2></P>
+ <UL>
+<LI> <A HREF="mailto:rwilliams@uthsc.edu">Robert W Williams</a>
+<LI>Kenneth Manly (design and QTL mapping, 1995-2007)
+<LI>Jintao Wang (lead programmer, 2001–2006)
+<LI><a href="http://www.nervenet.org/main/people.html">Arthur G. Centeno (IT Analyst III, 2001–present)</a>
+<LI><a href="http://www.nervenet.org/main/people.html">Zachary Sloan (IT Analyst III, 2009–present)</a>
+<LI><a href="http://www.nervenet.org/main/people.html">Lei Yan (systems and web services interface 2008-2018)</a>
+<LI><a href="http://www.nervenet.org/main/people.html">Xusheng Wang (data analysis, 2008-2012)</a>
+<LI><a href="http://www.nervenet.org/main/people.html">Xiaodong Zhou (lead programmer 2009–2011)</a>
+<LI>Ning Liu (programmer 2008–2009)</LI>
+<LI>Zhaohui Sun (SNP browser, programmer 2007)
+<LI>Yanhua Qu (data entry, 2005-2008)
+<LI>Stephen Pitts (programmer)
+<LI>Hongqiang Li (lead programmer, 2007-2009)
+<LI><A HREF="http://www.jax.org/news/archives/2009/chesler.html">Elissa Chesler</A> (design of QTL Heat Map, Compare Correlations, 2004-2006)
+<LI>Kevitt Adler (systems, 2006-2008)
+<LI>Robert Crowell (SNP Browser, 2006-2007)
+<LI>David Crowell (partial correlations, 2008-2009)
+<LI>Evan G. Williams (SNP and Variant Browser, data entry, 2004-2006)
+<LI>Alex G Williams (QTL Maps GUI, 2003-2006)
+ </UL>
+ <P class="title"><H2>Published and Unpublished Phenotype Data</H2></P>
+ <UL>
+ <LI><A HREF="http://www.nervenet.org/people/lulu_cv.html">Lu Lu</A>
+ <LI> <A HREF="http://www.jax.org/news/archives/2009/chesler.html">Elissa J. Chesler</A>
+ <LI><a href="http://www.ohsu.edu/som-BehNeuro/Faculty/Crabbe.html">John C Crabbe</a>, OHSU
+ <LI><a href="http://www.ohsu.edu/som-BehNeuro/Faculty/Belknap.html">John K Belknap</a>, OHSU
+ <LI>Mary-Kathleen Sullivan
+ <LI>Emily English
+ <LI>Byron Jones
+ <LI>Ryan McNieve
+ <LI>Nathan Copeland
+ </UL>
+ <P class="title"><H2>Genotype / Genomic Data</H2></P>
+ <UL>
+ <LI> <A HREF="http://www.nervenet.org/people/lulu_cv.html">Lu Lu</A>
+ <LI><a href="http://www.nervenet.org/people/Gu_cv.html">Jing Gu</a>
+ <LI>Shuhua Qi
+ <LI>John Hogenesch
+ <LI>Timothy Wiltshire
+ <LI><a href="http://www.nervenet.org/people/Yanhua_cv.html">Yanhua Qu</a>
+ </UL>
+ <P></P>
+</TD>
+</TR></TABLE>
+
+{% endblock %}
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index e351a2d4..7d3dfa48 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -305,6 +305,12 @@ def tutorials():
#return render_template("docs.html", **doc.__dict__)
return render_template("tutorials.html")
+@app.route("/credits")
+def credits():
+ #doc = docs.Docs("links", request.args)
+ #return render_template("docs.html", **doc.__dict__)
+ return render_template("credits.html")
+
@app.route("/environments")
def environments():
doc = docs.Docs("environments", request.args)