Skip to content

Commit fd86820

Browse files
committed
Forgot to close the bamfile. Could cause issues.
1 parent f5d476d commit fd86820

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

SAM_to_BAM.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def SAM_to_BAM(samfile_name, bamfile_name):
2626

2727
bamfile = open(unsortedbamfile_name, "wb")
2828
bamfile.write(pysam.view("-b", "-S", samfile_name))
29+
bamfile.close()
2930

3031
if bamfile_name.endswith(".bam"):
3132
bamfile_name = bamfile_name[:-4]

0 commit comments

Comments
 (0)