diff options
author | Lei Yan | 2014-08-21 18:56:29 +0000 |
---|---|---|
committer | Lei Yan | 2014-08-21 18:56:29 +0000 |
commit | 7ff0dcda04dc853620bb5162180f18db596f1574 (patch) | |
tree | 0d4c0160607badcc800e6ee27cc32d5a4bbbd04c /wqflask | |
parent | 41fb705cc57c94276573fd19b50c91c095fe76a9 (diff) | |
download | genenetwork2-7ff0dcda04dc853620bb5162180f18db596f1574.tar.gz |
Committer: Lei Yan <lei@penguin.uthsc.edu>
On branch master
Diffstat (limited to 'wqflask')
-rwxr-xr-x | wqflask/base/data_set.py | 4 | ||||
-rwxr-xr-x | wqflask/base/trait.py | 8 | ||||
-rwxr-xr-x | wqflask/wqflask/correlation/show_corr_results.py | 6 | ||||
-rwxr-xr-x | 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 @@ <table id="corr_results" class="table table-hover table-striped table-bordered"> <thead> <tr> - {% if dataset.type == 'ProbeSet' %} + {% if target_dataset.type == 'ProbeSet' %} <th>Trait</th> <th>Symbol</th> <th>Description</th> @@ -47,7 +47,7 @@ <th>Tissue rho</th> <th>Tissue p(rho)</th> {% endif %} - {% elif dataset.type == "Publish" %} + {% elif target_dataset.type == "Publish" %} <th>Record ID</th> <th>Phenotype</th> <th>Authors</th> @@ -67,7 +67,7 @@ <tbody> {% for trait in correlation_results %} <tr> - {% if dataset.type == 'ProbeSet' %} + {% if target_dataset.type == 'ProbeSet' %} <td><a href="/show_trait?trait_id={{trait.name}}&dataset={{trait.dataset.name}}">{{ trait.name }}</a></td> <td>{{ trait.symbol }}</td> <td>{{ trait.description }} <br><br> <b>Aliases</b>: {{ trait.alias }}</td> @@ -81,7 +81,7 @@ <td>{{'%0.3f'|format(trait.lit_corr)}}</td> <td>{{'%0.3f'|format(trait.tissue_corr)}}</td> <td>{{'%0.3e'|format(trait.tissue_pvalue)}}</td> - {% elif dataset.type == "Publish" %} + {% elif target_dataset.type == "Publish" %} <td><a href="/show_trait?trait_id={{trait.name}}&dataset={{trait.dataset.name}}">{{ trait.name }}</a></td> <td>{{ trait.post_publication_description }}</td> <td>{{ trait.authors }}</td> |