Skip to content

Commit

Permalink
remove tmpfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jodyphelan committed Nov 7, 2021
1 parent 9e33a61 commit 73f2461
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pathogenprofiler/bam.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from collections import defaultdict
import json
from uuid import uuid4
import os

class bam:
"""
Expand Down Expand Up @@ -79,6 +80,7 @@ def flagstat(self):
flagstat = json.load(open(tmpfile))
self.num_reads_mapped = flagstat["QC-passed reads"]["mapped"]
self.pct_reads_mapped = flagstat["QC-passed reads"]["mapped %"]
os.remove(tmpfile)
return self.num_reads_mapped,self.pct_reads_mapped

def get_median_coverage(self):
Expand Down

0 comments on commit 73f2461

Please sign in to comment.