Skip to content

Commit

Permalink
accomodate none type attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
kedhammar committed May 29, 2024
1 parent 9705428 commit 4e1c790
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions anglerfish/demux/demux.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def parse_cs(cs_string, index, umi_before=0, umi_after=0):
"""
nt = re.compile(r"\*n([atcg])")
nts = "".join(re.findall(nt, cs_string))
if umi_before > 0:
if umi_before is not None and umi_before > 0:
nts = nts[umi_before:]
if umi_after > 0:
if umi_after is not None and umi_after > 0:
nts = nts[:-umi_after]
# Allow for mismatches
return nts, lev.distance(index.lower(), nts)
Expand Down

0 comments on commit 4e1c790

Please sign in to comment.