diff options
Diffstat (limited to 'wqflask/base')
-rw-r--r-- | wqflask/base/data_set.py | 2 | ||||
-rw-r--r-- | wqflask/base/mrna_assay_tissue_data.py | 6 | ||||
-rw-r--r-- | wqflask/base/trait.py | 16 | ||||
-rw-r--r-- | wqflask/base/webqtlCaseData.py | 4 |
4 files changed, 16 insertions, 12 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index d0ec3f3c..1b4e1195 100644 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -106,7 +106,7 @@ Publish or ProbeSet. E.g. new_type = "Geno" else: new_type = "ProbeSet" - self.datasets[short_dataset_name] = new_type + self.datasets[short_dataset_name] = new_type logger.info("datasets",self.datasets) def __call__(self, name): diff --git a/wqflask/base/mrna_assay_tissue_data.py b/wqflask/base/mrna_assay_tissue_data.py index e99ef7b5..eb836e6c 100644 --- a/wqflask/base/mrna_assay_tissue_data.py +++ b/wqflask/base/mrna_assay_tissue_data.py @@ -57,7 +57,7 @@ class MrnaAssayTissueData(object): as x inner join TissueProbeSetXRef as t on t.Symbol = x.Symbol and t.Mean = x.maxmean; '''.format(in_clause) - logger.sql(query) + results = g.db.execute(query).fetchall() lower_symbols = [] @@ -91,7 +91,7 @@ class MrnaAssayTissueData(object): def get_symbol_values_pairs(self): id_list = [self.data[symbol].data_id for symbol in self.data] - + symbol_values_dict = {} if len(id_list) > 0: @@ -100,8 +100,6 @@ class MrnaAssayTissueData(object): WHERE TissueProbeSetData.Id IN {} and TissueProbeSetXRef.DataId = TissueProbeSetData.Id""".format(db_tools.create_in_clause(id_list)) - logger.sql('tissue query',query) - results = g.db.execute(query).fetchall() for result in results: if result.Symbol.lower() not in symbol_values_dict: diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 9566c192..900e050c 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -116,7 +116,6 @@ class GeneralTrait(object): return stringy - def display_name(self): stringy = "" if self.dataset and self.name: @@ -323,7 +322,7 @@ class GeneralTrait(object): #phenotype traits, then display the pre-publication description instead #of the post-publication description if self.confidential: - self.description_display = "" + self.description_display = self.pre_publication_description #if not webqtlUtil.hasAccessToConfidentialPhenotypeTrait( # privilege=self.dataset.privilege, @@ -331,11 +330,11 @@ class GeneralTrait(object): # authorized_users=self.authorized_users): # # description = self.pre_publication_description - - if description: - self.description_display = description.strip() else: - self.description_display = "" + if description: + self.description_display = description.strip() + else: + self.description_display = "" if not self.year.isdigit(): self.pubmed_text = "N/A" @@ -613,7 +612,10 @@ class GeneralTrait(object): if self.probe_target_description: formatted += "; " + self.probe_target_description elif self.dataset.type == 'Publish': - formatted = self.post_publication_description + if self.confidential: + formatted = self.pre_publication_description + else: + formatted = self.post_publication_description else: formatted = "Not available" return formatted.capitalize() diff --git a/wqflask/base/webqtlCaseData.py b/wqflask/base/webqtlCaseData.py index c80fcb65..8df9939e 100644 --- a/wqflask/base/webqtlCaseData.py +++ b/wqflask/base/webqtlCaseData.py @@ -52,6 +52,10 @@ class webqtlCaseData(object): str += " variance=%2.3f" % self.variance if self.num_cases != None: str += " ndata=%d" % self.num_cases + if self.name != None: + str += " name=%s" % self.name + if self.name2 != None: + str += " name2=%s" % self.name2 return str @property |