A Python package for working with bigWig files and analyzing genomic data.
Install from PyPI:
pip install bwtoolsOr install from source:
git clone https://github.com/gspracklin/bwtools.git
cd bwtools
pip install -e .- Python 3.4+
- Dependencies:
- bioframe
- click
- matplotlib
- numpy
- pandas
- pomegranate
- pybbi
- cytoolz
bwtools provides several commands for analyzing bigWig files:
Use Hidden Markov Models (HMM) to call domains from bigWig signal:
bwtools call_domains -g hg38 -n 2 --output domains input.bwOptions:
--genome/-g: Genome assembly (e.g. hg38)--num-states/-n: Number of HMM states (default: 2)--cmap: Colormap for visualization (default: coolwarm)--sparse: Merge neighboring bins with same state--output/-o: Output filename
Calculate mean signal values in specified regions:
bwtools compute_regions --bigwigs file1.bw,file2.bw --bedfiles regions1.bed,regions2.bed --plot output.pngOptions:
--bigwigs: Comma-separated list of bigWig files--bedfiles: Comma-separated list of BED files defining regions--plot: Optional output plot filename
This project is licensed under the MIT License - see the LICENSE file for details.
George Spracklin
Contributions are welcome! Please feel free to submit a Pull Request.