| Crates.io | bamnado |
| lib.rs | bamnado |
| version | 0.4.5 |
| created_at | 2025-06-20 11:39:22.059828+00 |
| updated_at | 2026-01-17 21:30:32.107009+00 |
| description | Tools and utilities for manipulation of BAM files for unusual use cases. e.g. single cell, MCC |
| homepage | https://github.com/alsmith151/BamNado |
| repository | https://github.com/alsmith151/BamNado |
| max_upload_size | |
| id | 1719471 |
| size | 364,083 |
High-performance tools and utilities for working with BAM and BigWig files in modern genomics workflows. BamNado is written in Rust for speed and low memory use and provides both a command-line interface and Python bindings.
BamNado is designed for efficient, streaming manipulation of BAM files and signal tracks. It focuses on fast coverage generation, flexible filtering, and lightweight post-processing of bedGraph and BigWig data.
Common use cases include:
BamNado is useful in a range of workflows, including single-cell and Micro-Capture-C (MCC), but is not limited to those applications.
collapse-bedgraph utility to merge adjacent bins with identical scoresDownload the appropriate binary from: https://github.com/alsmith151/BamNado/releases
After downloading:
chmod +x bamnado
./bamnado --version
(Optional) install system-wide:
sudo cp bamnado /usr/local/bin/
docker pull ghcr.io/alsmith151/bamnado:latest
docker run --rm ghcr.io/alsmith151/bamnado:latest --help
Images are available for linux/amd64 and linux/arm64.
If you have Rust installed:
cargo install bamnado
git clone https://github.com/alsmith151/BamNado.git
cd BamNado
cargo build --release
BamNado provides Python bindings for selected high-performance operations and is available directly from PyPI.
pip install bamnado
# or
uv pip install bamnado
import bamnado
import numpy as np
signal = bamnado.get_signal_for_chromosome(
bam_path="input.bam",
chromosome_name="chr1",
bin_size=50,
scale_factor=1.0,
use_fragment=False,
ignore_scaffold_chromosomes=True
)
print(f"Mean coverage: {np.mean(signal)}")
List available commands:
bamnado --help
Get help for a specific command:
bamnado <command> --help
bam-coverage – generate coverage from a BAM filemulti-bam-coverage – coverage from multiple BAMssplit – split BAMs based on filters (e.g. barcodes)split-exogenous – split endogenous vs exogenous readsmodify – apply transformations and filters to BAMsbigwig-compare – compare two BigWigsbigwig-aggregate – aggregate multiple BigWigscollapse-bedgraph – merge adjacent bedGraph bins with identical scoresbamnado bam-coverage \
--bam input.bam \
--output output.bedgraph \
--bin-size 100 \
--norm-method rpkm \
--scale-factor 1.5 \
--use-fragment \
--proper-pair \
--min-mapq 30
bamnado bam-coverage \
--bam input.bam \
--output BCL2.bw \
--bin-size 50 \
--filter-tag "VP" \
--filter-tag-value "BCL2" \
--use-fragment \
--min-mapq 30
bamnado bigwig-compare \
--bw1 sample1.bw \
--bw2 sample2.bw \
--comparison log-ratio \
--pseudocount 1e-3 \
-o output.bw
bamnado bigwig-aggregate \
--bigwigs sample1.bw sample2.bw sample3.bw \
--method mean \
-o aggregated.bw
bamnado collapse-bedgraph \
--input signal.bedgraph \
--output signal.collapsed.bedgraph
cargo build --release
cargo test
Apache-2.0 OR MIT