aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgenotype_files/genotypes/HSNIH.geno4
-rwxr-xr-xwqflask/base/data_set.py5
-rw-r--r--wqflask/utility/tools.py2
-rwxr-xr-xwqflask/wqflask/marker_regression/marker_regression.py4
-rwxr-xr-xwqflask/wqflask/my_pylmm/data/genofile_parser.py10
-rwxr-xr-xwqflask/wqflask/show_trait/show_trait.py2
-rw-r--r--wqflask/wqflask/static/new/javascript/chr_lod_chart.js2
-rw-r--r--wqflask/wqflask/static/new/javascript/panelutil.js2
-rwxr-xr-xwqflask/wqflask/views.py8
9 files changed, 22 insertions, 17 deletions
diff --git a/genotype_files/genotypes/HSNIH.geno b/genotype_files/genotypes/HSNIH.geno
index 525f0183..1817e252 100755
--- a/genotype_files/genotypes/HSNIH.geno
+++ b/genotype_files/genotypes/HSNIH.geno
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:550df9276046d5aef116e9ab3dff6a03a137e74ba0c21cc0ae59d1f83e9b9673
-size 22560
+oid sha256:719bbdea26ebc969ce82bb4f668630e179ddb796e9e4095b44a0fa9b7b9da22d
+size 23006
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/utility/tools.py b/wqflask/utility/tools.py
index 760ded7c..b8a41f60 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -63,7 +63,7 @@ def plink_command(default=None):
else:
None
- guess = os.environ.get('HOME')+'/plink'
+ guess = os.environ.get('HOME')+'/plink_gemma'
path = get_setting('PLINK_PATH',default,guess,get_valid_path)
plink_command = path+'/plink'
return path,plink_command
diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py
index dc7ebfcc..553b4358 100755
--- a/wqflask/wqflask/marker_regression/marker_regression.py
+++ b/wqflask/wqflask/marker_regression/marker_regression.py
@@ -74,7 +74,7 @@ class MarkerRegression(object):
self.significant = ""
self.pair_scan = False # Initializing this since it is checked in views to determine which template to use
self.score_type = "LRS" #ZS: LRS or LOD
- self.mapping_scale = "megabase"
+ self.mapping_scale = "physic"
self.dataset.group.get_markers()
if self.mapping_method == "gemma":
@@ -87,7 +87,7 @@ class MarkerRegression(object):
results = self.run_rqtl_plink()
elif self.mapping_method == "rqtl_geno":
self.score_type = "LOD"
- self.mapping_scale = "centimorgan"
+ self.mapping_scale = "morgan"
if start_vars['num_perm'] == "":
self.num_perm = 0
else:
diff --git a/wqflask/wqflask/my_pylmm/data/genofile_parser.py b/wqflask/wqflask/my_pylmm/data/genofile_parser.py
index 9191f345..61a00136 100755
--- a/wqflask/wqflask/my_pylmm/data/genofile_parser.py
+++ b/wqflask/wqflask/my_pylmm/data/genofile_parser.py
@@ -65,11 +65,11 @@ class ConvertGenoFile(object):
self.configurations = {}
#self.skipped_cols = 3
- if self.input_file.endswith(".geno.gz"):
- print("self.input_file: ", self.input_file)
- self.input_fh = gzip.open(self.input_file)
- else:
- self.input_fh = open(self.input_file)
+ #if self.input_file.endswith(".geno.gz"):
+ # print("self.input_file: ", self.input_file)
+ # self.input_fh = gzip.open(self.input_file)
+ #else:
+ self.input_fh = open(self.input_file)
with open(self.output_file, "w") as self.output_fh:
#if self.file_type == "geno":
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index 850c99a7..aa6f9562 100755
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -167,7 +167,7 @@ class ShowTrait(object):
return False
def check_pylmm_rqtl():
- if os.path.isfile(webqtlConfig.GENODIR+self.dataset.group.name+".geno"):
+ if os.path.isfile(webqtlConfig.GENODIR+self.dataset.group.name+".geno") and (os.path.getsize(webqtlConfig.NEWGENODIR+self.dataset.group.name+".json") > 0):
return True
else:
return False
diff --git a/wqflask/wqflask/static/new/javascript/chr_lod_chart.js b/wqflask/wqflask/static/new/javascript/chr_lod_chart.js
index 60878978..c6fb52d8 100644
--- a/wqflask/wqflask/static/new/javascript/chr_lod_chart.js
+++ b/wqflask/wqflask/static/new/javascript/chr_lod_chart.js
@@ -119,7 +119,7 @@ Chr_Lod_Chart = (function() {
};
Chr_Lod_Chart.prototype.create_scales = function() {
- if (this.mappingScale == "centimorgan") {
+ if (this.mappingScale == "morgan") {
max_pos = 0
for (i = 0, len = this.these_results.length; i < len; i++) {
marker = this.these_results[i]
diff --git a/wqflask/wqflask/static/new/javascript/panelutil.js b/wqflask/wqflask/static/new/javascript/panelutil.js
index 5a931f7d..4c8e77ba 100644
--- a/wqflask/wqflask/static/new/javascript/panelutil.js
+++ b/wqflask/wqflask/static/new/javascript/panelutil.js
@@ -157,7 +157,7 @@ chrscales = function(data, width, chrGap, leftMargin, pad4heatmap, mappingScale)
data.chrEnd.push(cur + w);
cur = data.chrEnd[i] + chrGap;
- if (mappingScale == "centimorgan") {
+ if (mappingScale == "morgan") {
max_pos = d3.max(data.posByChr[chr[0]])
console.log("max_pos:", max_pos)
data.xscale[chr[0]] = d3.scale.linear().domain([chrStart[i], max_pos]).range([data.chrStart[i], data.chrEnd[i]]);
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index ba96428d..588433f0 100755
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -335,6 +335,8 @@ def marker_regression_page():
'trait_id',
'dataset',
'method',
+ 'mapping_scale',
+ 'score_type',
'suggestive',
'num_perm',
'maf',
@@ -352,7 +354,7 @@ def marker_regression_page():
if key in wanted or key.startswith(('value:')):
start_vars[key] = value
- version = "v4"
+ version = "v1"
key = "marker_regression:{}:".format(version) + json.dumps(start_vars, sort_keys=True)
print("key is:", pf(key))
with Bench("Loading cache"):
@@ -404,8 +406,8 @@ def marker_regression_page():
result['pair_scan_array'] = bytesarray
rendered_template = render_template("pair_scan_results.html", **result)
else:
- #rendered_template = render_template("marker_regression.html", **result)
- rendered_template = render_template("marker_regression_gn1.html", **result)
+ rendered_template = render_template("marker_regression.html", **result)
+ #rendered_template = render_template("marker_regression_gn1.html", **result)
return rendered_template