aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2019-09-24 12:17:08 -0500
committerzsloan2019-09-24 12:17:08 -0500
commit233ed8a88c3f5681ed984a965080be2388e4ebbf (patch)
tree2e29fa850eab94a1f63a97a84dc81ea69bf6f3b8
parented2ec7bb4cc9bd160bc19118354a575ec9351329 (diff)
downloadgenenetwork2-233ed8a88c3f5681ed984a965080be2388e4ebbf.tar.gz
Fixed issue that caused GEMMA to not work with genotype files without cM, though this issue still needs to be dealt with to get the new qtlreaper working
-rw-r--r--wqflask/utility/gen_geno_ob.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wqflask/utility/gen_geno_ob.py b/wqflask/utility/gen_geno_ob.py
index 5172369f..e8780879 100644
--- a/wqflask/utility/gen_geno_ob.py
+++ b/wqflask/utility/gen_geno_ob.py
@@ -115,7 +115,10 @@ class Locus(object):
def __init__(self, marker_row, geno_ob):
self.chr = marker_row[0]
self.name = marker_row[1]
- self.cM = float(marker_row[geno_ob.cm_column])
+ try:
+ self.cM = float(marker_row[geno_ob.cm_column])
+ except:
+ self.cM = float(marker_row[geno_ob.mb_column]) if geno_ob.mb_exists else 0
self.Mb = float(marker_row[geno_ob.mb_column]) if geno_ob.mb_exists else None
geno_table = {