Skip to content

Command-line reference

Every FiberHMM command and every option it accepts, with its default. The tables below are generated from the commands' own argument parsers, so they match --help exactly. Behaviour that does not fit in a flag description is explained on the workflow pages; defaults that depend on the chemistry are collected in Chemistries and platforms. Every command also accepts -h/--help and --version (prints fiberhmm <version>).

Command What it does Guide
fiberhmm-pipeline Reads + reference (FASTA or plasmid map) to a called BAM: align, call, QC Quick DAF-seq, Plasmids
fiberhmm-call Call nucleosomes, MSPs and TF footprints (HMM + recall) in one pass; --hmm-only writes the HMM calls alone Calling
fiberhmm-apply Deprecated alias of fiberhmm-call --hmm-only (removed after 3.3) Calling
fiberhmm-recall-tfs, fiberhmm-recall-nucs Re-call TFs (and nucleosomes) on a called BAM Re-calling
fiberhmm-qc Bounded QC report for one or more BAMs QC
fiberhmm-extract Calls to BED12 / bigBed Extracting tracks
fiberhmm-dedup DAF PCR-duplicate marking/collapse DAF-seq
fiberhmm-daf-encode Stamp R/Y deamination codes into a DAF BAM DAF-seq
fiberhmm-daf-snps Recurrent C→T/G→A SNP mask for DAF-seq DAF-seq
fiberhmm-pair, fiberhmm-merge Pair, merge and jointly re-call scDAF duplexes Duplex
fiberhmm-lift Lift a BAM (repaired) or a BED file (BED, BED12, narrowPeak) to another assembly through a pangenome graph Lifting to another assembly
fiberhmm-tag-m5c, fiberhmm-call-m5c DddA CpG-island methylation DAF-seq
fiberhmm-consensus Footprint classes across molecules Consensus
fiberhmm-transfer Apply frozen classes to new data Transfer
fiberhmm-footprint-model Footprint population model Footprint model
fiberhmm-strand-rescue (+ -annotate, -audit) Two-strand TF rescue and edge normalization Strand rescue
fiberhmm-tag-consensus Consensus-state slots on tf_sr calls Tag consensus
fiberhmm-posteriors Per-position HMM posteriors Posteriors
fiberhmm-probs, fiberhmm-train Build a custom model Training
fiberhmm-utils Model, header and bigBed utilities Training, Extracting
fiberhmm-check Whether existing outputs need re-running with this version Checking outputs
fiberhmm-nfr NFR variants and co-accessibility (experimental preview) NFR detection

Generated from each command's argparse definition by python tools/gen_cli_reference.py; do not edit by hand. Hidden compatibility options are omitted. auto means the value is resolved at run time as the description says.

fiberhmm-pipeline

