Permalink
Browse files

Change EOF append (old method slow and broken on Mac OS Leopard)

  • Loading branch information...
peterjc committed Apr 25, 2012
1 parent a97d817 commit 6f6b172f5937a87ad1d87fec5c2b8f9f9b4bb830
Showing with 1 addition and 2 deletions.
  1. +1 −2 sambam/bgzf_add_eof.py
View
@@ -54,8 +54,7 @@ def fix_bam(filename):
sys.stderr.write("EOF already present in %s\n" % filename)
else:
sys.stderr.write("Adding EOF block to %s\n" % filename)
- h = open(filename, "wb")
- h.seek(size)
+ h = open(filename, "ab")
h.write(eof)
h.close()

0 comments on commit 6f6b172

Please sign in to comment.