about summary refs log tree commit diff
path: root/wqflask/base
diff options
context:
space:
mode:
authorPjotr Prins2016-09-25 08:51:28 +0000
committerPjotr Prins2016-09-25 08:51:28 +0000
commit0f602fd058934feaaa37eb72d055bfcfcfc9ef8f (patch)
treeab3f4415560fec1157aa2e41375495114092a4c3 /wqflask/base
parent828287669ded48da7712bfbaf320d5f4a8abe163 (diff)
parente8a5cb1fba08f5d35f7392a1f8af54bf8ae65821 (diff)
downloadgenenetwork2-0f602fd058934feaaa37eb72d055bfcfcfc9ef8f.tar.gz
Merge branch 'master' into chfi
Diffstat (limited to 'wqflask/base')
-rw-r--r--wqflask/base/mrna_assay_tissue_data.py6
-rw-r--r--wqflask/base/trait.py16
-rw-r--r--wqflask/base/webqtlCaseData.py4
-rw-r--r--wqflask/base/webqtlConfig.py6
4 files changed, 18 insertions, 14 deletions
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
diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py
index f76d8140..6bbabdec 100644
--- a/wqflask/base/webqtlConfig.py
+++ b/wqflask/base/webqtlConfig.py
@@ -60,9 +60,10 @@ ENSEMBLETRANSCRIPT_URL="http://useast.ensembl.org/Mus_musculus/Lucene/Details?sp
 #   HTMLPATH is replaced by GENODIR
 #   IMGDIR is replaced by GENERATED_IMAGE_DIR
 
-# Temporary storage:
+# Temporary storage (note that this TMPDIR is not the same directory
+# as the UNIX TMPDIR)
 TMPDIR               = mk_dir(TEMPDIR+'/gn2/')
-CACHEDIR             = mk_dir(TEMPDIR+'/cache/')
+CACHEDIR             = mk_dir(TMPDIR+'/cache/')
 # We can no longer write into the git tree:
 GENERATED_IMAGE_DIR  = mk_dir(TMPDIR+'/generated/')
 GENERATED_TEXT_DIR   = mk_dir(TMPDIR+'/generated_text/')
@@ -80,4 +81,3 @@ PORTADDR = "http://50.16.251.170"
 INFOPAGEHREF = '/dbdoc/%s.html'
 CGIDIR = '/webqtl/' #XZ: The variable name 'CGIDIR' should be changed to 'PYTHONDIR'
 SCRIPTFILE = 'main.py'
-