molamola

CLI reference

molamola --vcf VCF --out DIR [--reference hg38|t2t] [...]
molamola --mosdepth REGIONS.bed.gz --out DIR [--vcf VCF] [...]

Single flat parser. The plot type is picked from the input:

Either --vcf or --mosdepth is required. Mode-specific flags are silently ignored when they don’t apply to the active mode (e.g. passing --bin-size against a mosdepth run — karyotype mode just doesn’t read it).

VCFs that match neither shape are refused with a clear error rather than rendering a misleading default.

See FILTERS.md for what every threshold does. See OUTPUTS.md for the output format.

Common flags

flag default description
--vcf PATH — input VCF (gzipped OK). Required unless --mosdepth is given. Selects SV mode by header; consumed only as the BAF source when --mosdepth is also given.
--mosdepth PATH — mosdepth regions.bed.gz (uniform-bin runs only — mosdepth --by <int>). Activates karyotype coverage mode. Required unless --vcf is given.
--out DIR required output directory (created if absent). molamola exits 2 with a usage error if omitted, rather than silently writing next to the input. Filenames: <sample>.report.html (SV), <sample>.karyotype.report.html (karyotype).
--reference {hg38,t2t} hg38 reference assembly the input was called against. Both modes support hg38 and T2T-CHM13v2.0.
--sample NAME input basename sample label shown in the report header.
--png off also write each embedded figure as a standalone PNG alongside the HTML (for MultiQC / pipeline embeds). SV mode writes <sample>.report.circos.png and one <sample>.report.rearrangement_<n>.png per candidate panel; karyotype mode writes <sample>.karyotype.genome.png.
--force off bypass the safety check that errors out when the input filename hints at a reference different from --reference (e.g. sample.t2t.vcf with --reference hg38).

SV-mode flags

Active when the input VCF carries ##INFO=<ID=SVTYPE,...> (Sniffles2 / cuteSV / SVIM / pbsv / NanoVar).

flag default description
--filter {pass,all} pass keep PASS BNDs only, or include GT-filtered events.
--caller {auto,sniffles2,sniffles1,cutesv,svim,pbsv,nanovar} auto SV caller; auto runs an INFO-fingerprint detector and falls back to sniffles2 on no match. Override useful for bcftools-merged or re-headered VCFs.
--mark-acrocentric / --no-mark-acrocentric on for hg38, off for t2t grey out BNDs with both ends in chr13/14/15/21/22 p-arms (mostly mapping artefacts on hg38; real sequence on T2T-CHM13v2.0).
--cov-filter {none,mark,drop} mark how to handle coverage-spike BNDs and DEL/DUP. mark greys flagged BNDs and drops noisy DEL/DUP from the density rings; drop also removes flagged BNDs entirely; none ignores.
--cov-ratio R auto max(COVERAGE) / baseline threshold above which an event is suspicious. Default auto = max(2.0, p99 of in-sample distribution) per sample. The chosen value is printed at run start.
--cov-vaf-max V 0.35 VAF below which a high-coverage event is treated as repeat-collapse noise.
--focus CHR:POS none draw only the rearrangements with a BND endpoint within --focus-window of CHR:POS, and print each matched BND with the event it belongs to (t(8;21)(q21.3;q22.12), or … (single junction)). The second part can be either a position (chr7:57716411) or an ISCN cytoband (chr7:q11.23). Repeatable.
--focus-window N 1000 +/-bp tolerance for --focus matching.
--min-svlen N 50 hard SVLEN cutoff (bp) for non-BND SVs. Set 0 to disable. BNDs are unaffected.
--bin-size N 1,000,000 bin width in bp for the circos SV density rings.
--plotvaf off print each arc’s VAF as a percentage on the circos rim (for a paired event, the mean of its two junctions). Aimed at targeted / panel runs; on a WGS call set the labels overplot. Labels are staggered across four rings and, where breakpoints are too clustered to separate, drawn anyway with the overlap count reported. Noise-flagged arcs are not labelled.
--only-sv-chroms off draw only the chromosomes carrying at least one BND arc or rearrangement. For targeted / adaptive-sampling runs, where a genome-wide circos spends most of its disc on chromosomes with nothing to show.

Karyotype-mode flags

Active when --mosdepth PATH is given. Produces one HTML with a genome-wide log2 relative-depth scatter + rolling-median smooth; an optional BAF panel is added beneath when --vcf is also supplied.

flag default description
--mask PATH bundled override the bundled exclusion mask (data/exclusion.{hg38,t2t}.bed.gz). Bins more than --mask-overlap inside the mask drop out of the depth scatter, the smooth line, and the autosomal-median normalisation anchor.
--no-mask off disable masking entirely (use every bin).
--mask-overlap F 0.5 drop a bin only when more than this fraction of it is masked. The bundled masks are 500 bp-resolution, so an any-overlap rule (0) scales exclusion with your mosdepth bin size rather than with the mask — on a 1 kb run that excluded 57.8 % of bins for a mask covering 39.8 % of hg38. 0 restores the pre-v0.5.0 behaviour.
--gc PATH bundled override the bundled 10 kb GC table (data/gc_10kb.{hg38,t2t}.bed.gz). Drives a per-1 % GC-bucket median-ratio correction applied to depth before normalisation.
--no-gc off disable GC correction.
--centromere-pad-kb N 1000 extend the exclusion mask by N kb either side of each acen band. Centromeric depth is unreliable on ONT even after the polymorphic-TR mask.
--scatter-bin-kb N 50 aggregation window (kb) for the CN scatter cloud.
--smooth-window-mb N 10 rolling-median window (Mb) for the deep-pink smooth line. Below ~3 Mb the line renders as a band across a 3.1 Gb axis rather than as a trend; tighten it when hunting focal rather than arm-scale events.
--max-points N 200000 hard cap on scatter points (systematic downsample above this).
--max-baf-points N 80000 hard cap on BAF points.
--min-baf-dp N 10 minimum FORMAT/DP for a het site to enter the BAF panel.
--min-baf-gq N 20 minimum FORMAT/GQ for a het site to enter the BAF panel. Applied only when GQ is present in the VCF (some callers don’t emit it).
--no-phased-baf off force the per-site BAF panel even when the VCF is phased. By default, if the small-variant VCF carries FORMAT/PS and FORMAT/AD, het read counts are summed within each phase block over tiling windows of 40 het SNVs and plotted mirrored (both v and 1−v, since which haplotype a block calls “1” is arbitrary). Phase is never required — an unphased VCF simply gets the per-site panel.
--ymax N 1.5 upper limit of the log2 relative-depth axis (CN 3 sits at 0.585). Units changed from CN to log2 in v0.5.0.
--ymin N -2.0 lower limit of the log2 relative-depth axis.
--sex {male,female,auto} auto genomic sex for the expected-CN dashes. auto calls male iff chrY median CN > 0.3. The HTML wording is “inferred genomic sex” — a heuristic, not a clinical call.