From b21b75cb120e60015114f04dfdb40cfa9c038dba Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Thu, 9 Oct 2014 16:22:53 +0000 Subject: Fixed error with loading the trait page for phenotype traits --- wqflask/wqflask/show_trait/show_trait.py | 5 +++-- wqflask/wqflask/templates/show_trait_mapping_tools.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'wqflask') 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 @@ rqtl {% if dataset.group.species == 'human' %} -
  • self.this_trait.locus_chr != "" and +
  • PLINK
  • -- cgit v1.2.3