From 8aa6cc5c1cf85ae9f3ac6c87ff0c354af5c947c7 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Fri, 7 Dec 2012 14:12:14 -0600 Subject: Got show_trait page to appear again for phenotype traits Need to see why other samples list doesn't appear for traits in BXDPublishedPhenotypes --- wqflask/wqflask/do_search.py | 26 ++++------------------- wqflask/wqflask/show_trait/SampleList.py | 3 ++- wqflask/wqflask/show_trait/show_trait.py | 3 ++- wqflask/wqflask/templates/show_trait_details.html | 5 ++++- 4 files changed, 12 insertions(+), 25 deletions(-) diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py index 403f1b5e..3ce613e9 100644 --- a/wqflask/wqflask/do_search.py +++ b/wqflask/wqflask/do_search.py @@ -198,26 +198,6 @@ class PhenotypeSearch(DoSearch): query = self.compile_final_query(where_clause = self.get_fields_clause()) -# self.query = """SELECT PublishXRef.Id, -#PublishFreeze.createtime as thistable, -#Publication.PubMed_ID as Publication_PubMed_ID, -#Phenotype.Post_publication_description as Phenotype_Name FROM Phenotype, -#PublishFreeze, Publication, PublishXRef WHERE (Phenotype.Post_publication_description -#REGEXP "[[:<:]]brain[[:>:]]" OR Phenotype.Pre_publication_description REGEXP "[[:<:]]brain[[:>:]]" -#OR Phenotype.Pre_publication_abbreviation REGEXP "[[:<:]]brain[[:>:]]" -#OR Phenotype.Post_publication_abbreviation REGEXP "[[:<:]]brain[[:>:]]" -#OR Phenotype.Lab_code REGEXP "[[:<:]]brain[[:>:]]" -#OR Publication.PubMed_ID REGEXP "[[:<:]]brain[[:>:]]" -#OR Publication.Abstract REGEXP "[[:<:]]brain[[:>:]]" -#OR Publication.Title REGEXP "[[:<:]]brain[[:>:]]" -#OR Publication.Authors REGEXP "[[:<:]]brain[[:>:]]" -#OR PublishXRef.Id REGEXP "[[:<:]]brain[[:>:]]") -#and PublishXRef.InbredSetId = 1 -#and PublishXRef.PhenotypeId = Phenotype.Id -#and PublishXRef.PublicationId = Publication.Id -#and PublishFreeze.Id = 1;""" - - results = self.execute(query) print("in [df] run results are:", results) return results @@ -461,7 +441,8 @@ class CisTransLrsSearch(LrsSearch): class CisLrsSearch(CisTransLrsSearch): - """Searches for genes on a particular chromosome with a cis-eQTL within the given LRS values + """ + Searches for genes on a particular chromosome with a cis-eQTL within the given LRS values A cisLRS search can take 3 forms: - cisLRS=(min_LRS max_LRS) @@ -484,9 +465,10 @@ class CisLrsSearch(CisTransLrsSearch): class TransLrsSearch(CisTransLrsSearch): """Searches for genes on a particular chromosome with a cis-eQTL within the given LRS values - A transLRS search can take 2 forms: + A transLRS search can take 3 forms: - transLRS=(min_LRS max_LRS) - transLRS=(min_LRS max_LRS mb_buffer) + - transLRS>min_LRS where min/max_LRS represent the range of LRS scores and the mb_buffer is the range around a particular QTL where its eQTL would be considered "cis". If there is no third parameter, mb_buffer will default to 5 megabases. diff --git a/wqflask/wqflask/show_trait/SampleList.py b/wqflask/wqflask/show_trait/SampleList.py index 0c752617..d98a810a 100644 --- a/wqflask/wqflask/show_trait/SampleList.py +++ b/wqflask/wqflask/show_trait/SampleList.py @@ -56,7 +56,8 @@ class SampleList(object): if self.this_trait and self.dataset and self.dataset.type == 'ProbeSet': sample.extra_attributes = self.get_extra_attribute_values(sample_name) print("sample.extra_attributes is", pf(sample.extra_attributes)) - self.sample_list.append(sample) + + self.sample_list.append(sample) print("self.attributes is", pf(self.attributes)) diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py index d1c60877..0f593216 100755 --- a/wqflask/wqflask/show_trait/show_trait.py +++ b/wqflask/wqflask/show_trait/show_trait.py @@ -1627,10 +1627,11 @@ class ShowTrait(object): this_trait=this_trait, sample_group_type='primary', header="%s Only" % (self.dataset.group.name)) + print("primary_samples is: ", pf(primary_samples)) + other_sample_names = [] for sample in this_trait.data.keys(): - print("hjk - sample is:", sample) if sample not in all_samples_ordered: all_samples_ordered.append(sample) other_sample_names.append(sample) diff --git a/wqflask/wqflask/templates/show_trait_details.html b/wqflask/wqflask/templates/show_trait_details.html index 4b3862c7..c3abfc9f 100644 --- a/wqflask/wqflask/templates/show_trait_details.html +++ b/wqflask/wqflask/templates/show_trait_details.html @@ -12,6 +12,7 @@ + {% if this_trait.probe_set_specificity %}
@@ -19,9 +20,11 @@
{{ "%.1f" % (this_trait.probe_set_specificity) }}
- + {% endif %} + {% if this_trait.probe_set_blat_score %}
BLAT Score
{{ "%i" % (this_trait.probe_set_blat_score) }}
+ {% endif %} -- cgit v1.2.3