aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base')
-rwxr-xr-xwqflask/base/data_set.py5
-rwxr-xr-xwqflask/base/mrna_assay_tissue_data.py10
-rwxr-xr-xwqflask/base/webqtlConfig.py2
3 files changed, 13 insertions, 4 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index d6a46c2e..5603fe2e 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -158,7 +158,10 @@ class Markers(object):
"""Todo: Build in cacheing so it saves us reading the same file more than once"""
def __init__(self, name):
json_data_fh = open(os.path.join(webqtlConfig.NEWGENODIR + name + '.json'))
- markers = json.load(json_data_fh)
+ try:
+ markers = json.load(json_data_fh)
+ except:
+ markers = []
for marker in markers:
if (marker['chr'] != "X") and (marker['chr'] != "Y"):
diff --git a/wqflask/base/mrna_assay_tissue_data.py b/wqflask/base/mrna_assay_tissue_data.py
index 54a7ce8e..ba82057a 100755
--- a/wqflask/base/mrna_assay_tissue_data.py
+++ b/wqflask/base/mrna_assay_tissue_data.py
@@ -19,7 +19,7 @@ class MrnaAssayTissueData(object):
if self.gene_symbols == None:
self.gene_symbols = []
- print("self.gene_symbols:", self.gene_symbols)
+ #print("self.gene_symbols:", self.gene_symbols)
self.data = collections.defaultdict(Bunch)
@@ -57,9 +57,15 @@ class MrnaAssayTissueData(object):
results = g.db.execute(query).fetchall()
+ lower_symbols = []
+ for gene_symbol in gene_symbols:
+ if gene_symbol != None:
+ lower_symbols.append(gene_symbol.lower())
+
for result in results:
symbol = result[0]
- if symbol.lower() in [gene_symbol.lower() for gene_symbol in gene_symbols]:
+ #if symbol.lower() in [gene_symbol.lower() for gene_symbol in gene_symbols]:
+ if symbol.lower() in lower_symbols:
#gene_symbols.append(symbol)
symbol = symbol.lower()
diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py
index 330fec56..4f9b3af3 100755
--- a/wqflask/base/webqtlConfig.py
+++ b/wqflask/base/webqtlConfig.py
@@ -55,7 +55,7 @@ COMMON_LIB = GNROOT + 'support/admin'
HTMLPATH = GNROOT + 'genotype_files/'
PYLMM_PATH = '/home/zas1024/plink_gemma/'
SNP_PATH = '/home/zas1024/snps/'
-IMGDIR = GNROOT + '/wqflask/wqflask/images/'
+IMGDIR = GNROOT + '/wqflask/output/'
IMAGESPATH = HTMLPATH + 'images/'
UPLOADPATH = IMAGESPATH + 'upload/'
TMPDIR = '/home/zas1024/tmp/' # Will remove this and dependent items later