Mercurial > repos > iuc > ngsutils_bam_filter
diff ngsutils/support/bgzip.py @ 2:7a68005de299 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ngsutils commit 9a243c616a4a3156347e38fdb5f35863ae5133f9
author | iuc |
---|---|
date | Sun, 27 Nov 2016 15:01:21 -0500 |
parents | 4e4e4093d65d |
children |
line wrap: on
line diff
--- a/ngsutils/support/bgzip.py Sun Dec 06 05:03:12 2015 -0500 +++ b/ngsutils/support/bgzip.py Sun Nov 27 15:01:21 2016 -0500 @@ -6,9 +6,9 @@ will load the bgzip archive and output the block information. ''' -import sys import os import struct +import sys class BGZip(object): @@ -41,7 +41,7 @@ if whence == 0: self.seek(0, 0) - ### read into chunk, if not enough data in chunk, read next chunk + # read into chunk, if not enough data in chunk, read next chunk ret = '' while amount and self.pos < self.fsize: if len(self.cdata) - self.cpos < amount: @@ -133,5 +133,6 @@ self.pos += size return struct.unpack(field_types, self.fileobj.read(size)) + if __name__ == '__main__': print BGZip(sys.argv[1]).dump()