view scatter-from-wiggle.py @ 2:014a21767ac4 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/circos commit 076837a2e9c2b6ececcea4aa286ea7a412387a96"
author iuc
date Tue, 17 Sep 2019 16:54:57 -0400
parents
children
line wrap: on
line source

#!/usr/bin/env python
import logging
import sys

import pyBigWig

logging.basicConfig(level=logging.INFO)
log = logging.getLogger()

if __name__ == "__main__":
    bw = pyBigWig.open(sys.argv[1])
    for chrom in sorted(bw.chroms().keys()):
        for (start, end, value) in bw.intervals(chrom):
            sys.stdout.write("%s\t%s\t%s\t%s\n" % (chrom, start, end, value))