about summary refs log tree commit diff
path: root/wqflask/base
diff options
context:
space:
mode:
authorZachary Sloan2014-06-25 20:19:02 +0000
committerZachary Sloan2014-06-25 20:19:02 +0000
commitdf6a70c9a06bc30856a1bc46023bd67e5325f5c9 (patch)
treec7ed438dbc627043785337c0a81ce7988e16d50c /wqflask/base
parent33cf7a7dafc0bf338f98eb793ffd87d4442a58fd (diff)
downloadgenenetwork2-df6a70c9a06bc30856a1bc46023bd67e5325f5c9.tar.gz
Added Karl's correlation matrix code
Improved the "scatterplot matrix" feature on the trait page so that
it matches the chosen trait against every selected trait
Diffstat (limited to 'wqflask/base')
-rwxr-xr-xwqflask/base/data_set.py10
-rwxr-xr-xwqflask/base/species.py6
-rwxr-xr-xwqflask/base/trait.py2
3 files changed, 13 insertions, 5 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index a2b13748..843862aa 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -164,6 +164,7 @@ class Markers(object):
                 marker['chr'] = int(marker['chr'])
             else:
                 marker['chr'] = 19
+            print("Mb:", marker['Mb'])
             marker['Mb'] = float(marker['Mb'])
             
         self.markers = markers
@@ -670,6 +671,7 @@ class PhenotypeDataSet(DataSet):
 
     def get_trait_info(self, trait_list, species = ''):
         for this_trait in trait_list:
+            
             if not this_trait.haveinfo:
                 this_trait.retrieve_info(get_qtl_info=True)
 
@@ -679,6 +681,7 @@ class PhenotypeDataSet(DataSet):
             #phenotype traits, then display the pre-publication description instead
             #of the post-publication description
             if this_trait.confidential:
+                this_trait.description_display = ""
                 continue   # for now
             
                 if not webqtlUtil.hasAccessToConfidentialPhenotypeTrait(
@@ -688,7 +691,12 @@ class PhenotypeDataSet(DataSet):
                         
                     description = this_trait.pre_publication_description
             
-            this_trait.description_display = description.strip()
+            if len(description) > 0:
+                this_trait.description_display = description.strip()
+            else:
+                this_trait.description_display = ""
+
+            print("this_trait.description_display is:", this_trait.description_display)
 
             if not this_trait.year.isdigit():
                 this_trait.pubmed_text = "N/A"
diff --git a/wqflask/base/species.py b/wqflask/base/species.py
index ebc2bfed..52bd8297 100755
--- a/wqflask/base/species.py
+++ b/wqflask/base/species.py
@@ -13,7 +13,7 @@ from pprint import pformat as pf
 class TheSpecies(object):
     def __init__(self, dataset):
         self.dataset = dataset
-        print("self.dataset is:", pf(self.dataset.__dict__))
+        #print("self.dataset is:", pf(self.dataset.__dict__))
         self.chromosomes = Chromosomes(self.dataset)
         self.genome_mb_length = self.chromosomes.get_genome_mb_length()
 
@@ -56,8 +56,8 @@ class Chromosomes(object):
                         InbredSet.Name = %s
                 Order by OrderId
                 """, self.dataset.group.name).fetchall()
-        print("group: ", self.dataset.group.name)
-        print("bike:", results)
+        #print("group: ", self.dataset.group.name)
+        #print("bike:", results)
 
         for item in results:
             self.chromosomes[item.OrderId] = IndChromosome(item.Name, item.Length)
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 3f80d4a4..2bbd1f2a 100755
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -645,7 +645,7 @@ def get_sample_data():
     
     trait_ob = GeneralTrait(name=trait, dataset_name=dataset)
     
-    return json.dumps({key: value.value for key, value in trait_ob.data.iteritems() })
+    return json.dumps([trait, {key: value.value for key, value in trait_ob.data.iteritems() }])
     
     #jsonable_sample_data = {}
     #for sample in trait_ob.data.iteritems():