From 233ed8a88c3f5681ed984a965080be2388e4ebbf Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 24 Sep 2019 12:17:08 -0500 Subject: 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 --- wqflask/utility/gen_geno_ob.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'wqflask') 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 = { -- cgit v1.2.3