I want to create bigwigs in Python. Is there a library that can do this?
Two ways of doing it that I'd rather avoid:
Currently I use rpy2 with rtracklayer and genomicranges through bioconda. This works, but is a bit heavy on the dependencies. Example code: https://github.com/endrebak/epic/blob/256ce4974a4ca6a10a0a5cca041c12a4e7ee9eb9/epic/bigwig/create_bigwigs.py
Another option is to use the UCSC binary tools: create a bedGraph and then convert it to bigwig by bedgraphtobigwig, but this is rather slow due to IO as you need to write files twice.