Flag Default Description
reads required Read files: FASTQ (.fastq/.fq, optionally .gz), unaligned BAM, a BAM aligned to --reference, raw Nanopore POD5 files (basecalled with dorado first), or a directory of them (a directory with POD5 files, searched recursively, is raw input). All reads given form one sample.
--reference required Reference FASTA, or a plasmid map (.dna, .gb/.gbk/.genbank, .embl) converted to a FASTA whose contig is named as FiberBrowser names the map.
--enzyme required Chemistry: ddda / dddb (DAF-seq) or hia5 (Fiber-seq). Choices: ddda, dddb, hia5.
-o / --outdir required Output directory.
--sample — Sample name for output files and the read group (default: the first input's name without extensions). One plain file name: no path separators, spaces or leading '.'/'-'.
-c / --cores 4 minimap2 threads and fiberhmm-call worker processes (default 4).
--seq — Sequencing platform. Default: detected from the reads. ddda/dddb: a BAM's FIBERHMM-CHEMISTRY declaration or @RG PL/@PG records; reads with no record are Nanopore when aligned here, and keep fiberhmm-call's default when called as given. hia5: also the MM tags of the first reads (T-a = PacBio, A+a only = Nanopore), an error when nothing settles it. Sets the minimap2 preset (map-ont / map-hifi), the read group's PL and fiberhmm-call's --seq. Choices: nanopore, pacbio.
--force-chemistry off Run although the reads contradict --enzyme/--seq (a FIBERHMM-CHEMISTRY declaration naming another enzyme or platform; m6A-tagged reads without deaminations for ddda/dddb; deaminated or untagged reads for hia5). Default: refuse.
--topology auto Reference topology. auto (default): a plasmid map's own topology, FASTA contigs linear. circular: every contig is circular (a plasmid FASTA). Choices: auto, circular, linear.
--region — Keep only reads overlapping this region (1-based, inclusive; repeatable). The first region is the one outputs.json asks FiberBrowser to open.
--min-mapq — Keep primary alignments with at least this MAPQ (default: 0, no filtering; continuing an output directory keeps the value its earlier run recorded); also passed to fiberhmm-call and fiberhmm-qc.
--keep-soft-clips off Keep unaligned read arms as soft clips everywhere. Default: kept on linear contigs (DAF calling treats them as no evidence); for ddda/dddb hard-clipped on circular contigs (concatemer arms beyond one full circle).
--hard-clip off Hard-clip unaligned read arms on every contig (the earlier ddda/dddb default).
--no-origin-merge off Do not join the two pieces of reads that run through the origin of a circular reference (keep the primary piece).
--aligner auto The minimap2 program on PATH or the mappy module (default: auto, program first). Choices: auto, minimap2, mappy.
--min-read-length — Minimum read length to call: the full SEQ, soft clips included (DAF: the aligned length). Default 1000.
--dedup auto DAF PCR-duplicate detection (default auto: on for file input). Choices: auto, on, off.
--dedup-mode flag flag (default): mark duplicates 0x400 and keep them; collapse: keep one read per duplicate cluster. Choices: flag, collapse.
--snp-screen auto DAF recurrent-SNP screen and mask (default auto: after a depth preflight). Choices: auto, on, off.
--snp-mask — DAF: your own BED of SNP sites to exclude.
--daf-mask-unaligned / --no-daf-mask-unaligned on DAF: treat insertion and soft-clip bases as no evidence and leave unaligned stretches >= 50 bp uncalled (default on).
--chimeras — DAF strand-swap chimeras: flag (default) retains reads marked and uncalled; remove drops them; keep disables detection; split cuts each chimeric alignment (either detector) into single-strand pieces, one per segment (<name>/c0, <name>/c1, ...), that are called separately (see fiberhmm-call). Choices: flag, remove, keep, split.
--chimera-detector — DAF strand-swap chimera detector (default standard, unchanged from 3.2.1). strict is opt-in: stricter per-segment rule, base-quality and span filters, several switches, a chimera-only error mask, a graded QC chimera row (see fiberhmm-call). Choices: standard, strict.
--chimera-filter / --no-chimera-filter on Legacy alias: --chimera-filter means --chimeras flag; --no-chimera-filter means --chimeras keep. An explicit --chimeras takes precedence.
--alignments primary-supplementary Alignment records to keep and call (default primary-supplementary: a read's primary and supplementary records, i.e. both sides of a split alignment, on linear contigs; secondary records are dropped). primary: the primary record only; all: as primary-supplementary here (the aligner step never keeps secondary records) and passed to fiberhmm-call. Choices: primary, primary-supplementary, all.
--primary — Same as --alignments primary.
--no-primary — Same as --alignments all.
--prob-threshold — ML threshold override, 0-255 (default: chemistry preset).
--use-m5c / --no-use-m5c auto DddA CpG-aware calling: CpGs masked in the first-pass HMM and recall outside ddda_ucg islands (default: on for ddda).
--cpg-mask-policy — DddA CpG mask policy for the HMM and recall (default unmethylated-only). Choices: unmethylated-only, methylated-only.
--legacy-tags off Passed to fiberhmm-call: also write legacy ns/nl/nq, as/al beside MA/AQ (fibertools <= 0.12, old scripts). Default: MA/AQ only.
--call-args — Other fiberhmm-call options, quoted as one string (e.g. --call-args "--with-scores --min-llr 6").
--call-mode auto auto (default): fiberhmm-call's resumable region-parallel mode for genome-scale data (>=20,000 reads over at least --cores regions), streaming for targeted runs (one amplicon or plasmid), which it calls faster. Choices: auto, streaming, resumable.
--no-qc off Skip fiberhmm-qc.
--basecaller-info — Record the basecaller of reads whose files do not say (FASTQ), or correct it: key=value pairs, e.g. "program=dorado version=0.9.6 basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.0.0" (keys: program, version, basecall_model, modbase_models). Takes precedence over the input headers.
--modbase-model — The modification model that called the MM/ML tags (e.g. dna_r10.4.1_e8.2_400bps_sup@v5.0.0_6mA@v2; repeatable or comma-separated; 'none' for none). Takes precedence over the input headers.
--dorado — The dorado program (or its install folder). Default: $FIBERHMM_DORADO, PATH, then the usual install locations.
--dorado-model — dorado basecalling model: fast/hac/sup[@vX.Y.Z], a model complex such as sup,6mA, or a model folder (default sup).
--dorado-modified-bases — dorado --modified-bases codes (default: 6mA for hia5, none for ddda/dddb, whose deaminations are read from the sequence); 'none' to basecall without a modification model.
--dorado-modbase-models — dorado --modified-bases-models: comma-separated model names or paths (instead of --dorado-modified-bases).
--dorado-device auto dorado --device: auto (default), metal, cuda:all, cuda:0, cpu.
--dorado-batchsize — dorado --batchsize (default: dorado chooses).
--dorado-models-dir — Where dorado keeps downloaded models (default $FIBERHMM_DORADO_MODELS_DIR or ~/.fiberhmm/dorado_models).
--dorado-args — Other dorado basecaller options, quoted as one string (e.g. --dorado-args "--min-qscore 8").
--tracks off Also extract nucleosome/MSP/TF/deamination (or m6A) tracks into OUTDIR/tracks (bigBed; BED without bedToBigBed).
--redo — Redo this step and the later ones although complete (also needed to change the inputs or settings of an existing OUTDIR; discards an interrupted call's resumable state). 'all' is every step after basecalling; only --redo basecall basecalls again. Choices: all, basecall, align, call, qc, tracks.
--progress-json — Append JSON-lines progress events to FILE ('-' for stdout).
-v / --verbose off Echo the output of fiberhmm-call, -qc and -extract.
-q / --quiet off No progress messages on stderr.

fiberhmm-call

Flag Default Description
-i / --input required Input BAM. Use "-" for stdin (streaming mode).
-o / --output required Output BAM path or "-" for stdout (unsorted).
-m / --model — Apply HMM model JSON. If omitted, bundled model for --enzyme/--seq is used.
--recall-model — Separate model for TF LLR tables. Default: reuse apply model.
--enzyme — Bundled enzyme preset. Choices: ddda, dddb, hia5.
--seq — Sequencing platform. For Hia5 it selects the model; when omitted it is detected from the input (MM specs: PacBio T-a vs Nanopore A+a only; header records) and the run stops if the evidence conflicts. A given --seq that the reads contradict is refused (see --force-seq). For dddb/ddda it only sets the declared platform. Choices: pacbio, nanopore.
--force-seq off Use the given --seq even when the input's MM specs or header say the reads come from the other platform (normally refused: the wrong platform model changes the calls, e.g. ~100x more TF calls for Nanopore reads called as PacBio), and run Hia5 even when the first reads carry no m6A calls.
--basecaller-info — Basecaller provenance to record when the input does not say (or says wrongly): key=value pairs, e.g. "program=dorado version=0.9.6 basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.0.0" (keys: program, version, basecall_model, modbase_models). Default: read from the input header (@RG DS > @PG CL > per-read RG).
--modbase-model — Modification model that called the input's MM/ML tags (repeatable or comma-separated; 'none' for none). Overrides the header.
--replace-chemistry off Replace, instead of reconcile with, the input BAM's FIBERHMM-CHEMISTRY declaration (re-calling a BAM with a deliberately different chemistry).
--reference — Reference FASTA for DAF-seq BAMs that lack both R/Y IUPAC encoding and MD tags. When present, acts as a fallback source for deamination-site detection (R/Y codes and a usable MD tag take precedence). Must match the BAM's assembly and be faidx-indexed.
-k / --context-size — Context size override. Default: from model.
--edge-trim 10 Bases to mask at edges (default 10)
--min-mapq 0 Min mapping quality (default 0)
--prob-threshold — Min MM/ML modification probability 0-255. Default: chemistry preset -- 248 for Hia5 Nanopore (--seq nanopore, given or detected), 128 otherwise. R/Y- and MD-encoded DAF input is binary and ignores it.
--min-read-length 1000 Min read length: the full SEQ, soft clips included (DAF with --daf-mask-unaligned: the aligned length). Default 1000, as the HMM step has always used.
--msp-min-size 0 Min MSP size (default 0)
--nuc-min-size 85 Min footprint size to count as nucleosome (default 85): only footprints this size or larger bound an MSP; with --hmm-only it also splits footprints into nuc and tf.
--hmm-only off Run the HMM step only (no nucleosome recall, no TF recall) and write every HMM call to MA/AQ: footprints >= --nuc-min-size bp as nuc (nuc.Q: 0, or the HMM posterior-mean byte with --scores), smaller footprints as tf (tf+QQQ, bytes 0: no LLR), wherever they lie (inside MSPs too), and the HMM MSPs as msp. Nothing is dropped, so the output is input for fiberhmm-recall-nucs / fiberhmm-recall-tfs (they read nuc + tf of an hmm-only call as the HMM footprints). Replaces fiberhmm-apply. --legacy-tags adds ns/nl = nuc, as/al = msp.
--keep-msps off With --hmm-only: keep the input's own MSPs (MA/Ma msp, legacy as/al/aq), fibertools FIRE and other non-footprint groups instead of writing the HMM's MSPs (e.g. MSPs from fibertools). Replaces fiberhmm-apply --no-msps.
-t / --train-reads — TSV with a "rid" column of read names to leave uncalled (passed through), e.g. the reads a custom model was trained on.
--with-scores / --scores off Write the HMM posterior-mean nq score of baseline nucleosomes (with --no-recall-nucs; nucleosome recall writes its own LLR-based nq). No aq is written. With --hmm-only: the HMM nq of every nuc.
-r / --circular off Enable circular molecule mode (3x tile internally, emit wrapped MA/AQ/AN annotations).
--process-unmapped / --no-process-unmapped auto Call unmapped reads that carry SEQ + MM/ML. Default: automatic -- on for stdin, unindexed and unaligned (uBAM) input, off (pass-through) for indexed aligned BAMs. A run that skips >90% of records as unmapped fails unless --no-process-unmapped is given.
--alignments primary-supplementary Alignment records to call (default primary-supplementary): primary and supplementary records, the parts of a split read (e.g. both sides of a structural variant); secondary records, alternative placements of the same bases, pass through uncalled. On a supplementary record only its aligned bases are called. "primary" calls primary records only; "all" also calls secondary records. Hard-clipped records whose MM/ML cannot match SEQ are always skipped (hard_clipped_mm). Choices: primary, primary-supplementary, all.
--primary — Same as --alignments primary.
--no-primary — Same as --alignments all.
--min-llr — Native LLR cost per TF interval in joint decoding (default: enzyme preset; not a calibrated FDR threshold).
--min-opps 3 Min informative target positions per TF call (default 3).
--unify-threshold 90 v2 nucs with nl < this may be demoted to tf+ (default 90).
--emission-uplift — Emission power transform. Default: enzyme preset.
--use-m5c / --no-use-m5c auto DddA CpG-aware calling: CpG observations are excluded from the first-pass HMM and from nucleosome and TF recall, except inside confident unmethylated island calls (MA ddda_ucg from fiberhmm-tag-m5c) the input already carries. The same mask applies in fiberhmm-call --hmm-only, -posteriors and -pair/-merge. Default: on for --enzyme ddda, off otherwise. --no-use-m5c turns the mask off, for organisms without CpG methylation (e.g. Drosophila); it is recorded in @PG and inherited by recall-tfs/-nucs, pair/merge, posteriors and consensus.
--cpg-mask-policy — With CpG-aware calling (HMM and recall): keep CpGs only inside ddda_ucg islands (default unmethylated-only), or mask only ddda_mcg spans (methylated-only, the former behaviour). DddA only; ignored with a warning otherwise. Choices: unmethylated-only, methylated-only.
--legacy-tags off Also write the legacy ns/nl/nq (nucleosomes) and as/al (MSPs) tags beside MA/AQ, for FiberBrowser <= 3.1.0 (blank read rows without them), fibertools <= 0.12 and old scripts. Default: MA/AQ only (FiberHMM, fibertools >= 0.13 and FiberBrowser >= 3.1.1 read MA); legacy tags on rewritten records are removed.
--no-legacy-tags off Deprecated no-op: MA-only output is the default.
--downstream-compat off Skip MA/AQ; write TF calls into legacy ns/nl track.
--recall-nucs / --no-recall-nucs auto Split over-merged nucleosomes + resolve platform-aware edges (emits nuc.QQQ) and promote nucleosome-sized TF leaks to nuc. ON by default for all enzymes (DddA uses phase-aware radial inference, others the accessible-cut Kadane split). Use --no-recall-nucs for baseline HMM nucleosomes (nuc.Q).
--split-min-llr 4.0 Min accessible-run LLR to split a nucleosome; for DddA, the molecule-local linker-residue configuration LLR (default 4.0).
--split-min-opps 3 Min informative positions in a nucleosome-splitting cut or DddA linker residue (default 3).
--ddda-derived-tf-max-edge-gap 12 DddA phase-aware radial recall only: TF calls exposed solely by nucleosome refinement must have a deamination hit within BP on both sides (default 12). Original HMM-accessible TF scan space is unchanged. Use -1 to disable the safeguard.
--nuc-recall-policy auto Nucleosome recall policy: conservative (default; auto resolves to it) or topology (keeps fragment structure in nucleosome recall; works well on some ONT Hia5 datasets). Not available for DddA. Choices: auto, conservative, topology.
--chimeras flag DAF strand-swap chimeras: flag (default) retains reads uncalled with SAM 0x200 and xc:Z:strand_swap; remove drops all records of the read; keep disables detection and clears earlier FiberHMM chimera marks and attempts calls; split cuts each chimeric alignment the detector flags at its breakpoint gaps (found by the strict segmentation, with either detector) into single-strand pieces, one per segment (<name>/c0, <name>/c1, ... from left to right; a read with several switches gives more than two; the gaps are dropped, pieces shorter than --min-read-length are dropped, MM/ML are re-indexed to each piece; unmapped records stay whole and flagged) that are called separately. No strand-swap detection for m6A modes. Choices: flag, remove, keep, split.
--keep-chimeras off Deprecated alias for --chimeras keep (DAF only).
--chimera-detector standard DAF strand-swap chimera detector. standard (default): one CT/GA switch with --chimera-min-seg events per segment at --chimera-purity, every deamination counted (unchanged from 3.2.1). strict (opt-in): min_seg 10 and purity 0.9 by default, plus --chimera-min-baseq, --chimera-min-span, --chimera-multi-switch and --chimera-error-mask, duplicate-flagged reads not counted and a graded chimera row in QC (QC grade WARN >= 10%, high >= 20%). Choices: standard, strict.
--chimera-min-seg 5 DAF chimera: min same-strand deamination events per segment to call a swap (default 5; 10 with --chimera-detector strict).
--chimera-purity 0.8 DAF chimera: min same-strand purity per segment (default 0.8; 0.9 with --chimera-detector strict).
--chimera-min-baseq — Strict DAF chimera detector only: deamination events count for the chimera test only with base quality >= this (default 15; no effect on records without QUAL; 0 disables). Also anchors split-mode breakpoints. Calling is unaffected.
--chimera-min-span — Strict DAF chimera detector only: min span in query bp from the first to the last same-strand event of each segment (default 200; 0 disables).
--chimera-multi-switch / --no-chimera-multi-switch auto Strict DAF chimera detector only: also detect reads with several switches (for example CT -> GA -> CT, an opposite-strand island), each segment passing the same rule; split mode cuts them into all their pieces (default on).
--chimera-error-mask / --no-chimera-error-mask auto Strict DAF chimera detector only: build a chimera-only mask of recurrent opposite-strand error sites during the DAF SNP screen and drop events there from the chimera test (default on; written to qc/<stem>.daf_snps.chimera_error_mask.bed/.json, never applied to calling). Needs the SNP screen: without it there is no error mask.
--daf-mask-runs — DAF only: thin targets lying in same-strand runs of >= N original C (CT) or G (GA) bases (CC/GG and longer at N=2; see --daf-run-policy). Adjacent conversions are coupled and do not follow the per-site emission model. Default: 2 with keep-one for --enzyme ddda (duplex-validated), off otherwise; 0 disables.
--daf-run-policy keep-one With --daf-mask-runs: keep the 5'-most target of each run (keep-one, default) or remove the whole run (drop). Choices: keep-one, drop.
--daf-mask-unaligned / --no-daf-mask-unaligned on DAF only: treat query bases with no reference counterpart (CIGAR insertions and soft clips) as no evidence, like SNP-masked sites, and leave unaligned stretches of >= 50 bp uncalled (default on). Deaminations are read-versus-reference mismatches, so these bases can never carry one; --no-daf-mask-unaligned restores the pre-3.0 encoding, which counts them as protected.
--daf-insert-consensus auto DAF only: give insertions carried by many reads real evidence. A pre-pass clusters CIGAR insertions >= 50 bp by breakpoint, builds a deamination-aware consensus of each cluster with enough carriers (a column that is sometimes C and sometimes T on C->T reads is a C; G/A likewise) and re-encodes each carrier's inserted bases against it; other insertions stay masked. auto (default): on for file input with --daf-mask-unaligned; off: mask only. Choices: auto, off.
--daf-insert-min-carriers 20 Carriers an insertion needs for --daf-insert-consensus (default 20).
--daf-snp-mask — DAF only: 0-based BED of recurrent C>T/G>A SNP sites to exclude from deamination observations. MD is preserved.
--daf-call-snps auto DAF only: force two-pass recurrent opposite-conversion SNP masking. By default file-based DddA/DddB runs screen automatically after a bounded depth preflight.
--no-daf-call-snps auto Disable automatic recurrent SNP screening.
--daf-snp-output-prefix — Output prefix for --daf-call-snps (default: qc/<output BAM stem>.daf_snps).
--daf-snp-min-fraction 0.2 Minimum opposite-direction fiber fraction for --daf-call-snps (validated default 0.2).
--daf-snp-min-depth 5 Minimum fiber depth in each conversion-direction class for --daf-call-snps (validated default 5; all thresholds must pass in both classes).
--daf-snp-min-alt-fibers 5 Minimum alternate fibers in each direction for --daf-call-snps (validated default 5).
--daf-snp-min-dominant-events 5 Minimum dominant conversions to classify a fiber for --daf-call-snps (default 5).
--daf-snp-min-dominant-purity 0.8 Minimum conversion-direction purity for --daf-call-snps (default 0.80).
--daf-snp-all-snvs off DAF only: the SNP screen also reports the other recurrent SNVs (every substitution except C>T/G>A, same thresholds on fibers of each conversion direction) in its VCF, so fiberhmm-extract --variants auto gets a fuller site list. The BED mask is unchanged.
--daf-snp-min-amplicon-reads 20 Minimum aligned reads required to discover and plot an amplicon consensus in SNP QC (default 20).
--ddda-mcg off Deprecated integrated per-CpG mode; retained only to emit a clear migration error. Run fiberhmm-call, then fiberhmm-tag-m5c (whole CpG islands), then fiberhmm-call again on the tagged BAM.
--dedup auto DAF (ddda/dddb) only: force PCR duplicate detection (already automatic for file-based DddA/DddB calls). Detect by deamination-pattern fingerprint (see fiberhmm-dedup) and similar alignment ends BEFORE footprinting. The integrated default is nondestructive: retain every read and set 0x400 plus di/ds cluster tags. Amplicon/UMI-less DAF libraries can be heavily PCR-duplicated and coordinate dedup does not apply. Requires a file input (not stdin). Ignored for fiber-seq (hia5).
--no-dedup auto Disable automatic DddA/DddB duplicate marking.
--dedup-min-jaccard 0.95 Deamination-set Jaccard threshold for --dedup (default 0.95). Use 0.90 for optional more aggressive matching; lower thresholds can merge distinct molecules.
--dedup-flag-only off Deprecated compatibility spelling for the nondestructive integrated default (0x400 + di/ds; retain every read).
--dedup-collapse off With --dedup: destructively collapse each duplicate cluster to one representative. Default: mark and retain all reads.
--dedup-min-deam 10 With --dedup: reads with fewer deamination calls are not fingerprinted and pass through (default 10).
--dedup-prob-threshold — With --dedup: min ML probability for MM/ML-native dU calls, 0-255 (default: the calling --prob-threshold, 128). R/Y and MD inputs are binary and ignore it.
--dedup-ignore-strand off With --dedup: cluster reads across deamination flavours (C->T with G->A reads). Default: only reads of the same flavour can be duplicates.
--dedup-max-end-diff 50 With --dedup: maximum difference at both aligned reference ends for duplicate matching (default 50 bp).
--dedup-stats-tsv — With --dedup: write a cluster_id<TAB>n_reads table.
-c / --cores 4 Worker processes (0 = all CPUs; default 4).
--chunk-size 500 Reads per worker chunk (default 500; streaming mode only).
--io-threads 8 htslib I/O threads per stage (default 8).
--max-reads 0 0 = no limit (default; streaming mode only)
--qc / --no-qc on Run bounded signal/periodicity/footprint QC after a file output (default: on; use --no-qc to disable).
--qc-sample-reads 2000 Target random-window QC sample size (default 2000).
--qc-seed 20260824 Deterministic QC sampler seed (default 20260824).
--qc-min-mapq 0 Minimum mapping quality for the QC sample (default: 0, no filtering).
--qc-output-prefix — QC output prefix (default: qc/<BAM stem> beside output BAM).
--region-parallel off Process genomic regions in parallel (one worker per region). Scales linearly with --cores up to chromosome count. Requires coordinate-sorted + indexed input BAM. Recommended for full-genome runs; use streaming for stdin/unaligned.
--region-size 10000000 Region size in bp for --region-parallel (default 10 Mb).
--skip-scaffolds off Skip scaffold/contig chromosomes in region-parallel mode.
--chroms — Only process these chromosomes (region-parallel mode).
--resume off Continue an interrupted --region-parallel run: regions finished in the work directory are reused, missing or partial regions are rerun, then the output is merged and published as usual. Refused if the input BAM or any effective parameter changed. Implies --region-parallel for an indexed, aligned input; with no work directory present a new run starts. Streaming (stdin, unindexed) runs cannot resume.
--work-dir — Region-parallel work directory holding finished region BAMs and the resume manifest (default: .<output name>.fiberhmm-work beside the output). Kept when a run fails or is interrupted; removed after a successful publish.
--keep-work-dir off Keep the region-parallel work directory after a successful run.
--progress-json — Write machine-readable progress, one JSON object per line, to stderr (no value) or append to FILE: start, region (regions done/total, reads, reads/s, ETA), merge, done and stopped events (schema fiberhmm.progress.v1).

fiberhmm-apply

Flag Default Description
-i / --input required Input BAM file with modification calls, or "-" for stdin (unaligned and unindexed BAMs are streamed)
-m / --model — Path to trained HMM model (.json, .npz, or .pickle). If omitted, the bundled model for --enzyme/--seq is used.
-o / --outdir required Output directory, or "-" to write BAM to stdout (for piping)
--enzyme — Auto-select a supported bundled chemistry model. Use --seq pacbio|nanopore for Hia5. Choices: ddda, dddb, hia5.
--seq — Hia5 sequencing platform. When omitted it is detected from the input (MM specs: PacBio T-a vs Nanopore A+a only; header records); conflicting evidence stops the run, and a given --seq that the reads contradict is refused (see --force-seq). Ignored for dddb/ddda. Choices: pacbio, nanopore.
--force-seq off Use the given --seq even when the input's MM specs or header say the reads come from the other platform (normally refused: the wrong platform model changes the calls, e.g. ~100x more TF calls for Nanopore reads called as PacBio), and run Hia5 even when the first reads carry no m6A calls.
-k / --context-size — Context size (auto-detected from model if not specified)
--cores / -c 1 Number of CPU cores (0=auto, default: 1)
--io-threads 4 Number of htslib decompression/compression threads for BAM I/O (default: 4)
--streaming off Use streaming pipeline mode (works with unaligned/unindexed BAMs and stdin). Recommended for unaligned data or when reading from pipes.
--chunk-size 500 Reads per compute chunk in streaming mode (default: 500)
--min-mapq / -q 0 Minimum mapping quality; reads below this are written to output unchanged without footprint/nucleosome tags. Default 0 (call on all mapped reads). Pass a positive value to filter.
--prob-threshold — Minimum MM/ML probability (0-255) to call a modification. Default: chemistry preset -- 248 for Hia5 Nanopore (--seq nanopore, given or detected), 128 otherwise. R/Y- and MD-encoded DAF input is binary and ignores it.
--min-read-length 1000 Minimum read length in bp, as the HMM models it: the full SEQ length, soft clips included (DAF with the default --daf-mask-unaligned: the aligned length, since soft-clipped bases carry no evidence). Shorter reads are written to output unchanged without footprint/nucleosome tags. Set to 0 to attempt calling on all reads regardless of length (default: 1000)
-t / --train-reads — TSV file of read IDs used in training (to exclude)
--alignments primary-supplementary Alignment records to call (default primary-supplementary): primary and supplementary records, the parts of a split read (e.g. both sides of a structural variant); secondary records, alternative placements of the same bases, pass through uncalled. On a supplementary record only its aligned bases are called. "primary" calls primary records only; "all" also calls secondary records. Hard-clipped records whose MM/ML cannot match SEQ are always skipped (hard_clipped_mm). Choices: primary, primary-supplementary, all.
--primary — Same as --alignments primary.
--no-primary — Same as --alignments all.
--process-unmapped / --no-process-unmapped auto Process unmapped reads that have sequences and modification tags. Default: automatic -- on for stdin, unindexed and unaligned (uBAM) input. A run that skips >90% of records as unmapped fails unless --no-process-unmapped is given.
--edge-trim / -e 10 Bases to trim from read edges (default: 10)
-r / --circular off Enable circular mode (tiles reads 3x)
--scores off fiberhmm-call --scores: the HMM posterior-mean nq byte of each nucleosome (nuc.Q). No MSP score.
--msp-min-size 0 Minimum size for MSP regions in bp. Default 0 (emit every accessible run; matches fibertools, which does not impose an MSP size filter at this stage). Pass a positive value to filter.
--nuc-min-size 85 Minimum footprint size (bp) to count as nucleosome-sized for MSP boundary detection. Only footprints >= this size split MSPs; smaller footprints are absorbed (default: 85)
--no-msps off fiberhmm-call --keep-msps: keep the input's own MSPs (and fibertools FIRE) instead of writing the HMM's.
--stats off Generate summary statistics and plots
--stats-sample — fiberhmm-call --qc-sample-reads (with --stats).
--stats-seed — fiberhmm-call --qc-seed (with --stats).
--output-posteriors — Ignored with a warning: export posteriors with fiberhmm-posteriors.
--daf-mask-runs — Thin DAF targets in same-strand runs of >= N original C (CT) or G (GA) bases (N=2: CC/GG and longer). Default: 2 with keep-one for DddA (duplex-validated), off otherwise; 0 disables.
--daf-run-policy keep-one With --daf-mask-runs: keep each run's 5'-most target (default) or drop the run. Choices: keep-one, drop.
--daf-mask-unaligned / --no-daf-mask-unaligned on DAF only: treat insertion and soft-clip bases as no evidence and leave unaligned stretches of >= 50 bp uncalled (default on, as in fiberhmm-call).
--use-m5c / --no-use-m5c auto DddA CpG-aware calling, as in fiberhmm-call: CpG observations are hidden from the HMM except inside confident unmethylated islands (MA ddda_ucg from fiberhmm-tag-m5c) the input carries. Default: on for --enzyme ddda, off otherwise.
--cpg-mask-policy — With CpG-aware calling: keep CpGs only inside ddda_ucg islands (default unmethylated-only), or mask only ddda_mcg spans (methylated-only). DddA only; ignored with a warning otherwise. Choices: unmethylated-only, methylated-only.
--legacy-tags off Also write the legacy ns/nl/nq (nucleosomes) and as/al (MSPs) tags beside MA/AQ, for FiberBrowser <= 3.1.0 (blank read rows without them), fibertools <= 0.12 and old scripts. Default: MA/AQ only (FiberHMM, fibertools >= 0.13 and FiberBrowser >= 3.1.1 read MA); legacy tags on rewritten records are removed.
--no-legacy-tags off Deprecated no-op: MA-only output is the default.
--harmonize-legacy-tags off Deprecated: --legacy-tags now writes the harmonized view (ns/nl = the MA nucleosomes, as/al = MSPs); mapped to --legacy-tags with a warning.

fiberhmm-recall-tfs

Flag Default Description
-i / --in-bam required Input BAM with HMM calls (fiberhmm-call --hmm-only; MA first, legacy ns/nl/as/al without MA). Use "-" for stdin.
-o / --out-bam required Output BAM with MA/AQ + refreshed legacy tags. Use "-" for stdout (for piping to ft fire, samtools, etc).
-m / --model — FiberHMM model JSON. If omitted, the bundled model for --enzyme/--seq is used automatically.
--enzyme — Enzyme preset: auto-selects the bundled model and min-llr/emission-uplift defaults (ddda, dddb, hia5). Choices: ddda, dddb, hia5.
--seq — Hia5 sequencing platform. When omitted it is taken from the input's FIBERHMM-CHEMISTRY declaration or detected from its MM specs (PacBio T-a vs Nanopore A+a only); conflicting evidence stops the run, and a given --seq that the reads contradict is refused (see --force-seq). Ignored for dddb/ddda. Choices: pacbio, nanopore.
--force-seq off Use the given --seq even when the input's MM specs or header say the reads come from the other platform (normally refused: the wrong platform model changes the calls, e.g. ~100x more TF calls for Nanopore reads called as PacBio), and run Hia5 even when the first reads carry no m6A calls.
--replace-chemistry off Replace, instead of reconcile with, the input BAM's FIBERHMM-CHEMISTRY declaration. By default a custom --model inherits the input's enzyme/platform when its observation mode matches, and a conflicting --enzyme/--seq is refused.
--daf-mask-runs — DAF only: thin targets lying in same-strand runs of >= N original C (CT) or G (GA) bases (CC/GG and longer at N=2; see --daf-run-policy). Adjacent conversions are coupled and do not follow the per-site emission model. Default: 2 with keep-one for --enzyme ddda (duplex-validated), off otherwise; 0 disables.
--daf-run-policy keep-one With --daf-mask-runs: keep each run's 5'-most target (default) or drop the run. Choices: keep-one, drop.
--daf-mask-unaligned / --no-daf-mask-unaligned on DAF only: treat CIGAR insertion and soft-clip bases as no evidence and leave unaligned stretches of >= 50 bp uncalled (default on, as in fiberhmm-call).
--daf-insert-consensus auto DAF only: re-encode insertions carried by enough reads against their deamination-aware consensus, as in fiberhmm-call (default auto: file input). Choices: auto, off.
--daf-insert-min-carriers 20 Carriers an insertion needs for --daf-insert-consensus (default 20).
--min-llr — Override native LLR cost per TF interval in joint decoding (nats; default: enzyme preset; not an FDR threshold).
--prob-threshold — Min MM/ML probability 0-255 for re-reading modification calls. Default: chemistry preset -- 248 for Hia5 Nanopore (--seq nanopore, or the input's declared chemistry), 125 otherwise. R/Y- and MD-encoded DAF input is binary and ignores it.
--min-opps 3 Min informative target positions per call (default 3)
--emission-uplift — Power transform on emission probabilities. Default 1.0 (identity). Use a pre-uplifted model file (e.g. ddda_TF.json) for DddA rather than setting this.
--use-m5c / --no-use-m5c auto CpG-aware DddA recall (the DddA CpG mask). By default, retain CpGs only inside confident ddda_ucg MA spans. Enabled automatically for DddA, disabled for other enzymes; use --use-m5c explicitly with a custom DddA model. --no-use-m5c turns the mask off (organisms without CpG methylation, e.g. Drosophila). Unset, an input whose calls were made with --no-use-m5c (recorded in its @PG) is recalled with the mask off.
--cpg-mask-policy — CpG-aware policy: retain CpGs only inside confident unmethylated islands (default unmethylated-only), or reproduce the former behavior that masks only ddda_mcg spans. DddA only; ignored with a warning otherwise. Choices: unmethylated-only, methylated-only.
--unify-threshold 90 v2 nucs with nl < this are scanned + may be demoted to tf+ if overlapped by a recaller call (default 90)
--input-frame auto Coordinate frame of the input ns/nl/as/al tags. "auto" (default) follows the @PG PP chain: the last footprint writer decides (fibertools predict-m6a/add-nucleosomes/fire -> molecular; FiberHMM call/apply/recall -> molecular when declared coord=molecular, else query); no writer -> molecular if coord=molecular is declared, else query (FiberHMM <= 2.12); a header with no writer and no declaration (stripped @PG) is read as query, except reads whose MA has a "." nuc/msp/tf group (molecular). Merged histories whose writers disagree, with no declaration, stop the run at the first read with these tags. A wrong frame mirrors reverse-strand calls. fibertools Ma tags are always molecular. Choices: auto, molecular, query.
--legacy-tags off Also write the legacy ns/nl/nq (nucleosomes) and as/al (MSPs) tags beside MA/AQ, for FiberBrowser <= 3.1.0 (blank read rows without them), fibertools <= 0.12 and old scripts. Default: MA/AQ only (FiberHMM, fibertools >= 0.13 and FiberBrowser >= 3.1.1 read MA); legacy tags on rewritten records are removed.
--no-legacy-tags off Deprecated no-op: MA-only output is the default.
--downstream-compat off Downstream-compatibility mode: skip MA/AQ entirely and write TF calls INTO the legacy ns/nl tag alongside nucleosomes (sorted by start). Use for older tools that do not understand the Molecular-annotation spec. Loses per-TF quality scoring (tq/el/er) -- positions and lengths only.
-c / --cores 1 Worker processes (0 = all CPUs; default 1).
--chunk-size 1024 Reads per worker chunk (default 1024). Larger values reduce IPC overhead; decrease if RAM is constrained (each chunk holds reads in memory).
--io-threads 4 htslib BAM compression threads (default 4).
--context-size — Override context size. Default: read from model.
--max-reads 0 0 = no limit (default)
--recall-nucs / --no-recall-nucs off Enable nucleosome recall before TF recall. (Default on for fiberhmm-recall-nucs.)
--split-min-llr 4.0 Min accessible-cut LLR to split a footprint; for DddA, the molecule-local linker-residue configuration LLR (default 4.0)
--split-min-opps 3 Min informative positions for a split cut or DddA linker residue (default 3)
--ddda-derived-tf-max-edge-gap 12 DddA phase-aware radial recall only: require TF scan space opened solely by nucleosome refinement to have a deamination hit within BP on both sides (default 12; -1 disables).
--nuc-recall-policy auto Nucleosome recall policy: conservative (default; auto resolves to it) or topology (keeps fragment structure in nucleosome recall; works well on some ONT Hia5 datasets). Not available for DddA. Choices: auto, conservative, topology.
--nuc-min-size 85 Min refined nucleosome size; smaller footprints are demoted to accessible/MSP (default 85)
--msp-min-size 0 Min re-derived MSP size to keep (default 0)

fiberhmm-recall-nucs

Flag Default Description
-i / --in-bam required Input BAM with HMM calls (fiberhmm-call --hmm-only; MA first, legacy ns/nl/as/al without MA). Use "-" for stdin.
-o / --out-bam required Output BAM with MA/AQ + refreshed legacy tags. Use "-" for stdout (for piping to ft fire, samtools, etc).
-m / --model — FiberHMM model JSON. If omitted, the bundled model for --enzyme/--seq is used automatically.
--enzyme — Enzyme preset: auto-selects the bundled model and min-llr/emission-uplift defaults (ddda, dddb, hia5). Choices: ddda, dddb, hia5.
--seq — Hia5 sequencing platform. When omitted it is taken from the input's FIBERHMM-CHEMISTRY declaration or detected from its MM specs (PacBio T-a vs Nanopore A+a only); conflicting evidence stops the run, and a given --seq that the reads contradict is refused (see --force-seq). Ignored for dddb/ddda. Choices: pacbio, nanopore.
--force-seq off Use the given --seq even when the input's MM specs or header say the reads come from the other platform (normally refused: the wrong platform model changes the calls, e.g. ~100x more TF calls for Nanopore reads called as PacBio), and run Hia5 even when the first reads carry no m6A calls.
--replace-chemistry off Replace, instead of reconcile with, the input BAM's FIBERHMM-CHEMISTRY declaration. By default a custom --model inherits the input's enzyme/platform when its observation mode matches, and a conflicting --enzyme/--seq is refused.
--daf-mask-runs — DAF only: thin targets lying in same-strand runs of >= N original C (CT) or G (GA) bases (CC/GG and longer at N=2; see --daf-run-policy). Adjacent conversions are coupled and do not follow the per-site emission model. Default: 2 with keep-one for --enzyme ddda (duplex-validated), off otherwise; 0 disables.
--daf-run-policy keep-one With --daf-mask-runs: keep each run's 5'-most target (default) or drop the run. Choices: keep-one, drop.
--daf-mask-unaligned / --no-daf-mask-unaligned on DAF only: treat CIGAR insertion and soft-clip bases as no evidence and leave unaligned stretches of >= 50 bp uncalled (default on, as in fiberhmm-call).
--daf-insert-consensus auto DAF only: re-encode insertions carried by enough reads against their deamination-aware consensus, as in fiberhmm-call (default auto: file input). Choices: auto, off.
--daf-insert-min-carriers 20 Carriers an insertion needs for --daf-insert-consensus (default 20).
--min-llr — Override native LLR cost per TF interval in joint decoding (nats; default: enzyme preset; not an FDR threshold).
--prob-threshold — Min MM/ML probability 0-255 for re-reading modification calls. Default: chemistry preset -- 248 for Hia5 Nanopore (--seq nanopore, or the input's declared chemistry), 125 otherwise. R/Y- and MD-encoded DAF input is binary and ignores it.
--min-opps 3 Min informative target positions per call (default 3)
--emission-uplift — Power transform on emission probabilities. Default 1.0 (identity). Use a pre-uplifted model file (e.g. ddda_TF.json) for DddA rather than setting this.
--use-m5c / --no-use-m5c auto CpG-aware DddA recall (the DddA CpG mask). By default, retain CpGs only inside confident ddda_ucg MA spans. Enabled automatically for DddA, disabled for other enzymes; use --use-m5c explicitly with a custom DddA model. --no-use-m5c turns the mask off (organisms without CpG methylation, e.g. Drosophila). Unset, an input whose calls were made with --no-use-m5c (recorded in its @PG) is recalled with the mask off.
--cpg-mask-policy — CpG-aware policy: retain CpGs only inside confident unmethylated islands (default unmethylated-only), or reproduce the former behavior that masks only ddda_mcg spans. DddA only; ignored with a warning otherwise. Choices: unmethylated-only, methylated-only.
--unify-threshold 90 v2 nucs with nl < this are scanned + may be demoted to tf+ if overlapped by a recaller call (default 90)
--input-frame auto Coordinate frame of the input ns/nl/as/al tags. "auto" (default) follows the @PG PP chain: the last footprint writer decides (fibertools predict-m6a/add-nucleosomes/fire -> molecular; FiberHMM call/apply/recall -> molecular when declared coord=molecular, else query); no writer -> molecular if coord=molecular is declared, else query (FiberHMM <= 2.12); a header with no writer and no declaration (stripped @PG) is read as query, except reads whose MA has a "." nuc/msp/tf group (molecular). Merged histories whose writers disagree, with no declaration, stop the run at the first read with these tags. A wrong frame mirrors reverse-strand calls. fibertools Ma tags are always molecular. Choices: auto, molecular, query.
--legacy-tags off Also write the legacy ns/nl/nq (nucleosomes) and as/al (MSPs) tags beside MA/AQ, for FiberBrowser <= 3.1.0 (blank read rows without them), fibertools <= 0.12 and old scripts. Default: MA/AQ only (FiberHMM, fibertools >= 0.13 and FiberBrowser >= 3.1.1 read MA); legacy tags on rewritten records are removed.
--no-legacy-tags off Deprecated no-op: MA-only output is the default.
--downstream-compat off Downstream-compatibility mode: skip MA/AQ entirely and write TF calls INTO the legacy ns/nl tag alongside nucleosomes (sorted by start). Use for older tools that do not understand the Molecular-annotation spec. Loses per-TF quality scoring (tq/el/er) -- positions and lengths only.
-c / --cores 1 Worker processes (0 = all CPUs; default 1).
--chunk-size 1024 Reads per worker chunk (default 1024). Larger values reduce IPC overhead; decrease if RAM is constrained (each chunk holds reads in memory).
--io-threads 4 htslib BAM compression threads (default 4).
--context-size — Override context size. Default: read from model.
--max-reads 0 0 = no limit (default)
--recall-nucs / --no-recall-nucs on Enable nucleosome recall before TF recall. (Default on for fiberhmm-recall-nucs.)
--split-min-llr 4.0 Min accessible-cut LLR to split a footprint; for DddA, the molecule-local linker-residue configuration LLR (default 4.0)
--split-min-opps 3 Min informative positions for a split cut or DddA linker residue (default 3)
--ddda-derived-tf-max-edge-gap 12 DddA phase-aware radial recall only: require TF scan space opened solely by nucleosome refinement to have a deamination hit within BP on both sides (default 12; -1 disables).
--nuc-recall-policy auto Nucleosome recall policy: conservative (default; auto resolves to it) or topology (keeps fragment structure in nucleosome recall; works well on some ONT Hia5 datasets). Not available for DddA. Choices: auto, conservative, topology.
--nuc-min-size 85 Min refined nucleosome size; smaller footprints are demoted to accessible/MSP (default 85)
--msp-min-size 0 Min re-derived MSP size to keep (default 0)

fiberhmm-qc

Flag Default Description
-i / --input required One or more FiberHMM-compatible BAM/CRAM files; -i may be repeated
-o / --output-dir — QC output directory (default: qc/ beside the input BAMs)
--mode auto Observation mode (default: infer from @PG/tags) Choices: auto, daf, pacbio-fiber, nanopore-fiber.
--enzyme auto Enzyme (default: infer from @PG) Choices: auto, hia5, ddda, dddb.
--reference-profile auto Empirical QC reference (default: assay-aware auto selection) Choices: auto, none, ddda, dddb, hia5_nanopore, hia5_pacbio.
--reference — Indexed FASTA fallback for raw DAF BAMs lacking MD/R/Y
--sample-reads 2000 Target bounded sample size (default 2,000)
--seed 20260824 Deterministic sampler seed (default 20260824)
--min-mapq 0 Minimum mapping quality (default: 0, no filtering)
--prob-threshold — Minimum MM/ML probability, 0-255 (default: 248 for Hia5 Nanopore, the threshold its QC reference is calibrated at; 125 otherwise)
--min-opportunities 200 Minimum target sites per read for rate QC (default 200)
--snp-mask — Applied DAF SNP-mask BED to summarize (single input only)
--snp-report — fiberhmm-daf-snps JSON to plot (single input only)
--state-source auto Where the in-MSP/outside-MSP split comes from: the BAM's FiberHMM calls when the sample carries them, else a bounded light call with the bundled model of the declared chemistry (auto, default); calls only (tags); always re-call (light-call); or skip (none) Choices: auto, tags, light-call, none.
--min-msp-bp 85 Shortest MSP counted as accessible for the in-MSP rate; shorter gaps (linkers) count as outside-MSP (default 85; the packaged references are calibrated at this value)
--light-call-reads 400 Most sampled reads the light call runs on (default 400)
--light-call-seconds 60.0 Wall-time budget of the light call (default 60 s)
--use-m5c / --no-use-m5c auto Light call: DddA CpG mask, as in fiberhmm-call (default: on for DddA unless the input's calls were made with --no-use-m5c; --no-use-m5c turns it off, e.g. for organisms without CpG methylation)
--cpg-mask-policy — Light call, with the DddA CpG mask on: keep CpGs only inside ddda_ucg islands (default unmethylated-only) or mask only ddda_mcg spans, as in fiberhmm-call Choices: unmethylated-only, methylated-only.
--fail-on-qc off Exit 2 when the final status is FAIL

fiberhmm-check

Flag Default Description
PATH — BAM/CRAM/SAM, <prefix>.qc.json, posteriors .tsv(.gz)/.h5, a fiberhmm-consensus output directory, or a fiberhmm-pipeline output directory
--json off Print one JSON document (schema fiberhmm.advisory_check.v1) with a fiberhmm.advisory_report.v1 report per path
--scan-records — BAM records to scan for read-level evidence (duplicate, pairing and call tags); 0 reads the header only (default: 5000)
--no-sidecars off Do not also check the QC report fiberhmm-call writes beside a BAM (qc/<name>.qc.json)
--list off List every known advisory and exit

fiberhmm-extract

Flag Default Description
-i / --input required Input tagged BAM file
-o / --outdir — Output directory (default: same as input)
-c / --cores 1 Number of CPU cores
--nucleosome / --footprint off Extract nucleosomes (ns/nl or MA nuc tags). (--footprint is a deprecated alias.)
--msp off Extract MSPs (as/al tags)
--tf off Extract TF/Pol II footprints from MA/AQ tag (tf.QQQ). Requires a BAM called by fiberhmm-call or fiberhmm-recall-tfs (not --downstream-compat). See --min-tq for the quality floor.
--min-tq 50 Minimum TF quality (tq) to extract. 0-255 scale where tq = min(255, round(LLR * 10)). Default 50 (LLR >= 5 nats, ~148:1 likelihood ratio), the per-interval cost every bundled preset calls with, so it keeps essentially every call. Set 0 for every emitted call, 100+ for a stricter view.
--m6a off Extract m6A positions
--m5c off Extract DddA MA ddda_mcg spans, or native MM/ML 5mC positions
--deam off Extract DAF-seq deamination calls. Priority: (1) MM/ML-native dU calls (mod code "u" or ChEBI 55797); (2) IUPAC R/Y codes in the query sequence (fiberhmm-daf-encode output); (3) MD-tag ref mismatches as a fallback for raw DAF BAMs. First non-empty source wins per read. blockMod: 0 = R/GA-dea, 1 = Y/CT-dea, matching FiberBrowser flavor codes.
--both-strand / --bothstrand off Extract the deam+ / deam- intersection of paired DddA consensus reads as a BED12 coverage overlay.
--variants — Extract the var layer: the allele each read carries at the sites of a VCF/BCF (SNVs, MNVs and indels up to --variants-max-len; symbolic/SV alleles skipped). Any standard VCF works (DeepVariant/Clair3, vg deconstruct, the DAF SNP VCF). "auto" uses the DAF SNP screen VCF of this BAM (qc/<stem>.daf_snps.vcf, or the path its fiberhmm-call @PG records) and fails if there is none. "discover" finds SNVs in the reads first (DAF SNP screen for DAF data, a conservative pileup screen for Fiber-seq; see --variant-caller), caches the VCF per pooled sample and uses it.
--variant-caller auto auto (default): the DAF SNP screen when the BAM is DAF (header, or reads with R/Y, st or dU), else pileup. Choices: auto, daf, pileup.
--variant-cache — Folder for the discovered VCF (default: the output folder). A VCF cached elsewhere is copied beside the var bigBed.
--variants-pool — Another BAM of the same sample, pooled with -i for discovery (repeatable; same reference contigs).
--variants-per-bam off Discover from the input BAM alone (ignore --variants-pool).
--variants-read-groups — Discover only from reads of these @RG IDs (repeatable).
--variants-rg-sample — Discover only from reads of read groups with this SM.
--variants-pool-name — Sample name for the VCF (default: the BAM stem, "<stem>_pool" when pooled).
--variants-chunk-size 1000000 Discovery chunk (bp; default 1000000). Chunks run on --cores workers; finished chunks are kept, so an interrupted run resumes.
--reference — Indexed reference FASTA. The pileup caller takes REF from it; without it, from MD tags or =/X CIGARs (a site no read matches is then skipped). DAF: the screen's fallback for reads lacking MD.
--pileup-min-depth 8 Pileup: minimum high-quality depth (default 8).
--pileup-min-alt-reads 3 Pileup: minimum ALT reads (default 3).
--pileup-min-alt-fraction 0.25 Pileup: minimum ALT fraction (default 0.25).
--pileup-min-baseq 20 Pileup: minimum base quality (default 20).
--pileup-min-mapq 20 Pileup: minimum MAPQ (default 20; independent of -q, which filters the extracted reads).
--pileup-strand-bias-p 0.001 Pileup: FILTER StrandBias below this Fisher p (default 0.001).
--pileup-homopolymer auto Pileup: FILTER Homopolymer at sites in or next to a reference run of --pileup-homopolymer-len. auto (default): on unless the header says PacBio. Choices: auto, on, off.
--pileup-homopolymer-len 4 Pileup: homopolymer run length (default 4).
--pileup-max-indel-fraction 0.25 Pileup: FILTER IndelNear when this fraction of reads delete the site (default 0.25).
--pileup-mod-filter / --no-pileup-mod-filter on Pileup: FILTER ModArtifact at A/T sites whose REF reads are often m6A-called while the ALT fraction is low (default on).
--pileup-mod-min-methylation 0.3 Pileup: REF-read m6A fraction for ModArtifact (default 0.3).
--pileup-mod-max-alt-fraction 0.4 Pileup: ModArtifact only below this ALT fraction (default 0.4).
--pileup-hom-alt-fraction 0.85 Pileup: GT 1/1 at this ALT fraction, else 0/1 (default 0.85).
--daf-snp-min-fraction 0.2 DAF screen: minimum mismatch fraction in each direction (default 0.2, as fiberhmm-daf-snps).
--daf-snp-min-depth 5 DAF screen: minimum depth in each direction (default 5).
--daf-snp-min-alt-fibers 5 DAF screen: minimum mismatch fibers in each direction (default 5).
--variants-sample — Keep only sites where this VCF sample's GT carries an ALT allele.
--variants-het-only off With --variants-sample: keep only heterozygous sites.
--variants-pass-only / --no-variants-pass-only on Keep only sites whose FILTER is PASS or missing (default on; --no-variants-pass-only keeps every record).
--variants-max-len 50 Longest REF/ALT allele kept, not counting the VCF anchor base (default 50). Longer alleles are never matched.
--variants-daf auto DAF conversion handling for var: a T on a C->T read (A on a G->A read) may be a converted C (G), so a site where several alleles fit is coded -3. auto (default): for BAMs that declare DAF and reads carrying R/Y or st; on: every read; off: never. Choices: auto, on, off.
--sv off Extract the sv layer: per-read CIGAR deletions/insertions >= --sv-min-len, end clips >= --sv-min-clip and the SA tag, with supplementary records as their own rows.
--sv-min-len 30 Smallest CIGAR deletion/insertion written to sv (default 30).
--sv-min-clip 100 Smallest soft+hard clip written to sv (default 100).
--all off Extract all tag types (default if none specified): every track plus sv, and var when a VCF is available (--variants, or the DAF SNP screen VCF found next to the BAM).
--bed-only off Output BED only (no bigBed)
--keep-bed off Keep BED files when creating bigBed
-q / --min-mapq 0 Min mapping quality (default: 0, no filtering)
-p / --prob-threshold — Min probability for native MM/ML m6a/m5c/dU calls (0-255). Default: 248 when the BAM declares Hia5 Nanopore (FIBERHMM-CHEMISTRY header), 125 otherwise. Not applied to DddA MA ddda_mcg spans or to R/Y/MD deaminations (binary).
--no-scores off Omit scores from output
--block-scores off Append per-block quality as extra BED column(s) (BED12+N). nucleosome -> blockNq/blockEl/blockEr, msp -> blockAq, m6a/native-m5c -> blockMl (DddA ddda_mcg spans -> 0), tf -> blockTq/blockEl/blockEr. bigBed uses -type=bed12+N and the matching autoSQL schema so FiberBrowser/UCSC can surface per-feature quality without a sidecar database.
--circular-groups off Append circId/circPart/circParts/molStart/molLength columns and preserve MA/AN groups for circular wrapped nucleosome, MSP, and TF features.
--haplotype-fields off Append scalar hp and ps columns copied from the source BAM HP/PS tags after every other optional BED field. Missing or non-integer tags are written as -1. Off by default to preserve the existing BED/bigBed schema byte-for-byte.
--sample-name — Sample/dataset identifier to embed in the autoSQL description of every output bigBed ("Sample: <name>. ..."). Default: BAM basename stem. Lets downstream tools match a bigBed to its source without filename parsing.
--input-frame auto Coordinate frame of legacy ns/nl/as/al tags (read when a read has no MA nuc/msp). "auto" (default) follows the @PG provenance, as fiberhmm-recall-tfs: the last footprint writer decides (fibertools, and FiberHMM declaring coord=molecular -> molecular; FiberHMM <= 2.12 -> query); a header with no evidence (stripped @PG) is read as query, except reads whose MA has a "." nuc/msp/tf group (molecular). Merged histories that disagree stop the run. MA follows its own header rule. Choices: auto, molecular, query.
--region-size 10000000 Region size for parallel
--skip-scaffolds off Skip scaffold chromosomes
--chroms — Comma-separated chromosomes to process
--region — Only reads overlapping this region (1-based inclusive, as samtools; repeatable). Applies to every layer and to --variants discover.
--regions-bed — Only reads overlapping these BED intervals (0-based); combined with --region.
--sort-mem / -S 1G Memory buffer for the BED sort, passed to sort -S (e.g. 4G, 8G, or 50% on GNU sort). Bigger = fewer temp-file merge passes = faster. Default 1G; pass an empty string to disable. The sort also runs under LC_ALL=C regardless, which alone is a large speedup.
--sort-parallel 0 Threads for the BED sort (GNU coreutils only; ignored on BSD/macOS sort). 0 = use --cores. Feature-detected, so safe to leave on.

fiberhmm-dedup

Flag Default Description
-i / --input required Input DAF-seq BAM (indexed not required)
-o / --output required Output BAM
--min-jaccard 0.95 Min deamination-set Jaccard to call two reads the same molecule (default 0.95). Use 0.90 for optional more aggressive matching; lower thresholds can merge distinct molecules.
--flag-only off Keep all reads and only mark duplicates: set the 0x400 duplicate flag on non-representatives and di/ds cluster tags on every member of a duplicate cluster. Default: collapse each cluster to one representative read.
--min-deam 10 Reads with fewer than this many deamination calls are not fingerprintable; passed through untouched (default 10).
--max-end-diff 50 Maximum difference at both aligned reference ends for two reads to be duplicates (default 50 bp).
--ignore-strand off Cluster across deamination flavours. Default: only reads with the same dominant flavour (C->T vs G->A, i.e. the same template strand) can be duplicates; alignment orientation is never used.
-p / --prob-threshold 128 Min ML probability for MM/ML-native dU calls (0-255; default 128, the same as fiberhmm-call). R/Y- and MD-encoded input is binary and ignores it.
--num-hashes 32 MinHash signature width (default 32).
--bands 8 LSH bands; rows = num-hashes / bands (default 8 -> rows 4). More bands = higher recall, more candidate pairs.
--seed 7 MinHash RNG seed (default 7).
--stats-tsv — Write a cluster_id<TAB>n_reads table to this path.
--io-threads 4 htslib BAM compression threads for output (default 4).

fiberhmm-daf-encode

Flag Default Description
-i / --input required Input BAM file, or "-" for stdin
-o / --output required Output BAM path, or "-" for stdout
--reference — Reference FASTA (fallback if MD tag is missing)
-q / --min-mapq 0 Minimum mapping quality (default: 0, no filtering)
--min-read-length 1000 Minimum aligned read length in bp (default: 1000)
--io-threads 4 htslib I/O threads for BAM compression/decompression (default: 4)
--strand auto Force conversion strand: CT (+ strand), GA (- strand), or auto (per-read consensus, default: auto) Choices: CT, GA, auto.

fiberhmm-daf-snps

Flag Default Description
-i / --input required Input aligned BAM with MD tags
-o / --output-prefix — Output prefix (default: <BAM stem>.daf_snps)
--min-fraction 0.2 Minimum mismatch fraction in each direction (validated default 0.2)
--min-depth 5 Minimum depth in each conversion-direction class (validated default 5; all thresholds must pass in both classes)
--min-alt-fibers 5 Minimum mismatch-supporting fibers in each direction (validated default 5)
--min-dominant-events 5 Minimum dominant conversions per classifiable fiber (default 5)
--min-dominant-purity 0.8 Minimum dominant-direction purity (default 0.80)
--min-mapq 0 Minimum mapping quality (default: 0, no filtering)
--min-amplicon-reads 20 Minimum aligned reads required for an amplicon consensus (default 20)
--reference — Indexed FASTA fallback for BAMs lacking MD
--all-snvs off Also report the other recurrent SNVs (every substitution except C>T/G>A), with the same thresholds required on fibers of each conversion direction. Written to the VCF (INFO SCREEN=all_snvs) and JSON, not to the BED mask. Memory grows with the run's sequencing-error load.

fiberhmm-pair

Flag Default Description
-i / --input required Coordinate-sorted, indexed FiberHMM-called DddA BAM
-o / --output required Output BAM: joint duplex molecules by default; paired source reads with --stop-after pair
-r / --reference — Matching indexed FASTA. Required by the default sequence-free score; optional with --sequence-only when MD+CIGAR is available
--sequence-only off Accept only direct A/T sequence-supported pairs; disable the sequence-free model
--pairs-tsv — Write selected-pair evidence to this TSV
--receipt-json — Write a machine-readable pairing receipt
--pairs-only / --paired-only off Write only paired records: merged duplex molecules (default), or paired source reads with --stop-after pair. Otherwise unpaired reads pass through unchanged.
--stop-after recall Last stage to run: pair (tag pairs only), merge (both-strand molecules without re-calling) or recall (default) Choices: pair, merge, recall.
--from-paired off Input is already pair-tagged (mt/mp from an earlier --stop-after pair run): skip pairing and start at merge. Pairing-stage options (--reference, --sequence-only, --pairs-tsv, --model, --min-* ...) are rejected here.
--model — Override the bundled frozen sequence-free model JSON
--call-layer auto Nucleosome calibration for the sequence-free model (default auto) Choices: auto, input-ma, rotational-recall.
--min-margin 1.0 Minimum two-sided sequence-free model margin (default 1.0)
--null-floor 0.0 Virtual null model score for a lone candidate (default 0.0)
--min-overlap 1500 Min genomic overlap bp (default 1500)
--min-nucs 4 Min nucleosome dyads within the overlap, each read (default 4)
--min-sequence-bases 500 Min shared reference-A/T bases for a sequence edge (default 500)
--min-component-discordance-rate 0.02 Min rejected-edge difference rate to constrain a 2x2 (default 0.02)
--max-sequence-pair-rate 0.01 Max difference rate on a sequence-selected pair (default 0.01)
--min-sequence-margin 0.002 Min sequence preference/assignment margin (default 0.002)
-p / --prob-threshold 128 Min ML probability for MM/ML-native dU calls (0-255; default 128, the same as fiberhmm-call). R/Y- and MD-encoded input is binary and ignores it.
--max-component 10000 Safety ceiling for a complete overlap component (default 10000)
--io-threads 4 htslib compression threads for output (default 4)
--no-index off Do not index a paired-source output
--ddda-derived-tf-max-edge-gap 12 Edge-evidence requirement for TF calls exposed only by DddA nucleosome refinement (default 12; -1 disables)
--use-m5c / --no-use-m5c auto Joint recall: DddA CpG-aware calling, as in fiberhmm-call -- CpG observations are excluded from the joint HMM and from recall except inside the source reads' ddda_ucg islands (fiberhmm-tag-m5c). Default: on for DddA, unless the input's calls were made with --no-use-m5c (recorded in its @PG); --no-use-m5c turns the mask off (e.g. organisms without CpG methylation).
--cpg-mask-policy — With CpG-aware calling: keep CpGs only inside ddda_ucg islands (default unmethylated-only), or mask only ddda_mcg spans (methylated-only), as in fiberhmm-call. Choices: unmethylated-only, methylated-only.
--daf-mask-runs — Thin DAF targets in same-strand runs of >= N original C (CT) or G (GA) bases (N=2: CC/GG and longer). Default: 2 with keep-one for DddA (duplex-validated), off otherwise; 0 disables.
--daf-run-policy keep-one With --daf-mask-runs: keep each run's 5'-most target (default) or drop the run. Choices: keep-one, drop.

fiberhmm-merge

Flag Default Description
-i / --input required BAM from fiberhmm-pair (mt/mp tags)
-o / --output required Output consensus BAM (sorted + indexed)
--pairs-only off Emit only consensus reads (default: also pass through unmerged reads)
--recall off Re-call footprints on each both-strand consensus read (HMM, nucleosome and TF recall over both strands; writes MA nuc/msp/tf, plus ns/nl/as/al with --legacy-tags). Reads the deam+/deam- regime and uses C and G targets jointly.
--enzyme ddda Model preset for --recall (default ddda)
--ddda-derived-tf-max-edge-gap 12 With --recall, require TF calls exposed solely by DddA radial nucleosome refinement to have a deamination hit within BP on both sides (default 12; -1 disables).
--use-m5c / --no-use-m5c auto With --recall: DddA CpG-aware calling, as in fiberhmm-call (CpGs excluded from the joint HMM and from recall except inside the source reads' ddda_ucg islands). Default: on for --enzyme ddda, unless the input's calls were made with --no-use-m5c (recorded in its @PG); --no-use-m5c turns the mask off.
--cpg-mask-policy — With CpG-aware calling: keep CpGs only inside ddda_ucg islands (default unmethylated-only), or mask only ddda_mcg spans (methylated-only), as in fiberhmm-call. Choices: unmethylated-only, methylated-only.
-p / --prob-threshold 128 Min ML probability for MM/ML-native dU calls (0-255; default 128, the same as fiberhmm-call). R/Y- and MD-encoded input is binary and ignores it.
--io-threads 4 htslib compression threads (default 4)
--daf-mask-runs — Thin DAF targets in same-strand runs of >= N original C (CT) or G (GA) bases (N=2: CC/GG and longer). Default: 2 with keep-one for DddA (duplex-validated), off otherwise; 0 disables.
--daf-run-policy keep-one With --daf-mask-runs: keep each run's 5'-most target (default) or drop the run. Choices: keep-one, drop.
--legacy-tags off Also write the legacy ns/nl/nq (nucleosomes) and as/al (MSPs) tags beside MA/AQ, for FiberBrowser <= 3.1.0 (blank read rows without them), fibertools <= 0.12 and old scripts. Default: MA/AQ only (FiberHMM, fibertools >= 0.13 and FiberBrowser >= 3.1.1 read MA); legacy tags on rewritten records are removed.
--no-legacy-tags off Deprecated no-op: MA-only output is the default.

fiberhmm-lift

Flag Default Description
-i / --input required Source BAM (a BED file with --bed: plain, gzip or bgzip, - for stdin; the lifted BAM with --repair-only)
-o / --output required Output BAM (sorted, indexed) or BED (bgzip-compressed when the name ends in .gz)
--engine — native: graphlift liftbam (liftbed with --bed) through --map (the default when --map is given); vg (fallback): vg inject/surject through --graph (the default otherwise) Choices: native, vg.
-m / --map — graphlift chain map manifest (X.chain.graphlift.json, from graphlift gbz2chain) whose sources are the input's contigs
--liftbam — graphlift liftbam binary (default: liftbam on PATH)
--liftbed — --bed: graphlift liftbed binary (default: next to --liftbam, else liftbed on PATH)
--split-gap 10000 native: split a record into supplementaries at a read or target gap of at least BP (default: 10000)
--alt never native: 'fallback' lifts a record through an alternative chain when no primary chain of the map projects it (default: never) Choices: never, fallback.
--unlifted — native: write the records that could not be lifted here (source coordinates, Yu:Z:<reason>; with --bed the rows, after a #reason line, bgzip-compressed for a .gz name); they are always counted
--min-match 0.0 native --bed: lift a BED interval (or BED12 block) only if a fraction F of its bases project (liftOver's -minMatch; default 0: any projected base, the interval shrinks to them, so a mostly unprojected block can lift as a remnant of a few bp, as with vg; 0.5 drops those)
--bed-format auto --bed: how to read the input. bed12: blocks lifted one by one; narrowPeak: the summit (column 10) lifted with the peak (-1 when it does not lift); bed: row by row. thickStart/thickEnd (columns 7-8) are lifted for bed and bed12 when they hold coordinates. auto (default): bed12 when every row has 12+ columns, narrowPeak for a .narrowPeak[.gz] input or a 'track type=narrowPeak' line, else bed Choices: auto, bed, bed12, narrowPeak.
--bed12-partial — --bed: a BED12 row some of whose blocks do not lift. keep (default): keep the blocks that lift (blockCount, sizes, starts and bounds recomputed) when at least one does, and list the dropped blocks in --unlifted with their reasons; drop: drop the whole row Choices: drop, keep.
--edge-columns — --bed, BED12: 1-based columns of per-block genomic left/right edge scores (fiberhmm-extract --block-scores blockEl,blockEr: 14,15 for nucleosome and tf rows), swapped on a row that changes strand. Default: found by name in a bigBedToBed -header line, else none
-g / --graph — Pangenome graph (GBZ) with source and target paths
-p / --prefix — panSN prefix of the source assembly's paths in the graph, e.g. 'HG002#1#' (vg engine)
--target — vg engine: target sample to surject onto, e.g. GRCh38
--target-fasta — FASTA of the target assembly (contig names as in the lifted @SQ). Recomputes MD/NM and rebuilds SA; without it they are dropped. Recommended.
--mapq source MAPQ of lifted records: 'source' (default) keeps the MAPQ of the source alignment, as CrossMap does; 'fixed:N' sets every lifted record to N. Against a diploid source assembly, MAPQ is low wherever the haplotypes are identical. Yq keeps the source value either way.
-d / --delimiter # panSN delimiter (default: #)
--vg — vg binary or wrapper script (default: vg on PATH)
--ft — vg engine, BAM: fibertools-rs ft binary for its pg-pansn stages (default: ft on PATH)
-t / --threads 4 Threads for vg, sorting and BAM I/O (default: 4)
--repair-only off Only repair -i, a BAM already lifted by a vg-based tool (vg inject/surject); needs --source unless fiberhmm-lift stashed it. Orphan supplementaries are kept with Yo:i:1 and 0x800
--bed off -i is a BED file: BED12(+N) rows (fiberhmm-extract) are lifted block by block and reassembled, other BED files row by row
--source — --repair-only: the BAM that was lifted
--source-fasta — --bed --engine vg: FASTA of the source assembly (each interval's sequence is surjected)
--tmp-dir — Directory for intermediate files (default: next to the output)
--keep-intermediate off Keep the intermediate files

fiberhmm-tag-m5c

Flag Default Description
-i / --input required R/Y-encoded, FiberHMM-tagged coordinate BAM
-o / --output required Output BAM
-r / --reference required Reference FASTA
--enzyme required Required chemistry assertion. Only DddA DAF-seq is supported. Choices: ddda.
--posterior 0.99 Whole-island posterior needed for a call: >= this is methylated (ddda_mcg), <= 1 - this unmethylated (ddda_ucg) (default 0.99).
--min-other 10 Minimum non-CpG observations on the molecule's island overlap, the internal accessibility baseline (default 10).
--cpg-islands — Optional BED3 of merged, non-overlapping CpG islands. Default: infer islands from the reference sequence of the contigs the reads map to (header-only contigs need not be in the FASTA).
--write-cpg-islands — Optional BED or BED.GZ containing the exact island catalog used.
--min-island-cpg 15 Minimum CpG observations for a whole-island call (default 15).
--calls-tsv — Optional whole-island audit table containing methylated, unmethylated and uninformative molecule/island overlaps.
--cpg-island-window 200 Reference inference window in bp (default 200).
--cpg-island-step 10 Reference inference step in bp (default 10).
--cpg-island-min-gc 0.5 Minimum GC fraction for inferred islands (default 0.50).
--cpg-island-min-oe 0.6 Minimum CpG observed/expected for inferred islands (default 0.60).
--five-prime-factors — Comma-separated A,C,G,T factors; default calibrated DddA values
--estimate-factors off Estimate 5' factors from this BAM instead of using calibrated values
--factor-sample-reads 5000 Reads sampled by --estimate-factors (default 5000).
--input-frame auto Frame of legacy ns/nl tags when MA is absent. auto follows the @PG provenance, as fiberhmm-recall-tfs --input-frame auto (last footprint writer; no writer: molecular if coord=molecular is declared, else query); a header with no evidence (stripped @PG) is read as query, except reads whose MA has a '.' nuc/msp/tf group (molecular); merged histories that disagree are read as query Choices: auto, molecular, query.
--io-threads 4 htslib BAM compression threads (default 4).

fiberhmm-call-m5c

Flag Default Description
-i / --input required One or more coordinate-sorted, indexed DAF FiberHMM BAMs
-r / --reference required Indexed reference FASTA
-o / --output required Output BED6, or - for stdout
--region required contig[:start-end], 1-based display syntax
--enzyme required Required chemistry assertion. Only DddA DAF-seq is supported. Choices: ddda.
--window 1000 Aggregate window size in bp (default 1000).
--chunk-bp 5000000 Bound observation collection in this many bp; the HMM still runs once across the complete region
--min-other 10 Minimum non-CpG observations for a molecule's per-window baseline (default 10).
--min-cpg 10 Minimum CpG observations for an informative window (default 10).
--posterior 0.99 Window posterior needed to join a called domain (default 0.99).
--max-gap 1000 Maximum gap in bp bridged between called windows of the same state (default 1000).
--five-prime-factors — Comma-separated A,C,G,T factors; default calibrated DddA values
--estimate-factors off Estimate 5' factors from the complete supplied region (explicit high-memory audit option)
--tag-bam — Optionally add whole-island annotations to this BAM
--tag-output — Output BAM for --tag-bam (required with --tag-bam)
--tag-mode island island: one molecule state per complete CpG island (default); locus: copy aggregate validation domains Choices: island, locus.
--cpg-islands — Optional merged BED3 island catalog; default: infer from reference
--write-cpg-islands — Optional BED/BED.GZ recording the exact catalog used
--read-posterior 0.99 Whole-island posterior threshold (default: 0.99)
--read-min-island-cpg 15 Minimum CpGs per molecule-island call (default: 15)
--tag-input-frame auto Frame of tag-BAM legacy ns/nl when MA is absent; auto as in fiberhmm-tag-m5c --input-frame Choices: auto, molecular, query.
--io-threads 4 htslib BAM threads (default 4).

fiberhmm-consensus

Flag Default Description
--max-discovery-molecules — Molecules per dataset and chemical channel for discovery; 0 = all molecules; 2000 is a good cap for deep data (thousands of reads per site) (default 0)
--max-quantification-molecules — Molecules per dataset and chemical channel for quantification; 0 = all molecules; 2000 is a good cap for deep data (thousands of reads per site) (default 0)
--sample-seed — Stable molecule hash seed (default 1)
--schema off Print every parameter group with defaults and help as JSON (cr.engine selects the engine; the default is lattice_recaller)
--bam — Repeat for separate datasets; chemistry comes from BAM @CO metadata
--datasets — JSON list of
--evidence — Saved evidence.json.gz, including pooled evidence
--resume — Start a NEW run (in a new --output) from a finished run directory: reuses its evidence.json.gz, manifest.json and fit_cache to rerun stages. To finish an interrupted multi-window run in place, use --continue
--bed — BED3 windows for independent runs; BED6 with equal widths for CL-CR
--region — Alternative CHROM:START-END, explicitly 0-based half-open
--pool-loci off CL-CR: pool BED6 windows in their provided orientations
--chemistry — Explicit missing-metadata declaration for --bam; conflicts fail Choices: ddda, dddb, hia5-pacbio, hia5-nanopore.
--parameters — JSON parameter groups; see --schema
--engine — Consensus engine (default lattice_recaller; staged_native_families is the deprecated Monte Carlo engine). Overrides cr.engine from --parameters or --resume Choices: lattice_recaller, staged_native_families.
--consolidation-bp — staged_native_families only: shared-family edge allowance (default 10; 5 gives finer grouping)
--stop-after — staged_native_families only: last stage to compute (the lattice recaller runs in one pass) Choices: native, parents, consolidated, resolved.
--start-at native staged_native_families only: consolidation restarts from saved native fits Choices: native, consolidation.
--cores — Worker processes (sets compute.cores; default 4)
--max-memory-gb — Refuse to start, or lower the parallelism, when the pre-run peak-memory estimate exceeds GB: --pool-loci runs lower --cores (the estimate is always logged); independent --bed/--region windows count each window's molecules first and lower --window-jobs, then --cores, so every window's estimated peak (molecules x width) fits (execution only: --continue accepts it). The estimate is a planning figure (~30%)
--evidence-pad — Keep each loaded read's calls, MSPs, nucleosomes and aligned blocks that overlap the window plus BP (sets input.evidence_pad_bp; default 250 here, whole reads in the Python API and FiberBrowser). Calls crossing the pad boundary are kept whole. "full" keeps whole-read geometry (memory grows with read length)
--robust — lattice_recaller only, optional and slower: also rerun discovery under N other read orders and mark which classes are robust to read order (supported in every one of the N+1 orders, or the share set by recaller.order_robust_fraction; classes.tsv columns order_robustness and robust). Takes about N+1 times as long; the classes themselves are unchanged. Sets recaller.order_replicates (default 0 = off)
--discover-fold-spec — Cross-fitted discovery: discover classes only from reads whose read-name hash fold is listed, and score every read (sets recaller.discover_fold_spec). SPEC as fiberhmm-nfr: "hash=md5,mod=10,discover=0-4" (fold = int(md5(read_name), 16) % 10; "+" lists folds, "-" gives ranges)
--fold-weights — With --discover-fold-spec: fit each scoring group's EM weights, spots and edge contraction on all reads (default) or on the held-out folds only (recaller.fold_weights) Choices: all, heldout.
--read-table off Write read_posteriors.tsv.gz per window: every read x class with its posterior, label, fold and the group's broader/other/accessible posteriors (recaller.read_table). With --bed/--region, the windows are also merged into read_table/ (see --role-rules)
--role-rules — With --read-table over BED windows: a role rule file mapping class position relative to each window's anchor and width to role names (schema fiberhmm.consensus.roles.v1; see docs/reference/consensus-read-table.md). No roles are built in. Applied when the merged tables are written, so --continue with a new rule file relabels without recomputing
--anchor-offset 0 Anchor (e.g. TSS) of each BED window for --role-rules and the relative columns: the window's 5' end in BED6 strand orientation plus BP (default 0; 300 for TSS-300..+800 windows)
--nfr-states — With --read-table over BED windows: a fiberhmm-nfr output directory (one run or a --bed run). Joins each read's NFR variant state (molecules.tsv.gz map) by read name and writes read_table/class_by_nfr_state.tsv: per window x NFR x state x class, the reads and mean posterior, and the class prevalence refitted by EM within each state (classes fixed)
--cache — staged_native_families only: persistent exact native-fit cache directory
--json-progress / --progress-json off Structured progress on stderr (JSON lines)
--daf-mask-runs — DAF only: thin targets in same-strand runs of >= N original C (CT) or G (GA) bases in lattices and native replay (2 = CC/GG and longer; 0 = off). Default: per dataset chemistry, DddA keep-one on runs >= 2 (duplex-validated), DddB off
--daf-run-policy keep-one With --daf-mask-runs: keep each run's 5'-most target (default) or drop the run Choices: keep-one, drop.
--use-m5c / --no-use-m5c auto DddA CpG mask, as fiberhmm-call --use-m5c (sets input.use_m5c). Default: on, unless the BAMs record that their calls were made with fiberhmm-call --no-use-m5c. --no-use-m5c turns it off, for organisms without CpG methylation (e.g. Drosophila)
--daf-snp-mask — Exclude SNP sites from DAF observations and native replay (reference-coordinate BED, e.g. fiberhmm-call QC .daf_snps.bed). Opt-in; BAM input only; no SNP discovery
--no-bam off Save frozen results/reports without materializing family-tagged BAMs
--bam-scope regions Export whole alignments overlapping analyzed windows (default), or the full source BAM Choices: regions, full.
--bam-grouping datasets One BAM per logical dataset (default) or original source file Choices: datasets, files.
--bam-recaller-layer off lattice_recaller: also write the optional tf_recaller MA layer (the recaller's own per-molecule class calls at every prevalence tier; bytes tq,fi,tier,q0,lr,rr) to exported BAMs. Off by default; the calls are always in result.json.gz
--output — New or empty result directory (with --continue: the interrupted run's directory)
--continue off Finish an interrupted --bam + --bed/--region run in its existing --output directory: windows whose completion marker matches are kept, missing or partial windows are rerun, and the aggregate outputs (regions.json, report.html, BAMs, read_table/) are rebuilt. Refused if the BAMs, windows or parameters differ from the run's consensus_run.json (--cores, --window-jobs and --json-progress may change). Not the same as --resume, which starts a new run from saved evidence
--keep-going off --bed/--region runs: a window that fails is logged and left without a completion marker, the other windows keep running, the aggregates cover the completed windows, and the command exits 1 listing the failed windows (rerun with --continue to retry them). Default: the first failure stops the run
--window-jobs 0 Independent BED windows analysed at the same time (default 0 = automatic: up to --cores windows, each with an equal share of --cores; one at a time for staged_native_families, whose per-window compute.maximum_matrix_mb budget is a hard limit). 1 = one window at a time, each using every core

fiberhmm-transfer

Flag Default Description
--freeze-run — Completed consensus result directory: a lattice_recaller run (any frame) or an oriented staged_native_families CL-CR run; export its classes/models without refitting
--models — frozen_classes.json.gz (lattice_recaller), frozen_models.json.gz (staged), or the --freeze-run output directory
--bam — Target BAM; repeat for separate datasets (needs --bed)
--datasets — JSON list of dataset_id and BAM paths
--evidence — Saved oriented native evidence.json.gz (one window or pooled evidence)
--bed — Equal-width, explicitly oriented BED6 target windows
--chemistry — Explicit missing-metadata declaration for --bam, as in fiberhmm-consensus Choices: ddda, dddb, hia5-pacbio, hia5-nanopore.
--parameters — BAM preparation parameters; target calls are replayed, families are never fitted
--chip-bed — Optional independent ChIP peaks, joined only after scoring
--no-bam off Do not write family-tagged BAMs
--bam-scope regions Export alignments overlapping the target windows (default), or the full source BAM Choices: regions, full.
--bam-grouping datasets One BAM per logical dataset (default) or per source file Choices: datasets, files.
--json-progress off Structured progress on stderr
--use-m5c / --no-use-m5c auto Target BAMs: DddA CpG mask, as fiberhmm-call --use-m5c (sets input.use_m5c). Default: the frozen run's setting (auto: on unless the BAMs record fiberhmm-call --no-use-m5c)
--daf-snp-mask — Exclude target SNP sites from DAF observations and native replay (reference-coordinate BED). Opt-in; BAM input only; source masks are not inherited
--cores — Worker processes for scoring (default: this machine's consensus default)
--dataset-map — Use the frozen per-channel boxes and spots of source dataset SOURCE for target dataset TARGET (needed when several source datasets share the target chemistry)
--include-training-molecules off Score molecules the catalog was trained on (default: exclude them, as for staged families); use for self-application checks
--output required New or empty output directory

fiberhmm-nfr

Flag Default Description
--bam — Input BAM (repeat for separate datasets); chemistry from BAM @CO metadata
--datasets — JSON list of
--evidence — Saved evidence.json.gz (e.g. a fiberhmm-consensus run's), instead of loading BAMs
--region — CHROM:START-END analysis window (0-based, half-open); use this or --bed with BAMs
--bed / --regions-bed — BED3/BED4 windows for independent NFR runs (one BAM pass per window, windows spread over --cores), written in BED order to window_XXXXXX directories; names, status and a combined variants table in regions.json/regions.tsv/variants.tsv. Add --continue to finish an interrupted run in the same --output
--window-jobs 0 Concurrent BED windows, one core each (0 = up to --cores; 1 = sequential, in this process). Workers are reused across windows
--continue off --bed: finish an interrupted run in the same --output, skipping windows already complete (refused when the BAMs, BED or parameters differ)
--nfr — NFR region inside the window (repeat for several). Default: detected from the share of callable reads inside a >= 175-bp gap (see --detect-method)
--chemistry — Explicit chemistry for --bam when the BAM header does not declare one Choices: ddda, dddb, hia5-pacbio, hia5-nanopore.
--parameters — A JSON file, or an inline JSON object (quote it for the shell, e.g. '{"nfr":{"min_gap_bp":150}}'): loader groups as for fiberhmm-consensus (input, compute, ...) and an "nfr" group with any engine parameter (see --schema)
--skip — Comma-separated optional stages to leave out: coaccess, combinations (pair tests and combination patterns). Variants, configurations and molecules.tsv.gz are unchanged; skipped stages write no coaccess.tsv/combos.tsv (default: none skipped)
--discover-fold-spec — Cross-fitted discovery: detect NFRs and discover variants on reads whose read-name hash fold is listed, assign membership to every read, and add fold/discovery columns to molecules.tsv.gz. SPEC: "hash=md5,mod=10,discover=0-4" (fold = int(md5(read_name), 16) % 10; several folds "discover=0+2+4"). Default off
--fold-weights — With --discover-fold-spec: fit the configuration EM weights on all reads (default) or on the held-out folds only; memberships of all reads use those weights Choices: all, heldout.
--edge-tolerance-bp — Edge consistency (variants.tsv edge_within): both edges within BP of the variant's edges (default 25)
--fast-landscape off Preset for landscape runs: --skip coaccess,combinations (variants, configurations and per-read membership only)
--stringency — Prediction strength needed for k (default 0.9; 0.85 admits finer variants)
--mode — variants (discovered, default) or depth (Timer 175/300/500-bp width states) Choices: variants, depth.
--elements — Co-accessibility elements: each variant (default) or whole NFRs Choices: variants, nfrs.
--classes — A fiberhmm-consensus (lattice recaller) output directory: its supported footprint classes become elements (variant x class pairs; unit_ids must come from the same datasets in the same order). Repeatable; class ids get the prefix R1:, R2: ... when more than one is given
--no-internal-footprint-labels off Do not label a split whose internal protection matches a supported class as "full NFR with internal footprint"
--pairs — Pairs tested: with at least one NFR element (default) or also class x class Choices: nfr, all.
--within-clusters — Also report the effect within K masked k-means clusters (default off)
--combo — Comma-separated element ids (3-8) for combination patterns (default: automatic)
--robust — Rerun discovery under N hashed read orders (default 0)
--bootstrap — Bootstrap replicates for prevalence intervals (default 200)
--detect-method — NFR detection: raw (default; share >= --min-fraction), enrichment (also gates on fold and q), or fixed (share above --detect-threshold) Choices: raw, enrichment, fixed.
--min-fraction — Raw/enrichment: minimum share of callable reads inside a >= 175-bp gap (default raw 0.10; enrichment 0.05)
--clip-gaps-to-region / --no-clip-gaps-to-region auto Assign each gap to the NFR region with largest overlap (ties: leftmost; default off)
--min-fold — Enrichment detection: share over the window's background at least this (default 2)
--detect-q — Enrichment detection: Benjamini-Hochberg q of the binomial test (default 0.01)
--min-open-reads — Raw/enrichment detection: reads inside a >= 175-bp gap at least this (default 10)
--detect-threshold — Fixed detection: share of callable reads inside a >= 175-bp gap above this (default 0.15; given alone, it selects the fixed rule)
--cores — Worker budget (compute.cores; default 4); BED runs reuse workers across independent windows
--max-discovery-molecules — Molecules per dataset and chemical channel for discovery; 0 = all molecules; 2000 is a good cap for deep data (thousands of reads per site) (default 0)
--max-quantification-molecules — Molecules per dataset and chemical channel for quantification; 0 = all molecules; 2000 is a good cap for deep data (thousands of reads per site) (default 0)
--sample-seed — Stable molecule hash seed (default 1)
--schema off Print the engine parameters with defaults as JSON and exit
--json-progress off Structured progress on stderr (JSON lines)
--output — New or empty output directory

fiberhmm-footprint

Flag Default Description
--bam — Indexed BAM with FiberHMM calls (MA tf/nuc/msp layers)
--calls-bb — FiberHMM call bigBeds from fiberhmm-extract: PREFIX_tf.bb, PREFIX_msp.bb and, when present, PREFIX_nucleosome.bb and PREFIX_m6a.bb (extract with --block-scores for per-call tq, outer edges and m6A ML)
--tf-bb — Explicit TF call bigBed (overrides --calls-bb)
--msp-bb — Explicit MSP bigBed
--nuc-bb — Explicit nucleosome bigBed (optional; nucleosome overlap column)
--m6a-bb — Explicit m6A bigBed (optional; needed for --require-unmodified)
--bed required Motifs: BED (BED6: chrom, start, end, name, score, strand; 0-based half-open; .gz ok) or bigBed (detected by its magic number; e.g. JASPAR genome-wide TFBS tracks; queried only where the BAM has reads, or in --region). Each distinct name (bigBed: TF-name field when present) is one motif set and one MA layer pair (fp_NAME, fpneg_NAME)
--motif-name — Keep motifs whose name, TF name or matrix ID matches (case-insensitive; MA0139 matches MA0139.2)
--min-score — Keep motifs with score column >= this
--max-pvalue — bigBed with a p-value field only: keep motifs with p <= this (JASPAR UCSC tracks instead encode p in the score: score = -log10(p) x 100)
--region — bigBed only: query just these regions (repeatable; 0-based half-open)
--allow-many-layers off Allow more than 20 motif sets (MA layer pairs) in one run
-o / --out - Per-motif table, ft footprint style (default: stdout)
--per-molecule — Also write one row per molecule x motif (status, code, call bounds, LLR), in genomic order of the motifs
--out-bam — Also write a copy of --bam with per-motif MA layers fp_NAME (footprinted) and fpneg_NAME (eligible, not footprinted). Existing layers are kept; layers of the same name are replaced
--out-bb — Also write per-read BED12 bigBeds of footprinted motif instances, PREFIX_fp_NAME.bb, one per motif set (needs bedToBigBed on PATH)
--layer-name — Use one layer name for every BED row instead of the BED name column (sanitized to [A-Za-z0-9_]; written as fp_NAME / fpneg_NAME)
--min-llr 5.0 Minimum LLR (nats) of a footprint call; tq >= 10 x this (default 5)
--edges outer Call bounds that must contain the motif: outer = conservative bounds extended through the edge ambiguity in the el/er bytes, up to the terminating informative position (default); conservative = the call as stored Choices: outer, conservative.
--outer-bound exclusive With --edges outer: whether the outer bound stops just before the terminating informative position (exclusive, default) or includes it (inclusive, one more base per side) Choices: exclusive, inclusive.
--max-width 74 Upper bound on footprint call width (conservative reference width, bp, inclusive); 0 = no cap (default 74: label-free 95th percentile of motif-overlapping footprint call widths). A ChIP-calibrated window (fiberhmm-footprint calibrate) usually does better
--min-width 0 Optional lower bound on footprint call width (conservative reference width, bp, inclusive); default 0
--settings — Load the width window and rule options saved by fiberhmm-footprint calibrate; flags given on the command line override it
--require-unmodified off Also require no m6A call (ML >= --ml) inside the motif (MM/ML m6A only)
--ml 125 ML threshold for --require-unmodified (default 125, as ft)
--msp-bam — Advanced: take MSPs from this BAM instead (matched by read name), e.g. the BAM ft footprint read, for like-for-like comparisons
-F / --filter 2308 Skip reads with any of these flag bits (default 0x904: unmapped, secondary, supplementary)
--min-mapq 0 Skip reads below this MAPQ (default 0)
--cores 1 Worker processes over motif clusters (default 1)

fiberhmm-scan

Flag Default Description
--bam — Input BAM (repeat for separate datasets); FiberHMM-called (MA tags from fiberhmm-call/apply). Chemistry from @CO metadata
--datasets — JSON list of
--genome off Scan whole contigs on the fixed grid (see --contigs and --zones)
--region — Scan a window (0-based, half-open; repeatable). A window longer than --unit-bp is grid-planned restricted to it
--bed — BED units (overlapping or touching intervals are merged; longer than --unit-bp: grid-planned inside)
--contigs — With --genome: comma-separated contigs (default: every contig in the header)
--zones — Scan only the genome-grid units whose owned zones meet this window (0-based, half-open; repeatable; implies --genome). Units keep their genome-grid spans (not clipped to the window), so their results are the genome scan's (the Python API's run_units(..., extend=True) reuses them across plans; --continue needs the same plan). FiberBrowser's view scans print this form
--modules fp,nfr,peaks Comma-separated modules (default fp,nfr,peaks; nfr is an EXPERIMENTAL preview)
--parameters — JSON {"fp": {...}, "nfr": {...}, "peaks": {...}, "read_policy": {...}}; see --schema
--nucreg-window — Regularity window (default 2000)
--nucreg-step — Window step = tile width (default 250)
--nucreg-signal — Signal: raw m6A calls (default) or nucleosome-call occupancy Choices: m6a, occupancy.
--nucreg-band — Period band of the peak in bp (default 140-260)
--nucreg-mask-open — Mask open stretches (gaps between nucleosome calls) of at least BP (default off; 0 = off)
--nucreg-thin — Thin m6A calls to PER_KB per kb before scoring (default off; 0 = off)
--nucreg-min-calls — An m6A window needs at least N calls (default 15)
--nucreg-ends — Read ends: blank (full windows only; default), extend (paint the outer tiles to the read ends) or truncated (score cut windows at the ends) Choices: blank, extend, truncated.
--nucreg-end-min — --nucreg-ends truncated: narrowest cut window at a read end (default 1000)
--nucreg-short-min — --nucreg-ends truncated: narrowest window on reads shorter than the window (default 1000)
--no-nucreg off Do not compute or write nucreg
--nucpatch off Call regularity patches (MA nucpatch); any --nucpatch-* flag implies it
--nucpatch-enter — A patch needs a tile this far above the reference median (default 2.0)
--nucpatch-extend — and extends over tiles this far above it (default 1.25)
--nucpatch-min-tiles — Minimum tiles per patch (default 2)
--nucpatch-snap — Snap closed edges to the nucleosome boundary at the nearest open linker (default), at the nearest linker off the patch period, or keep the tile-grid edges Choices: open, period, off.
--nucpatch-open-bp — Open linker for --nucpatch-snap open (default 300)
--nucpatch-search-bp — Snap window: break linkers are searched within BP of the grid edge (default 1000)
--nucpatch-nuc-min-bp — Snapping: nucleosome-sized footprints are at least BP long (default 90)
--nucpatch-tol-frac — Snap rule period: a linker breaks when the dyad spacing is off the patch period by more than FRACTION (default 0.25)
--nucpatch-ref — Reference median for every dataset (default: the random-packing reference of each dataset's calibration population)
--nucpatch-low off Also call low-regularity patches (below the reference median; MA nucpatch flag bit 4) and their own shared geometries (L1, L2, ...); any --nucpatch-low-* flag implies it
--nucpatch-low-enter — A low-regularity patch needs a tile at most this far relative to the reference median (default -1.5)
--nucpatch-low-extend — and extends over tiles at most this far (default -0.75; below --nucpatch-extend)
--nucpatch-low-min-tiles — Minimum tiles per low-regularity patch (default 2)
--nucpatch-low-snap — Edges of low-regularity patches, as --nucpatch-snap (default open) Choices: open, period, off.
--nucpatch-low-open-bp — Open linker for --nucpatch-low-snap open (default 300)
--nucgeo-tol — Shared geometries: both ends within BP of the consensus (default 500)
--nucgeo-min-share — Shared geometries: at least this share of the molecules (default 0.03)
--nucgeo-cohort — Molecules pooled per BED unit: overlapping it (default, as the browser panel) or spanning it Choices: overlapping, spanning.
--nucgeo-edges — Group patches by their snapped (default) or tile-grid edges Choices: snapped, grid.
--nucgeo-fold — Fold nested geometries into their longest parent: none, near (other end moved at most --nucgeo-near-max-bp; default) or all Choices: none, near, all.
--nucgeo-near-max-bp — Largest move of the other end for --nucgeo-fold near (default 1250)
--nucgeo-edge-min-bp — A patch cut by the BED-unit edge joins the grouping only with at least BP inside the unit (default 500; 0 = keep every patch)
--no-nucgeo off Call patches but no shared geometries
--input-type called-bam --bam input type; signal-bam filters producer-scored schema 5 records before all modules Choices: called-bam, signal-bam.
--signal-filters — JSON file of boolean hideBackground, excludeUnscored, requireDetectable, requireStructure predicates (with --input-type signal-bam)
--chemistry — Chemistry for --bam inputs whose header does not declare one Choices: ddda, dddb, hia5-pacbio, hia5-nanopore.
--unit-bp 50000 Grid unit span (default 50000; at most the engines' 50 kb budget)
--stride-bp 25000 Grid stride = owned zone (default 25000)
--grid-offset 0 Shift of the grid's zone boundaries (default 0)
--max-discovery-molecules — Molecules per dataset and chemical channel for discovery; 0 = all molecules; 2000 is a good cap for deep data (thousands of reads per site) (default 0)
--max-quantification-molecules — Molecules per dataset and chemical channel for quantification; 0 = all molecules; 2000 is a good cap for deep data (thousands of reads per site) (default 0)
--sample-seed — Stable molecule hash seed (default 1)
--cores 4 Worker budget (default 4)
--window-jobs 0 Units computed at the same time (default 0 = automatic: up to --cores); each gets an equal share of --cores
--continue off Finish an interrupted scan in its output directory: finished units are kept, the rest are run, and the tables, annotated BAMs and manifest are rebuilt. Refused if inputs, plan, read policy or module settings differ
--json-progress off Structured progress on stderr (JSON lines)
--annotate auto Write per-molecule results as MA tags in annotated BAMs (default for --genome and long --region scans)
--no-annotate auto Write per-molecule results as tables (states, marks, molecules) instead (default for --bed and short --region scans)
-o / --output — New or empty scan directory (with --continue: the interrupted scan's)
--schema off Print every module's parameters with defaults as JSON
--inspect — Print a scan directory's summary and validate its tables, indexes and annotated BAMs (exit 1 on problems)

fiberhmm-scan assoc

Flag Default Description
scan_dir required A finished fiberhmm-scan directory
--mode required cooccur (M1), condition (M2), rate (M3), overlap (M4) Choices: cooccur, condition, rate, overlap.
--a required Feature type A (e.g. nfr.region, fp.class, nuc.seg.regular, peaks.peak)
--b — Feature type B (cooccur, overlap); rate: tf (TF footprint centres from nuc marks) or a state type whose member calls are the points (fp.class)
--response — condition: per-molecule response MODULE:SCALAR (e.g. nuc:nrl, nfr:openness)
--bed — condition: anchors are the --a hits whose anchor lies in these intervals (e.g. an enhancer BED); other --a hits are their matched backgrounds. Without it every hit is an anchor and only Delta_anchor and per-anchor rows are reported
--backgrounds hits condition: other hits outside --bed (default), random loci with a transferable state rule (currently nfr.region), or none Choices: hits, random, none.
--background-k 5 condition: backgrounds per anchor (default 5)
--background-step 500 condition: random candidate grid step in bp
--background-min-sep 3000 condition: minimum separation in bp
--background-width — condition: random interval width in bp; default median anchor hit width; the scan state rule is evaluated over this interval
--fasta — Indexed reference FASTA: condition matching covariate or overlap density strata
--site-bases AT Opportunity bases counted in FASTA (default AT; C/G for strand-specific deaminase contexts); density excludes ambiguous bases
--site-window 1000 condition: site-density window in bp
--site-bin-bp 10000 overlap: site-density stratum window in bp
--region — Restrict to windows (repeatable)
--group — Group contrast: dataset or haplotype (haplotype from the input BAMs' HP tags; unphased molecules are reported apart) Choices: dataset, haplotype.
--haplotype-tag HP BAM tag holding the haplotype (default HP)
--labels — TSV with a molecule column and label columns (other groups, replicates)
--group-label — With --labels: the label column to contrast
--density rho_read nuc molecule scalar used as the mark-density covariate (default rho_read) Choices: rho_read, lambda_acc.
--max-distance 5000 cooccur: maximum anchor distance (default 5000)
--test adjusted cooccur: pooled test Choices: adjusted, strata.
--strata — overlap: BED of strata (chrom start end label); default one stratum per contig
--n-perm 1000 Permutations / shifts / relocations (default 1000)
--n-boot 1000 Bootstrap draws (default 1000)
--seed 0
-o / --output required Output directory

fiberhmm-footprint-model

Flag Default Description
-i / --input required Recalled BAM containing ordinary tf and msp MA groups
-o / --output-prefix required Output filename prefix (not a directory)
--region — Analyze a zero-based, half-open region; repeatable and requires a BAM index. A bare CONTIG selects that complete contig.
--genome — Genome/assembly label recorded in provenance (for example dm6)
--genomewide off Assert that scanning the complete BAM represents a genome-wide analysis
--bigbed off Also create indexed population and FiberBrowser BigBeds
--bed-to-bigbed — Path to UCSC bedToBigBed; implies --bigbed
--force off Replace existing artifacts for this output prefix
-q / --min-mapq 0 Minimum alignment MAPQ (default: 0)
--include-duplicates off Include records carrying the BAM duplicate flag (excluded by default)
--include-chimeras off Include FiberHMM QC-fail strand-swap chimeras (excluded by default)
--smoothing-sigma 3.0 Footprint-center Gaussian sigma in bp (default: 3)
--peak-distance 15 Minimum distance between center modes (default: 15)
--assignment-radius 10 Maximum center-to-mode assignment radius (default: 10)
--edge-compatibility 12 Maximum within-family diameter for each boundary (default: 12)
--minimum-geometry-support-per-stratum 3 Molecules per stratum needed for that stratum to vote on canonical geometry (default: 3)
--minimum-geometry-support 3 Descriptive geometry-ready threshold (default: 3)
--minimum-population-support 3 Descriptive population-ready threshold (default: 3)
--minimum-mapped-fraction 0.95 Required mapped fraction for geometry, MSP projection, and site denominators (default: 0.95)

fiberhmm-strand-rescue

Flag Default Description
-i / --bam required Post-TF/post-nuc BAM; repeat only to pool shards or compatible timepoints from one inference cohort
--preset required Choices: ddda, dddb, hia5-nanopore.
--region required
--model —
--nuc-model — Protected/accessibility model used only for nucleosome edge evidence
--prob-threshold —
--control-flank 2000
--min-mapq 0 Minimum mapping quality (default: 0, no filtering)
--min-support 10
--minimum-geometry-support 3
--source-boundary-margin 10
--center-radius 10
--peak-distance 15
--tf-edge-compatibility 12 Maximum within-family diameter in bp for each TF boundary; co-centered calls outside this bound form distinct TF models
--max-boundary-mad 12.0
--min-local-enrichment 2.0
--local-background-radius 250
--max-auto-sites 0 Optional TF-family cap after scoring; 0 keeps the exhaustive locus map
--site — Externally seed one zero-based half-open START-END site; repeatable. Support and canonical edges are recomputed from ordinary cohort calls.
--forced-sites-only off Analyze only --site geometries rather than unioning automatic sites
--nuc-min-support — Required ordinary nuc calls on one strand (default: --min-support)
--nuc-center-radius 25
--nuc-source-boundary-margin 20
--nuc-edge-assignment-radius 48
--nuc-max-boundary-mad 24.0
--max-auto-nuc-sites 0 Optional nucleosome-family cap after scoring; 0 keeps all families
--nuc-site — Seed one zero-based half-open nucleosome population; repeatable. Edges are relearned from ordinary nuc calls and no length ceiling applies.
--forced-nuc-sites-only off Refine only --nuc-site populations rather than automatic nuc sites
--skip-nuc-edge-refinement on Do not run independent one-for-one nucleosome edge normalization (default; retained for command-line compatibility)
--independent-nuc-edge-refinement off Experimental population nucleosome-edge normalization. This is not the TF-conditioned consensus-nuc reconciliation stage.
--strand-min-source-support — Required source-strand ordinary TF calls (default: --min-support)
--strand-min-source-enrichment 1.5 Minimum source-strand focal enrichment over local background
--strong-posterior 0.95
--review-posterior 0.5
--tf-class-pseudocount 0.5 Symmetric per-configuration pseudocount for localized single/composite site-consensus priors
--tf-class-locus-gap 30 Maximum gap joining atomic footprint states into one consensus locus
--tf-class-max-span 250 Maximum span in bp of one localized site-consensus locus
--tf-class-max-sites 10 Maximum atomic states enumerated in a complete site-consensus action set; larger loci are reported as skipped
--maximum-sites-per-decision 8
--accessible-site-gap 220 Maximum gap joining TF sites into one MSP-origin decision
--control-shifts `` Optional comma-separated target-coordinate shifts. Source priors remain at the true sites; controls are diagnostic, not an FDR null.
--max-reads 0
--molecule-collapse auto Collapse amplified DAF PCR families; auto enables for DddA/DddB Choices: auto, on, off.
--molecule-min-jaccard 0.95
--molecule-min-deam 10
--per-molecule-efficiency on Calibrate hard-call efficiency from each molecule's MSPs (default)
--global-efficiency off Use the model-wide accessible hard-call rate for every molecule
--efficiency-pseudo-count 20.0
--efficiency-min-opportunities 20
--report-layout auto Report action storage: auto spills at the bounded v4 limits; stream forces v5 BGZF action sidecars Choices: auto, inline, stream.
--diagnostics aggregate Per-call diagnostic storage (aggregate is the production default) Choices: aggregate, stream.
--proposal-tsv —
-o / --output required

fiberhmm-strand-rescue-annotate

Flag Default Description
--report required
-i / --bam — Report input BAM to materialize; default is every report BAM
-o / --output — Output BAM; requires exactly one selected input
--output-dir — Directory receiving one regional BAM per selected input
--region —
--minimum-posterior 0.0 Optional output-size filter; default 0 preserves every decision
--allow-input-drift off
--io-threads 1

fiberhmm-strand-rescue-audit

Flag Default Description
-i / --bam required
-o / --output —
--max-errors 100

fiberhmm-tag-consensus

Flag Default Description
-i / --input required Input BAM with tf_sr.QQQ
-o / --output required New sorted/indexed BAM
-a / --assignments required v1/v2 family assignment TSV
--force off Replace an existing output

fiberhmm-posteriors

Flag Default Description
-i / --input required Input BAM file
-m / --model — FiberHMM model file. If omitted, uses the bundled model for --enzyme/--seq.
-o / --output required Output file (.tsv.gz for TSV, .h5/.hdf5 for HDF5)
--format auto Output format (default: auto-detect from extension) Choices: auto, hdf5, tsv.
--enzyme — Auto-select a bundled enzyme model. Choices: ddda, dddb, hia5.
--seq — Hia5 platform; detected from the input when omitted, as in fiberhmm-call (and checked against the reads when given). Ignored for dddb/ddda. Choices: pacbio, nanopore.
--force-seq off Use the given --seq even when the input's MM specs or header say the reads come from the other platform (normally refused: the wrong platform model changes the calls, e.g. ~100x more TF calls for Nanopore reads called as PacBio), and run Hia5 even when the first reads carry no m6A calls.
--edge-trim / -e 10 Bases to trim from read edges (default: 10)
--prob-threshold — Min ML probability (0-255) for an MM/ML modification call. Default: chemistry preset, as in fiberhmm-call -- 248 for Hia5 Nanopore (--seq nanopore, given or detected), 128 otherwise.
--keep-chimeras off Do not drop DAF strand-swap chimeric reads
--chimera-detector standard DAF strand-swap chimera detector, as in fiberhmm-call (default standard, unchanged from 3.2.1; strict is opt-in) Choices: standard, strict.
--chimera-min-seg — DAF chimera: min same-strand deamination events per segment (default: 5; 10 with --chimera-detector strict)
--chimera-purity — DAF chimera: min same-strand purity per segment (default: 0.8; 0.9 with --chimera-detector strict)
--chimera-min-baseq — Strict detector only: min base quality of a chimera-test event when QUAL is present (default: 15; 0 disables)
--chimera-min-span — Strict detector only: min query bp from the first to the last same-strand event of a segment (default: 200; 0 disables)
--chimera-multi-switch / --no-chimera-multi-switch auto Strict detector only: also drop reads with several switches (default: on)
--chimera-error-mask — Strict detector only: chimera-only error mask written by fiberhmm-call --chimera-detector strict (qc/<stem>.daf_snps.chimera_error_mask.bed); events at these sites are left out of the chimera test only
--daf-snp-mask — 0-based BED of reference positions whose conversions are ignored (e.g. the mask fiberhmm-call used)
--daf-mask-runs — Thin DAF targets in same-strand runs of >= N original C (CT) or G (GA) bases (N=2: CC/GG and longer). Default: 2 with keep-one for DddA (duplex-validated), off otherwise; 0 disables.
--daf-run-policy keep-one With --daf-mask-runs: keep each run's 5'-most target (default) or drop the run. Choices: keep-one, drop.
--use-m5c / --no-use-m5c auto DddA CpG-aware calling, as in fiberhmm-call: CpGs are hidden from the HMM except inside confident unmethylated islands (MA ddda_ucg) the input carries. Default: on for --enzyme ddda, off otherwise, and off for an input whose calls were made with --no-use-m5c (recorded in its @PG). --no-use-m5c turns it off.
--cpg-mask-policy — With CpG-aware calling: keep CpGs only inside ddda_ucg islands (default unmethylated-only), or mask only ddda_mcg spans (methylated-only). DddA only; ignored with a warning otherwise. Choices: unmethylated-only, methylated-only.
--cores / -c 4 Worker processes (0 = all CPUs; default: 4)
--region-size 5000000 Region size in bp for parallel processing (default: 5,000,000)
--skip-scaffolds off Skip scaffold/contig chromosomes
--chroms — Only process these chromosomes
--streaming off Read the BAM once, in file order, in a single process (no index needed; --cores is not used). Default: region-parallel over an indexed BAM.
--batch-size 1000 Fibers per HDF5 write batch (default: 1000)
-v / --verbose off Also print model/region details and a progress bar (the summary is always printed, to stderr)

fiberhmm-probs

Flag Default Description
--accessible / -a required BAM file(s) from accessible/naked DNA (dechromatinized, MTase-treated)
--inaccessible / -u required BAM file(s) from inaccessible/untreated samples (native chromatin)
-o / --output required Output directory; its name is the table prefix. Writes tables/<name>_accessible_<base>_k<k>.tsv, tables/<name>_inaccessible_<base>_k<k>.tsv and a combined tables/<name>_<base>_k<k>_probs.tsv
-k / --context-sizes 3 4 5 6 Context size(s) to compute (bases on each side: 3=7mer, 6=13mer). Single value or list. Default: 3 4 5 6 (default: [3, 4, 5, 6])
--mode pacbio-fiber Analysis mode: pacbio-fiber (PacBio), nanopore-fiber (Nanopore), daf (DAF-seq) (default: pacbio-fiber) Choices: pacbio-fiber, nanopore-fiber, daf, gpc, cpg.
-n / --max-reads 100000 Maximum reads to process per sample type (0 = all) (default: 100000)
-s / --seed 42 Random seed for sampling (default: 42)
-q / --min-mapq 0 Minimum mapping quality (default: 0, no filtering) (default: 0)
-p / --prob-threshold 128 Minimum ML probability for modification call (0-255) (default: 128)
--min-read-length 1000 Minimum read length as the HMM models it (SEQ length with soft clips; DAF with the unaligned-base mask: aligned length) (default: 1000)
-e / --edge-trim 10 Bases to exclude at read edges (default: 10)
--save-interval 10000 Save intermediate results every N reads (default: 10000)
--stats off Generate summary statistics and QC plots
--verbose / -v off Show detailed filter statistics per BAM file

fiberhmm-train

Flag Default Description
-i / --input — Input BAM file(s) for training (not required with --base-model)
-p / --probs required Accessible and inaccessible probability files (.tsv or .probs.pkl)
--base-model — Use transitions from existing model with new emissions (skip training)
-o / --outdir required Output directory
--mode pacbio-fiber Analysis mode: pacbio-fiber (PacBio), nanopore-fiber (Nanopore), daf (DAF-seq) (default: pacbio-fiber) Choices: pacbio-fiber, nanopore-fiber, daf, gpc, cpg.
-k / --context-size 3 Context size (bases on each side): 3=7mer, 5=11mer, etc. (default: 3)
-c / --iterations 10 Training iterations (random initializations) (default: 10)
-r / --read-count 500 Total reads to sample for training (default: 500)
-s / --seed 42 Random seed (default: 42)
-e / --edge-trim 10 Edge masking (default: 10)
-q / --min-mapq 0 Min mapping quality (default: 0, no filtering) (default: 0)
--prob-threshold 125 Min ML probability (default matches ft-extract) (default: 125)
--min-read-length 1000 Minimum read length as the HMM models it (SEQ length with soft clips; DAF with the unaligned-base mask: aligned length) (default: 1000)
-a / --prob-adjust 1.0 Accessible probability adjustment factor (default: 1.0)
--use-hmmlearn off Use hmmlearn instead of native implementation (for legacy compatibility)
--stats off Generate training statistics and example plots
--n-examples 5 Number of example reads to plot (with --stats) (default: 5)
--daf-mask-runs — Thin DAF targets in same-strand runs of >= N original C (CT) or G (GA) bases (N=2: CC/GG and longer). Default: 2 with keep-one for DddA (duplex-validated), off otherwise; 0 disables.
--daf-run-policy keep-one With --daf-mask-runs: keep each run's 5'-most target (default) or drop the run. (default: keep-one) Choices: keep-one, drop.

fiberhmm-utils

fiberhmm-utils convert

Flag Default Description
input required Input model file (.pickle, .pkl, or .npz)
output required Output JSON file

fiberhmm-utils inspect

Flag Default Description
model required Model file to inspect (.json, .npz, .pickle)
--full off Print full emission probability table

fiberhmm-utils transfer

Flag Default Description
--target / -t required Target BAM file (e.g., DAF-seq)
-o / --output required Output directory
--mode daf Analysis mode for target data (default: daf) Choices: pacbio-fiber, nanopore-fiber, daf, gpc, cpg.
--reference-bam / -rb — Reference BAM with footprint tags (ns/nl)
--accessibility-priors / -ap — Pre-computed P(accessible|context) TSV
-k / --context-sizes 3 4 5 6 Context size(s) (default: [3, 4, 5, 6])
-n / --max-reads 100000 Max reads to process (0 = all) (default: 100000)
-q / --min-mapq 0 Min mapping quality (default: 0, no filtering) (default: 0)
-p / --prob-threshold 128 Min ML probability for modification call (default: 128)
--min-read-length 1000 Minimum read length as the HMM models it (SEQ length with soft clips; DAF with the unaligned-base mask: aligned length) (default: 1000)
-e / --edge-trim 10 Bases to exclude at read edges (default: 10)
--min-observations 100 Min observations per context for regression (default: 100)
--stats off Generate diagnostic plots

fiberhmm-utils adjust

Flag Default Description
model required Input model file (.json)
--state required Which state(s) to adjust Choices: accessible, inaccessible, both.
--scale required Multiplier for emission probabilities
-o / --output required Output model file (.json)

fiberhmm-utils ma-types

Flag Default Description
bam required BAM to update in place
--types — Logical MA name(s), comma- or space-separated (no strand/quality suffixes)
--scan off Exhaustively scan every alignment and discover non-empty MA types
--io-threads 4 BAM compression and index threads (default: 4)

fiberhmm-utils ma-list

Flag Default Description
bam required BAM to inspect
--sample 1000 Alignments to read (default 1000; 0 = all)
--scan off Read every alignment (exact counts)
--region — Only alignments in CHROM or CHROM:START-END (0-based, needs an index)
--io-threads 2 BAM decompression threads (default: 2)

fiberhmm-utils ma-drop

Flag Default Description
bam required Input BAM
--layers required Logical layer names or globs, comma- or space-separated
-o / --output — Output BAM (indexed)
--in-place off Replace the input atomically (indexes rebuilt), like ma-types
--force off Allow dropping core layers (nuc, msp, tf)
--io-threads 4 BAM compression and index threads (default: 4)

fiberhmm-utils fix-bigbed

Flag Default Description
inputs required Input bigBed file(s)
--sample-name — Explicit sample name to embed (sanitized to a dot/space-free token). Default: derived per file from the filename (stem minus the _<layer> suffix).
--in-place off Overwrite the input bigBed(s) in place.
-o / --output — Output path (single input only). Default: write <name>.fixed.bb alongside each input.

One-command variant workflow

fiberhmm-extract --variants discover finds SNVs in the reads, caches one VCF per pooled sample and writes the var layer from it; --sv adds the sv layer from CIGAR, clips and SA. One command gives FiberBrowser's variant layers:

fiberhmm-extract -i sample.calls.bam -o tracks --variants discover --sv -c 8
# tracks/sample.calls_var.bb            per-read alleles at the discovered sites
# tracks/sample.calls_sv.bb             per-read deletions, insertions, clips, SA
# tracks/sample_calls.<key>.fhvar.vcf.gz (+ .tbi, .json)  the cached VCF
# tracks/sample.calls_var.discovery.json caller, VCF, cache key, reused or rebuilt

DAF-seq BAMs use the DAF SNP screen (deamination is never called as a SNV); Fiber-seq BAMs use a conservative pileup screen (--variant-caller overrides the choice). Add --region/--regions-bed to work on part of the genome, --variants-pool to pool BAMs of one sample, and --reference when the BAM has =/X CIGARs without MD tags. The pileup screen is for browsing; for publication-grade genotypes, pass a DeepVariant or Clair3 VCF with --variants. Details: Discovering variants.

NFR detection and diagnostics

NFR raw detection uses min_fraction directly (default 0.10), with at least 10 open reads, 20 callable reads and 60 bp of region width. Background, fold and q remain descriptive. Explicit enrichment requests keep the prior 0.05 share default and fold/q gates; detect_threshold alone selects fixed.

clip_gaps_to_region defaults to false. When true, a gap belongs only to its largest-overlap region (ties: leftmost), with its original edges and width. The same assignment applies to discovery, quantification and frozen-catalogue transfer (catalogue.assignment_regions).

The run's detection.opportunity_diagnostic summarizes complete long gaps outside NFRs versus overlapping NFRs, using native unit.positions (marked and unmarked opportunities). It reports counts, median opportunities per 100 bp and the share with fewer than 10 opportunities per gap. Partial gaps and missing opportunity arrays are excluded and counted separately; empty groups have null statistics. Native masks may exclude otherwise markable bases. This diagnostic does not show that gaps occurred by chance and never gates detection. enrichment_test means the test was computed; enrichment_gates means its fold/q criteria controlled detection.