diff options
author | Zachary Sloan | 2014-10-09 16:22:53 +0000 |
---|---|---|
committer | Zachary Sloan | 2014-10-09 16:22:53 +0000 |
commit | b21b75cb120e60015114f04dfdb40cfa9c038dba (patch) | |
tree | 53cc6438e4b1d98fdf6fd2487bdb172ba8f2e51a /wqflask | |
parent | 04136ee53bc1b240583e2af68f534cd81d31a5af (diff) | |
download | genenetwork2-b21b75cb120e60015114f04dfdb40cfa9c038dba.tar.gz |
Fixed error with loading the trait page for phenotype traits
Diffstat (limited to 'wqflask')
-rwxr-xr-x | wqflask/wqflask/show_trait/show_trait.py | 5 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/show_trait_mapping_tools.html | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py index d38da8e8..f3a5b0ad 100755 --- a/wqflask/wqflask/show_trait/show_trait.py +++ b/wqflask/wqflask/show_trait/show_trait.py @@ -92,7 +92,8 @@ class ShowTrait(object): #Get nearest marker for composite mapping - if self.this_trait.locus_chr != "" and self.dataset.type != "Geno" and self.dataset.type != "Publish": + print("self.dataset.type:", self.dataset.type) + if hasattr(self.this_trait, 'locus_chr') and self.this_trait.locus_chr != "" and self.dataset.type != "Geno" and self.dataset.type != "Publish": self.nearest_marker1 = get_nearest_marker(self.this_trait, self.dataset)[0] self.nearest_marker2 = get_nearest_marker(self.this_trait, self.dataset)[1] @@ -109,7 +110,7 @@ class ShowTrait(object): hddn['suggestive'] = 0 hddn['num_perm'] = 0 hddn['manhattan_plot'] = False - if self.this_trait.locus_chr != "" and self.dataset.type != "Geno" and self.dataset.type != "Publish": + if hasattr(self.this_trait, 'locus_chr') and self.this_trait.locus_chr != "" and self.dataset.type != "Geno" and self.dataset.type != "Publish": hddn['control_marker'] = self.nearest_marker1+","+self.nearest_marker2 else: hddn['control_marker'] = "" diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index 299c3e0c..1d0d4c66 100755 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html @@ -13,7 +13,7 @@ <a href="#rqtl_geno" data-toggle="tab">rqtl</a> </li> {% if dataset.group.species == 'human' %} - <li>self.this_trait.locus_chr != "" and + <li> <a href="#plink" data-toggle="tab">PLINK</a> </li> <li> |