aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance
diff options
context:
space:
mode:
authorzsloan2016-01-27 21:02:03 +0000
committerzsloan2016-01-27 21:02:03 +0000
commitfdc0cdeda64213c82512da20b10264238bd210ea (patch)
treeaf103b937f9003db84b1dd425554b1d20ae15abd /wqflask/maintenance
parent97b83d20a5f6896614024a3cc40535bfb738ef51 (diff)
downloadgenenetwork2-fdc0cdeda64213c82512da20b10264238bd210ea.tar.gz
Added info button to Dataset dropdown on index page
Fixed script that generates dataset dropdown json file to include accession id Fixed dataset link on search results page
Diffstat (limited to 'wqflask/maintenance')
-rwxr-xr-xwqflask/maintenance/gen_select_dataset.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py
index a2ad8c91..fda46792 100755
--- a/wqflask/maintenance/gen_select_dataset.py
+++ b/wqflask/maintenance/gen_select_dataset.py
@@ -123,12 +123,12 @@ def get_types(groups):
def phenotypes_exist(group_name):
- print("group_name:", group_name)
+ #print("group_name:", group_name)
Cursor.execute("""select Name from PublishFreeze
where PublishFreeze.Name = %s""", (group_name+"Publish"))
results = Cursor.fetchone()
- print("RESULTS:", results)
+ #print("RESULTS:", results)
if results != None:
return True
@@ -136,12 +136,12 @@ def phenotypes_exist(group_name):
return False
def genotypes_exist(group_name):
- print("group_name:", group_name)
+ #print("group_name:", group_name)
Cursor.execute("""select Name from GenoFreeze
where GenoFreeze.Name = %s""", (group_name+"Geno"))
results = Cursor.fetchone()
- print("RESULTS:", results)
+ #print("RESULTS:", results)
if results != None:
return True
@@ -220,7 +220,7 @@ def build_datasets(species, group, type_name):
# and ProbeFreeze.TissueId = Tissue.Id and ProbeFreeze.InbredSetId =
# InbredSet.Id and ProbeSetFreeze.public > 0 order by
# ProbeSetFreeze.CreateTime desc""".format(species, group, type_name))
- Cursor.execute("""select ProbeSetFreeze.Name, ProbeSetFreeze.FullName from
+ Cursor.execute("""select ProbeSetFreeze.Id, ProbeSetFreeze.Name, ProbeSetFreeze.FullName from
ProbeSetFreeze, ProbeFreeze, InbredSet, Tissue, Species where
Species.Name = %s and Species.Id = InbredSet.SpeciesId and
InbredSet.Name = %s and
@@ -228,7 +228,16 @@ def build_datasets(species, group, type_name):
and ProbeFreeze.TissueId = Tissue.Id and ProbeFreeze.InbredSetId =
InbredSet.Id and ProbeSetFreeze.public > 0 order by
ProbeSetFreeze.CreateTime desc""", (species, group, type_name))
- return Cursor.fetchall()
+
+ dataset_results = Cursor.fetchall()
+ datasets = []
+ for dataset_info in dataset_results:
+ this_dataset_info = []
+ for info in dataset_info:
+ this_dataset_info.append(str(info))
+ datasets.append(this_dataset_info)
+
+ return datasets
def main():