diff options
author | pjotrp | 2016-02-08 10:05:38 +0100 |
---|---|---|
committer | pjotrp | 2016-02-08 10:05:38 +0100 |
commit | 933fb9c8ad9ff48260bd1c72b5cb54993d41d393 (patch) | |
tree | 4d2e60d08b45a44d520a9b3adaafc21f20c21e42 /wqflask/maintenance/gen_select_dataset.py | |
parent | 9e94750531ef926c92929cc6cdf26cf98151b046 (diff) | |
parent | 10ae56e0dcc7ac76c671789a67b754d0e1dd03ec (diff) | |
download | genenetwork2-933fb9c8ad9ff48260bd1c72b5cb54993d41d393.tar.gz |
gitignore: resolved conflict
Diffstat (limited to 'wqflask/maintenance/gen_select_dataset.py')
-rwxr-xr-x | wqflask/maintenance/gen_select_dataset.py | 21 |
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(): |