aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/utility')
-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])