Skip to content

Commit 73f2461

Browse files
committed
remove tmpfile
1 parent 9e33a61 commit 73f2461

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pathogenprofiler/bam.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from collections import defaultdict
44
import json
55
from uuid import uuid4
6+
import os
67

78
class bam:
89
"""
@@ -79,6 +80,7 @@ def flagstat(self):
7980
flagstat = json.load(open(tmpfile))
8081
self.num_reads_mapped = flagstat["QC-passed reads"]["mapped"]
8182
self.pct_reads_mapped = flagstat["QC-passed reads"]["mapped %"]
83+
os.remove(tmpfile)
8284
return self.num_reads_mapped,self.pct_reads_mapped
8385

8486
def get_median_coverage(self):

0 commit comments

Comments
 (0)