Skip to content

Commit b315cc8

Browse files
committedAug 23, 2022
fix: Drop SNVs and indels without reads
1 parent 8531da8 commit b315cc8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
 

‎bin/addindel.py

+4
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ def makemut(args, chrom, start, end, vaf, ins, avoid, alignopts):
121121
logger.warning("%s dropped site with fewer reads than --minmutreads" % mutid)
122122
os.remove(tmpoutbamname)
123123
return None
124+
elif lastread <= 0:
125+
logger.warning("%s dropped mutation with 0 reads" % mutid)
126+
os.remove(tmpoutbamname)
127+
return None
124128

125129
readtrack = dd(list)
126130

‎bin/addsnv.py

+4
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ def makemut(args, hc, avoid, alignopts):
166166
logger.warning("%s dropped site with fewer reads than --minmutreads" % hapstr)
167167
os.remove(tmpoutbamname)
168168
return None
169+
elif lastread <= 0:
170+
logger.warning("%s dropped mutation with 0 reads" % hapstr)
171+
os.remove(tmpoutbamname)
172+
return None
169173

170174
readtrack = dd(list)
171175

0 commit comments

Comments
 (0)
Please sign in to comment.