Skip to content

Commit

Permalink
updated logic to deal with erroneous reporting of reference genotype …
Browse files Browse the repository at this point in the history
…(issue #1)
  • Loading branch information
jhawkey committed Oct 30, 2019
1 parent 755696d commit 74b23b3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion sonnei_genotype.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,15 @@ def parseGeno(this_groups, proportions, group_names):
if (len(subclades) == 0) and ('3.6' in clades):
subclades.append('3.6.0')

# state subclade for reference
# if we've removed 2.8.2 but still have no subclades, check that the value in clades is not 2.8
# if it ISN'T 2.8, and it's some other clade, then report that clade + .0
# if we also don't have a subclade call, report the lineage + .0.0
if (len(subclades) == 0) and ('2.8' not in clades):
try:
subclades.append(clades[0] + '.0')
except IndexError:
subclades.append(primary[0] + '.0.0')
# otherwise if the clade is 2.8, then we indeed do have the reference genotype
if len(subclades) == 0:
subclades.append('2.8.2') # anything with no subclade, and 2.8.2 SNP NOT called, belongs in 2.8.2 with 53G

Expand Down

0 comments on commit 74b23b3

Please sign in to comment.