From 7ff0dcda04dc853620bb5162180f18db596f1574 Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Thu, 21 Aug 2014 18:56:29 +0000 Subject: Committer: Lei Yan On branch master --- wqflask/base/data_set.py | 4 ++-- wqflask/base/trait.py | 8 +------- wqflask/wqflask/correlation/show_corr_results.py | 6 +----- wqflask/wqflask/templates/correlation_page.html | 8 ++++---- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index c2a05c90..3fb7203d 100755 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -579,10 +579,10 @@ class DataSet(object): """.format(*mescape(self.type, self.type, self.type, self.type, self.name, dataset_type, self.type, self.type, dataset_type)) - print("trait data query: ", query) + #print("trait data query: ", query) results = g.db.execute(query).fetchall() - print("query results:", results) + #print("query results:", results) trait_sample_data.append(results) trait_count = len(trait_sample_data[0]) diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 2bbd1f2a..71691899 100755 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -315,7 +315,7 @@ class GeneralTrait(object): ProbeSet.Name = '%s' """ % (escape(display_fields_string), escape(self.dataset.name), - escape(self.name)) + escape(str(self.name))) trait_info = g.db.execute(query).fetchone() #XZ, 05/08/2009: We also should use Geno.Id to find marker instead of just using Geno.Name # to avoid the problem of same marker name from different species. @@ -340,10 +340,6 @@ class GeneralTrait(object): """ % (string.join(self.dataset.display_fields,','), self.dataset.type, self.name) trait_info = g.db.execute(query).fetchone() - - - #self.cursor.execute(query) - #trait_info = self.cursor.fetchone() if trait_info: self.haveinfo = True @@ -440,8 +436,6 @@ class GeneralTrait(object): PublishXRef.InbredSetId = PublishFreeze.InbredSetId AND PublishFreeze.Id =%s """, (self.name, self.dataset.id)).fetchone() - #self.cursor.execute(query) - #trait_qtl = self.cursor.fetchone() if trait_qtl: self.locus, self.lrs = trait_qtl else: diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 06cf1915..f35fe075 100755 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -164,7 +164,7 @@ class CorrelationResults(object): for _trait_counter, trait in enumerate(self.correlation_data.keys()[:self.return_number]): print("trait name:", trait) - trait_object = GeneralTrait(dataset=self.dataset, name=trait, get_qtl_info=True) + trait_object = GeneralTrait(dataset=self.target_dataset, name=trait, get_qtl_info=True) (trait_object.sample_r, trait_object.sample_p, @@ -474,10 +474,6 @@ class CorrelationResults(object): this_trait_vals.append(sample_value) target_vals.append(target_sample_value) - # print("trait:", trait) - print("this_trait_vals: %s" % this_trait_vals) - print("target_vals: %s" % target_vals) - this_trait_vals, target_vals, num_overlap = corr_result_helpers.normalize_values( this_trait_vals, target_vals) diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html index 88f6d65a..fc5aca42 100755 --- a/wqflask/wqflask/templates/correlation_page.html +++ b/wqflask/wqflask/templates/correlation_page.html @@ -24,7 +24,7 @@ - {% if dataset.type == 'ProbeSet' %} + {% if target_dataset.type == 'ProbeSet' %} @@ -47,7 +47,7 @@ {% endif %} - {% elif dataset.type == "Publish" %} + {% elif target_dataset.type == "Publish" %} @@ -67,7 +67,7 @@ {% for trait in correlation_results %} - {% if dataset.type == 'ProbeSet' %} + {% if target_dataset.type == 'ProbeSet' %} @@ -81,7 +81,7 @@ - {% elif dataset.type == "Publish" %} + {% elif target_dataset.type == "Publish" %} -- cgit v1.2.3
Trait Symbol DescriptionTissue rho Tissue p(rho)Record ID Phenotype Authors
{{ trait.name }} {{ trait.symbol }} {{ trait.description }}

Aliases: {{ trait.alias }}
{{'%0.3f'|format(trait.lit_corr)}} {{'%0.3f'|format(trait.tissue_corr)}} {{'%0.3e'|format(trait.tissue_pvalue)}}{{ trait.name }} {{ trait.post_publication_description }} {{ trait.authors }}