Plot Oxford Nanopore variation as self-contained HTML reports.
Project description
_ _ .--.
_ __ ___ ___ | | __ _ _ __ ___ ___ | | __ _ _/ \___
| '_ ` _ \ / _ \| |/ _` | '_ ` _ \ / _ \| |/ _` | ( o )
| | | | | | (_) | | (_| | | | | | | (_) | | (_| | \___..___/
|_| |_| |_|\___/|_|\__,_|_| |_| |_|\___/|_|\__,_| ||
A Python plotting tool for Oxford Nanopore variation data. One input in, one self-contained HTML report out. molamola picks between three plot types based on its input:
- a VCF with
##INFO=<ID=SVTYPE,...>→ SV / cytogenetics report (long-read SV VCFs from Sniffles2 / cuteSV / SVIM / pbsv / NanoVar); - a VCF with
##INFO=<ID=CSQ,...>+##FORMAT=<ID=PS,...>→ per-gene phased-haplotype panels (phased + VEP-annotated small-variant VCFs from WhatsHap / HiPhase); - a mosdepth
regions.bed.gz(via--mosdepth) → karyotype coverage report (genome-wide CN scatter + rolling-median smooth, with an optional BAF panel beneath when paired with a small-variant VCF).
Figures embedded as base64 PNGs — no external assets, opens offline.
Full documentation: https://martinandclaude.github.io/molamola/
Install
pip install molamola
Or via conda — note that both bioconda and conda-forge channels are needed (pycirclize lives on conda-forge):
conda create -n molamola -c bioconda -c conda-forge molamola
Or for development from a clone:
git clone https://github.com/martinandclaude/molamola.git
cd molamola
pip install -e .[dev]
pytest -v
Quick start
# Long-read SV VCF (Sniffles2 etc.) → cytogenetics report
molamola --vcf sample.sniffles.vcf --out reports/
open reports/sample.report.html
# Phased + VEP-annotated VCF → compound-het workup, all candidate genes
molamola --vcf sample.phased.vep.vcf.gz --out reports/
open reports/sample.compound_het.report.html
# Just one gene from a phased + VEP VCF
molamola --vcf sample.phased.vep.vcf.gz --gene NEB --out reports/
# Mosdepth output → karyotype coverage report (genome-wide CN)
molamola --mosdepth sample.regions.bed.gz --reference hg38 --out reports/
open reports/sample.karyotype.report.html
# Add a BAF panel beneath the genome-wide CN scatter
molamola --mosdepth sample.regions.bed.gz --vcf sample.phased.vcf.gz \
--reference hg38 --out reports/
Either --vcf or --mosdepth is required; --out <directory> is required too (molamola refuses rather than silently writing the report next to the input file). With --vcf, the plot mode is auto-detected from the VCF header (##INFO=<ID=SVTYPE> → SV; ##INFO=<ID=CSQ> + ##FORMAT=<ID=PS> → compound-het; otherwise refused). With --mosdepth, karyotype coverage mode runs and any accompanying --vcf is used as the BAF source. Karyotype mode expects uniform-bin mosdepth runs (mosdepth --by <int>).
See the docs for example output, VEP annotation prep, the full CLI reference, filter explanations, and worked examples.
Acknowledgements
- Sniffles2, cuteSV, SVIM, pbsv, NanoVar — long-read SV callers.
- WhatsHap, HiPhase — long-read phasing.
- VEP, MANE Select, ClinVar — variant annotation and significance.
- pyCirclize — circos plot.
- matplotlib, numpy.
- bcftools / samtools / htslib — VCF pre-processing helpers.
- mosdepth — per-bin coverage input to karyotype mode.
- UCSC Genome Browser — hg38 and T2T-CHM13v2.0 cytobands.
- iconsdb.com — header fish icon (deep-pink, mirrored).
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file molamola-0.3.0.tar.gz.
File metadata
- Download URL: molamola-0.3.0.tar.gz
- Upload date:
- Size: 28.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dec3cb110fd507e53632e28e2272031ceea1f2248307a4079ad93d22f2c0b28
|
|
| MD5 |
9a58a7020ea7543da822dab0149d5cff
|
|
| BLAKE2b-256 |
a84570227babe50f10afca6f8dda3c078c8ae6f8d3085f41be368654ee3364b3
|
File details
Details for the file molamola-0.3.0-py3-none-any.whl.
File metadata
- Download URL: molamola-0.3.0-py3-none-any.whl
- Upload date:
- Size: 28.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a71d6704b78090f1dac205495ced94cbec19d15ae303cd39b8afde41a1b4b25
|
|
| MD5 |
e586f3a6a72535caa71012b2f5a3b9ca
|
|
| BLAKE2b-256 |
f78528e7e5c2e8b4d50cbc8bbd48e14bf05ff4c1c4692c956b3ddee44babeefe
|