aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance
diff options
context:
space:
mode:
authorLei Yan2014-07-14 16:23:12 +0000
committerLei Yan2014-07-14 17:02:01 +0000
commit214bf0128b8ecdda718983c5563cf34160743758 (patch)
tree917e7a5ae78dc4ff65dc08d107a0e3ae3a47c67c /wqflask/maintenance
parent8de6fec18cd98a10c58702c448a1e01e147dc5f7 (diff)
parentfbdbf4b7410185e2a978ecc8e120ae56ff6da0ce (diff)
downloadgenenetwork2-214bf0128b8ecdda718983c5563cf34160743758.tar.gz
Merge /home/zas1024/gene
Conflicts: wqflask/wqflask/static/new/javascript/dataset_select_menu.js wqflask/wqflask/templates/corr_scatter_plot_old.html
Diffstat (limited to 'wqflask/maintenance')
-rwxr-xr-x[-rw-r--r--]wqflask/maintenance/__init__.py0
-rwxr-xr-x[-rw-r--r--]wqflask/maintenance/gen_select_dataset.py47
-rwxr-xr-x[-rw-r--r--]wqflask/maintenance/generate_probesetfreeze_file.py0
-rwxr-xr-x[-rw-r--r--]wqflask/maintenance/get_group_samplelists.py0
-rwxr-xr-x[-rw-r--r--]wqflask/maintenance/print_benchmark.py0
-rwxr-xr-x[-rw-r--r--]wqflask/maintenance/quick_search_table.py0
6 files changed, 24 insertions, 23 deletions
diff --git a/wqflask/maintenance/__init__.py b/wqflask/maintenance/__init__.py
index e69de29b..e69de29b 100644..100755
--- a/wqflask/maintenance/__init__.py
+++ b/wqflask/maintenance/__init__.py
diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py
index ad560659..694efeca 100644..100755
--- a/wqflask/maintenance/gen_select_dataset.py
+++ b/wqflask/maintenance/gen_select_dataset.py
@@ -99,7 +99,7 @@ def get_groups(species):
def get_types(groups):
"""Build types list"""
types = {}
- print("Groups: ", pf(groups))
+ #print("Groups: ", pf(groups))
for species, group_dict in groups.iteritems():
types[species] = {}
for group_name, _group_full_name in group_dict:
@@ -118,15 +118,15 @@ def build_types(species, group):
"""
- print("""select distinct Tissue.Name
- from ProbeFreeze, ProbeSetFreeze, InbredSet, Tissue, Species
- where Species.Name = '{}' and Species.Id = InbredSet.SpeciesId and
- InbredSet.Name = '{}' and
- ProbeFreeze.TissueId = Tissue.Id and
- ProbeFreeze.InbredSetId = InbredSet.Id and
- ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and
- ProbeSetFreeze.public > 0
- order by Tissue.Name""".format(species, group))
+ #print("""select distinct Tissue.Name
+ # from ProbeFreeze, ProbeSetFreeze, InbredSet, Tissue, Species
+ # where Species.Name = '{}' and Species.Id = InbredSet.SpeciesId and
+ # InbredSet.Name = '{}' and
+ # ProbeFreeze.TissueId = Tissue.Id and
+ # ProbeFreeze.InbredSetId = InbredSet.Id and
+ # ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and
+ # ProbeSetFreeze.public > 0
+ # order by Tissue.Name""".format(species, group))
Cursor.execute("""select distinct Tissue.Name
from ProbeFreeze, ProbeSetFreeze, InbredSet, Tissue, Species
where Species.Name = %s and Species.Id = InbredSet.SpeciesId and
@@ -150,7 +150,7 @@ def get_datasets(types):
for species, group_dict in types.iteritems():
datasets[species] = {}
for group, type_list in group_dict.iteritems():
- print("type_list: ", type_list)
+ #print("type_list: ", type_list)
datasets[species][group] = {}
for type_name in type_list:
datasets[species][group][type_name[0]] = build_datasets(species, group, type_name[0])
@@ -174,14 +174,14 @@ def build_datasets(species, group, type_name):
if dataset_value:
return [(dataset_value, dataset_text)]
else:
- print("""select ProbeSetFreeze.Name, ProbeSetFreeze.FullName from
- ProbeSetFreeze, ProbeFreeze, InbredSet, Tissue, Species where
- Species.Name = '{}' and Species.Id = InbredSet.SpeciesId and
- InbredSet.Name = '{}' and
- ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and Tissue.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))
+ #print("""select ProbeSetFreeze.Name, ProbeSetFreeze.FullName from
+ # ProbeSetFreeze, ProbeFreeze, InbredSet, Tissue, Species where
+ # Species.Name = '{}' and Species.Id = InbredSet.SpeciesId and
+ # InbredSet.Name = '{}' and
+ # ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and Tissue.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
ProbeSetFreeze, ProbeFreeze, InbredSet, Tissue, Species where
Species.Name = %s and Species.Id = InbredSet.SpeciesId and
@@ -200,6 +200,7 @@ def main():
species = get_species()
groups = get_groups(species)
+ print("groups:", groups)
types = get_types(groups)
datasets = get_datasets(types)
@@ -217,22 +218,22 @@ def main():
datasets=datasets,
)
- print("data:", data)
+ #print("data:", data)
output_file = """../wqflask/static/new/javascript/dataset_menu_structure.json"""
with open(output_file, 'w') as fh:
json.dump(data, fh, indent=" ", sort_keys=True)
- print("\nWrote file to:", output_file)
+ #print("\nWrote file to:", output_file)
def _test_it():
"""Used for internal testing only"""
types = build_types("Mouse", "BXD")
- print("build_types:", pf(types))
+ #print("build_types:", pf(types))
datasets = build_datasets("Mouse", "BXD", "Hippocampus")
- print("build_datasets:", pf(datasets))
+ #print("build_datasets:", pf(datasets))
if __name__ == '__main__':
Conn = MySQLdb.Connect(**parse_db_uri(our_settings.DB_URI))
diff --git a/wqflask/maintenance/generate_probesetfreeze_file.py b/wqflask/maintenance/generate_probesetfreeze_file.py
index 91a2b8a1..91a2b8a1 100644..100755
--- a/wqflask/maintenance/generate_probesetfreeze_file.py
+++ b/wqflask/maintenance/generate_probesetfreeze_file.py
diff --git a/wqflask/maintenance/get_group_samplelists.py b/wqflask/maintenance/get_group_samplelists.py
index c9ec3872..c9ec3872 100644..100755
--- a/wqflask/maintenance/get_group_samplelists.py
+++ b/wqflask/maintenance/get_group_samplelists.py
diff --git a/wqflask/maintenance/print_benchmark.py b/wqflask/maintenance/print_benchmark.py
index 540e0904..540e0904 100644..100755
--- a/wqflask/maintenance/print_benchmark.py
+++ b/wqflask/maintenance/print_benchmark.py
diff --git a/wqflask/maintenance/quick_search_table.py b/wqflask/maintenance/quick_search_table.py
index f0075df0..f0075df0 100644..100755
--- a/wqflask/maintenance/quick_search_table.py
+++ b/wqflask/maintenance/quick_search_table.py