about summary refs log tree commit diff
path: root/wqflask/utility/gen_geno_ob.py
diff options
context:
space:
mode:
authorzsloan2019-10-08 14:28:42 -0500
committerzsloan2019-10-08 14:28:42 -0500
commitbd13472a05b947b809a8199584d6a3cf5dfad703 (patch)
tree59433860eaca80b10185fa73f4783fb8974d7844 /wqflask/utility/gen_geno_ob.py
parent5cffa1eacdb7fbb3d65b49744b0bee43e4cb130d (diff)
downloadgenenetwork2-bd13472a05b947b809a8199584d6a3cf5dfad703.tar.gz
Fixed serious issue that caused output to be wrong for new reaper mapping
Haplotype analyst now works for GEMMA

Increased margin a bit to fix minor issue with buttons getting cut off on certain Safari versions for bar chart
Diffstat (limited to 'wqflask/utility/gen_geno_ob.py')
-rw-r--r--wqflask/utility/gen_geno_ob.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/wqflask/utility/gen_geno_ob.py b/wqflask/utility/gen_geno_ob.py
index e8780879..44e2722f 100644
--- a/wqflask/utility/gen_geno_ob.py
+++ b/wqflask/utility/gen_geno_ob.py
@@ -47,20 +47,20 @@ class genotype(object):
                 elif line[0] == "@":
                     label = line.split(":")[0][1:]
                     if label == "name":
-                        self.group = line.split(":")[1]
+                        self.group = line.split(":")[1].strip()
                     elif label == "filler":
-                        if line.split(":")[1] == "yes":
+                        if line.split(":")[1].strip() == "yes":
                             self.filler = True
                     elif label == "type":
-                        self.type = line.split(":")[1]
+                        self.type = line.split(":")[1].strip()
                     elif label == "mat":
-                        self.mat = line.split(":")[1]
+                        self.mat = line.split(":")[1].strip()
                     elif label == "pat":
-                        self.pat = line.split(":")[1]
+                        self.pat = line.split(":")[1].strip()
                     elif label == "het":
-                        self.het = line.split(":")[1]
+                        self.het = line.split(":")[1].strip()
                     elif label == "unk":
-                        self.unk = line.split(":")[1]
+                        self.unk = line.split(":")[1].strip()
                     else:
                         continue
                 elif line[:3] == "Chr":
@@ -133,6 +133,7 @@ class Locus(object):
             start_pos = 4
         else:
             start_pos = 3
+
         for allele in marker_row[start_pos:]:
             if allele in geno_table.keys():
                 self.genotype.append(geno_table[allele])