Skip to content

Latest commit

 

History

History
1104 lines (717 loc) · 49 KB

23_cli_reference.md

File metadata and controls

1104 lines (717 loc) · 49 KB

MuMDIA command-line reference

GENERATED FILE. Do not edit. ci/gen_cli_reference.py writes it from the mumdia binary's own --help output, so the interface described here is the interface the binary actually has. The source of truth is the clap derive in rust/mumdia/crates/mumdia/src/main.rs: change the flag or its doc comment there, rebuild, and regenerate. An edit made to this file is lost on the next run.

python ci/gen_cli_reference.py            # regenerate
python ci/gen_cli_reference.py --check    # fail if this file is stale

For what each stage does with these arguments, read docs/README.md and the per-stage documents it routes to. For the configuration file passed with --config, read docs/24_config_reference.md.

How to read this document

Every block below is the binary's own help text, right-stripped and with the program name normalized to mumdia (a Windows build reports mumdia.exe). Nothing is paraphrased. Two mechanical edits are applied:

  • the 6 flags clap marks global = true, and -h, --help, are removed from the per-subcommand blocks and documented once under "Global flags" below, because clap repeats them in every subcommand;
  • mumdia help gets a table row but no section, because mumdia help --help reprints the top-level help unchanged.

Top-level help

MuMDIA DIA search engine (Rust MVP)

Usage: mumdia [OPTIONS] <COMMAND>

Commands:
  convert          Read an mzML run into the normalized spectra artifact set
  digest           Tryptic or non-specific digest (`digest.enzyme`) + decoy pairing -> peptides.parquet
  peptidoforms     Fixed+variable modification and charge enumeration -> peptidoforms.parquet
  predict-frag     Spectral library: b/y m/z + predicted intensity + iRT -> fragment_library
  prescan          Sequence-tag prescan: keep only modification-bearing candidates whose anchored trimers are observed in this run -> prescan_survivors.parquet. Label-blind by construction, so it prunes search space without touching target-decoy exchangeability
  prescreen        Fragment-rarity prescreen: score every candidate on its own window's spectra and keep those above a label-blind calibration quantile -> survivors in the prescan_survivors contract, for `extract --restrict-candidates` (docs/34_prescreen.md)
  search-seed      Native broad DIA seed search over the fragment index -> seed_psms.parquet
  rt-im-train      Per-run RT calibration + windows -> run_windows.parquet, cal.json
  sub-library      Subset a library to a set of candidates (a first pass's survivors, or prescan's), renumbered to the contiguous 0..n the fragment index requires
  extract          Targeted 3D extraction (peak-major cascade) -> psms_extracted, chromatograms
  retrace          Rebuild a diaPASEF run's chromatograms from the raw timsTOF events, and patch its psms_extracted (docs/35_diapasef.md section 6). `run` and `run-experiment` do this after extract under `retrace.enabled`; standalone it takes the same inputs by path. The configuration's `retrace` section applies, `enabled` aside
  localise         Site probabilities of a localised modification on one run's scored rows (experimental; docs/36_ptm_localisation.md) -> localisation.parquet; with --experiment-dir, on every run of a finished run-experiment at one temperature, and the runs combined -> localisation_experiment.parquet. Reporting only: nothing upstream changes
  mobilogram       The 1/K0 profile (mobilogram) of candidates' fragment and MS1 ions, read from the raw events of a diaPASEF `.d` (docs/35_diapasef.md section 17). Read-only
  features         Compute the minimal feature set -> features.parquet + PIN
  pool             Pool a grouped run's band artifacts into the run-level tables
  compete          Keep the best candidate per competition group -> psms_competed.parquet
  rescore          Rescore + native target-decoy q-values -> psms_scored.parquet
  quant            Quantify identified peptides + roll up to protein groups
  quant-lfq        Combine per-run quant tables into a protein-by-run matrix (cross-run LFQ)
  quant-normalise  Cross-run normalisation of per-run precursor quantities -> peptide_quant_normalised
  run              Orchestrate the full pipeline on one run and write a manifest. Given several --mzml, the files are searched as ONE pooled experiment (`run-experiment`: one combined rescore, per-run quant, cross-run LFQ), which is the default treatment of a multi-file input; use `run-experiment` directly for run names
  run-experiment   Experiment-wide orchestrator: run the per-file search chain over N runs, then one combined rescore, optional rescuable MBR transfer, per-run quant, and cross-run LFQ. Pass --mzml once per run (>= 2)
  build-library    Build the spectral library of a FASTA search without spectra: digest -> peptidoforms -> predict-frag, restored from or stored into `predict_frag.library_cache` under the key a `run --fasta` uses. Writes the two library tables, manifest.json and library.json (counts, models, cache key and the commands that search with it) into --out-dir
  align            Cross-run RT alignment (experiment-level) -> alignment.parquet
  mbr              Match-between-runs identification transfer (Stage D3) -> transferred.parquet
  inspect          Print schema, head sample, and row count for any artifact
  peak-census      Peaks per MS2 spectrum for an mzML or a diaPASEF `.d`, as JSON: percentiles plus what each candidate `--top-peaks-ms2` cap would discard
  audit            Candidate audit: reconstruct per-candidate stage flags + earliest rejection reason across the artifact chain and write candidate_audit.parquet (sensitivity program, P0.3/P0.4). Non-destructive; reruns no compute
  report           Write peptides.tsv + proteins.tsv from a scored PSM table, or the experiment-wide pair for a `run-experiment` output directory
  cache            Show, trim or clear the engine's caches: FASTA-built libraries and DeepLC's trunk projection (docs/14, "The engine's caches")
  doctor           Check that the configured Python sidecar environments are usable
  help             Print this message or the help of the given subcommand(s)

Options:
      --threads <N>
          Worker threads of the engine's thread pools. Default: every core.

          Sets the engine's rayon pool to N threads and the parquet codec pool to min(N, 8) threads, serial at N = 1 (docs/03_io_layer.md, "Parallel column codec"). The codec pool encodes and decodes artifacts for writer and loader threads that run beside the rayon pool, so up to N + min(N, 8) threads can be busy at once; add `MUMDIA_PARQUET_THREADS=1` to keep the parquet codec serial and the run near N threads. N is also forwarded to the Python sidecars as `MUMDIA_NN_THREADS` and `OMP_NUM_THREADS` unless those are already set. Without this there was no way to bound MuMDIA at all except the undocumented `RAYON_NUM_THREADS`, which the engine never read and which does not reach the sidecars; on a shared machine that made a run antisocial. Note the NN rescore worker measured FASTER on 8 threads than on 32 (docs/13_sidecars.md).

      --log-level <LEVEL>
          Log level: `error`, `warn`, `info` (default), `debug`, or `trace`. Accepts any `RUST_LOG` filter, so `mumdia=debug,extract=trace` also works

  -v, --verbose...
          More detail: `-v` for debug, `-vv` for trace. Overridden by --log-level

  -q, --quiet
          Warnings and errors only. Overridden by --log-level

      --cache-dir <DIR>
          Root of the engine's caches (FASTA-built libraries, DeepLC projections), or `off`.

          Wins over `MUMDIA_CACHE_DIR`, which wins over the per-user cache directory. A relative path is resolved against the working directory. A root that cannot be written switches the default caches off for the run with one warning (docs/14_build_test_deploy_gotchas.md, "Where MuMDIA writes").

      --temp-dir <DIR>
          Temporary directory of the engine and of every process it starts.

          Wins over `MUMDIA_TEMP_DIR`. It becomes `TMP`, `TEMP` and `TMPDIR` for the engine and its Python workers, and `MPLCONFIGDIR` goes under it unless set. Created if needed; one that cannot be written is an error. Default: the system's.

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Global flags

These 6 options are declared global = true, so they are accepted on EITHER side of the subcommand: mumdia --threads 8 extract ... and mumdia extract --threads 8 ... are equivalent and reach the same value. They are removed from the per-subcommand blocks below to keep this document readable, as is -h, --help, which every subcommand also accepts.

Flag Purpose
--cache-dir <DIR> Root of the engine's caches (FASTA-built libraries, DeepLC projections), or off. Wins over MUMDIA_CACHE_DIR, which wins over the per-user cache directory. A relative path is resolved against the working directory. A root that cannot be written switches the default caches off for the run with one warning (docs/14_build_test_deploy_gotchas.md, "Where MuMDIA writes").
--log-level <LEVEL> Log level: error, warn, info (default), debug, or trace. Accepts any RUST_LOG filter, so mumdia=debug,extract=trace also works
-q, --quiet Warnings and errors only. Overridden by --log-level
--temp-dir <DIR> Temporary directory of the engine and of every process it starts. Wins over MUMDIA_TEMP_DIR. It becomes TMP, TEMP and TMPDIR for the engine and its Python workers, and MPLCONFIGDIR goes under it unless set. Created if needed; one that cannot be written is an error. Default: the system's.
--threads <N> Worker threads of the engine's thread pools. Default: every core. Sets the engine's rayon pool to N threads and the parquet codec pool to min(N, 8) threads, serial at N = 1 (docs/03_io_layer.md, "Parallel column codec"). The codec pool encodes and decodes artifacts for writer and loader threads that run beside the rayon pool, so up to N + min(N, 8) threads can be busy at once; add MUMDIA_PARQUET_THREADS=1 to keep the parquet codec serial and the run near N threads. N is also forwarded to the Python sidecars as MUMDIA_NN_THREADS and OMP_NUM_THREADS unless those are already set. Without this there was no way to bound MuMDIA at all except the undocumented RAYON_NUM_THREADS, which the engine never read and which does not reach the sidecars; on a shared machine that made a run antisocial. Note the NN rescore worker measured FASTER on 8 threads than on 32 (docs/13_sidecars.md).
-v, --verbose... More detail: -v for debug, -vv for trace. Overridden by --log-level
-h, --help Print help (see a summary with '-h')

The same text as the binary prints it:

Options:
      --cache-dir <DIR>
          Root of the engine's caches (FASTA-built libraries, DeepLC projections), or `off`.

          Wins over `MUMDIA_CACHE_DIR`, which wins over the per-user cache directory. A relative path is resolved against the working directory. A root that cannot be written switches the default caches off for the run with one warning (docs/14_build_test_deploy_gotchas.md, "Where MuMDIA writes").

      --log-level <LEVEL>
          Log level: `error`, `warn`, `info` (default), `debug`, or `trace`. Accepts any `RUST_LOG` filter, so `mumdia=debug,extract=trace` also works

  -q, --quiet
          Warnings and errors only. Overridden by --log-level

      --temp-dir <DIR>
          Temporary directory of the engine and of every process it starts.

          Wins over `MUMDIA_TEMP_DIR`. It becomes `TMP`, `TEMP` and `TMPDIR` for the engine and its Python workers, and `MPLCONFIGDIR` goes under it unless set. Created if needed; one that cannot be written is an error. Default: the system's.

      --threads <N>
          Worker threads of the engine's thread pools. Default: every core.

          Sets the engine's rayon pool to N threads and the parquet codec pool to min(N, 8) threads, serial at N = 1 (docs/03_io_layer.md, "Parallel column codec"). The codec pool encodes and decodes artifacts for writer and loader threads that run beside the rayon pool, so up to N + min(N, 8) threads can be busy at once; add `MUMDIA_PARQUET_THREADS=1` to keep the parquet codec serial and the run near N threads. N is also forwarded to the Python sidecars as `MUMDIA_NN_THREADS` and `OMP_NUM_THREADS` unless those are already set. Without this there was no way to bound MuMDIA at all except the undocumented `RAYON_NUM_THREADS`, which the engine never read and which does not reach the sidecars; on a shared machine that made a run antisocial. Note the NN rescore worker measured FASTER on 8 threads than on 32 (docs/13_sidecars.md).

  -v, --verbose...
          More detail: `-v` for debug, `-vv` for trace. Overridden by --log-level

  -h, --help
          Print help (see a summary with '-h')

Subcommands

One row per subcommand. --config says whether the subcommand reads a JSON config file (see docs/24_config_reference.md); the purpose column is the first sentence of the description, with the full text in the section below.

Subcommand --config Purpose
convert yes Read an mzML run into the normalized spectra artifact set
digest yes Tryptic or non-specific digest (digest.enzyme) + decoy pairing -> peptides.parquet
peptidoforms yes Fixed+variable modification and charge enumeration -> peptidoforms.parquet
predict-frag yes Spectral library: b/y m/z + predicted intensity + iRT -> fragment_library
prescan yes Sequence-tag prescan: keep only modification-bearing candidates whose anchored trimers are observed in this run -> prescan_survivors.parquet.
prescreen yes Fragment-rarity prescreen: score every candidate on its own window's spectra and keep those above a label-blind calibration quantile -> survivors in the prescan_survivors contract, for extract --restrict-candidates (docs/34_prescreen.md)
search-seed yes Native broad DIA seed search over the fragment index -> seed_psms.parquet
rt-im-train yes Per-run RT calibration + windows -> run_windows.parquet, cal.json
sub-library yes Subset a library to a set of candidates (a first pass's survivors, or prescan's), renumbered to the contiguous 0..n the fragment index requires
extract yes Targeted 3D extraction (peak-major cascade) -> psms_extracted, chromatograms
retrace yes Rebuild a diaPASEF run's chromatograms from the raw timsTOF events, and patch its psms_extracted (docs/35_diapasef.md section 6). run and run-experiment do this after extract under retrace.enabled; standalone it takes the same inputs by path.
localise yes Site probabilities of a localised modification on one run's scored rows (experimental; docs/36_ptm_localisation.md) -> localisation.parquet; with --experiment-dir, on every run of a finished run-experiment at one temperature, and the runs combined -> localisation_experiment.parquet.
mobilogram yes The 1/K0 profile (mobilogram) of candidates' fragment and MS1 ions, read from the raw events of a diaPASEF .d (docs/35_diapasef.md section 17).
features yes Compute the minimal feature set -> features.parquet + PIN
pool no Pool a grouped run's band artifacts into the run-level tables
compete yes Keep the best candidate per competition group -> psms_competed.parquet
rescore yes Rescore + native target-decoy q-values -> psms_scored.parquet
quant yes Quantify identified peptides + roll up to protein groups
quant-lfq no Combine per-run quant tables into a protein-by-run matrix (cross-run LFQ)
quant-normalise yes Cross-run normalisation of per-run precursor quantities -> peptide_quant_normalised
run yes Orchestrate the full pipeline on one run and write a manifest.
run-experiment yes Experiment-wide orchestrator: run the per-file search chain over N runs, then one combined rescore, optional rescuable MBR transfer, per-run quant, and cross-run LFQ.
build-library yes Build the spectral library of a FASTA search without spectra: digest -> peptidoforms -> predict-frag, restored from or stored into predict_frag.library_cache under the key a run --fasta uses.
align yes Cross-run RT alignment (experiment-level) -> alignment.parquet
mbr yes Match-between-runs identification transfer (Stage D3) -> transferred.parquet
inspect no Print schema, head sample, and row count for any artifact
peak-census yes Peaks per MS2 spectrum for an mzML or a diaPASEF .d, as JSON: percentiles plus what each candidate --top-peaks-ms2 cap would discard
audit no Candidate audit: reconstruct per-candidate stage flags + earliest rejection reason across the artifact chain and write candidate_audit.parquet (sensitivity program, P0.3/P0.4).
report yes Write peptides.tsv + proteins.tsv from a scored PSM table, or the experiment-wide pair for a run-experiment output directory
cache yes Show, trim or clear the engine's caches: FASTA-built libraries and DeepLC's trunk projection (docs/14, "The engine's caches")
doctor yes Check that the configured Python sidecar environments are usable
help n/a Print this message or the help of the given subcommand(s)

27 of the 31 documented subcommands accept --config: align, build-library, cache, compete, convert, digest, doctor, extract, features, localise, mbr, mobilogram, peak-census, peptidoforms, predict-frag, prescan, prescreen, quant, quant-normalise, report, rescore, retrace, rt-im-train, run, run-experiment, search-seed, sub-library.

4 do not, so every setting they use comes from their own flags: audit, inspect, pool, quant-lfq.

convert

Read an mzML run into the normalized spectra artifact set

Usage: mumdia convert [OPTIONS] --mzml <MZML> --out-dir <OUT_DIR>

Options:
      --mzml <MZML>
          An mzML, or a vendor file (Thermo `.raw`; Bruker/Agilent `.d`, SCIEX `.wiff`, Waters `.raw` through msconvert), which is converted to mzML first

      --out-dir <OUT_DIR>

      --config <CONFIG>
          Configuration file. Only `convert.*` is read here, and it is read at all so that `convert.thermo_raw_parser` can be set for a standalone convert rather than only through `MUMDIA_THERMO_PARSER`

      --max-spectra <MAX_SPECTRA>
          Limit spectra read (0 = all), for fast iteration

          [default: 0]

      --top-peaks-ms2 <TOP_PEAKS_MS2>
          Keep at most this many MS2 peaks in the normalized artifact (0 = all).

          This is an irreversible conversion-time cap that also affects extraction, features, and quantification. Use `search_seed.top_n_peaks` for a seed-only limit.

          [default: 0]

      --top-peaks-ms1 <TOP_PEAKS_MS1>
          Keep at most this many MS1 peaks per scan (0 = all)

          [default: 0]

Plus the 7 repeated flags removed above: see "Global flags".

digest

Tryptic or non-specific digest (`digest.enzyme`) + decoy pairing -> peptides.parquet

Usage: mumdia digest [OPTIONS] --fasta <FASTA> --out <OUT>

Options:
      --fasta <FASTA>

      --out <OUT>

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

peptidoforms

Fixed+variable modification and charge enumeration -> peptidoforms.parquet

Usage: mumdia peptidoforms [OPTIONS] --peptides <PEPTIDES> --out <OUT>

Options:
      --peptides <PEPTIDES>

      --out <OUT>

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

predict-frag

Spectral library: b/y m/z + predicted intensity + iRT -> fragment_library

Usage: mumdia predict-frag [OPTIONS] --peptidoforms <PEPTIDOFORMS> --out-precursors <OUT_PRECURSORS> --out-fragments <OUT_FRAGMENTS>

Options:
      --peptidoforms <PEPTIDOFORMS>

      --out-precursors <OUT_PRECURSORS>

      --out-fragments <OUT_FRAGMENTS>

      --work-dir <WORK_DIR>
          Working directory for sidecar request/response files

          [default: sidecar_work]

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

prescan

Sequence-tag prescan: keep only modification-bearing candidates whose anchored trimers are observed in this run -> prescan_survivors.parquet. Label-blind by construction, so it prunes search space without touching target-decoy exchangeability

Usage: mumdia prescan [OPTIONS] --ms2 <MS2> --isolation-windows <ISOLATION_WINDOWS> --lib-precursors <LIB_PRECURSORS> --run-windows <RUN_WINDOWS> --out <OUT>

Options:
      --ms2 <MS2>

      --isolation-windows <ISOLATION_WINDOWS>

      --lib-precursors <LIB_PRECURSORS>

      --run-windows <RUN_WINDOWS>
          Per-candidate RT bounds (candidate_id, rt_lo, rt_hi); a run_windows-shaped table

      --out <OUT>

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

prescreen

Fragment-rarity prescreen: score every candidate on its own window's spectra and keep those above a label-blind calibration quantile -> survivors in the prescan_survivors contract, for `extract --restrict-candidates` (docs/34_prescreen.md)

Usage: mumdia prescreen [OPTIONS] --ms2 <MS2> --lib-precursors <LIB_PRECURSORS> --out <OUT>

Options:
      --ms2 <MS2>

      --lib-precursors <LIB_PRECURSORS>

      --run-windows <RUN_WINDOWS>
          Per-candidate RT bounds (candidate_id, rt_lo, rt_hi). Omitted: whole gradient

      --ms1 <MS1>
          MS1 spectra, for `prescreen.mass_hypotheses.ms1` only

      --out <OUT>

      --config <CONFIG>

      --preset <PRESET>
          Override `prescreen.preset` (sensitive, balanced, stringent, aggressive, custom)

      --target <TARGET>
          Override `prescreen.target` (implies preset custom)

      --top-peaks <TOP_PEAKS>
          Override `prescreen.top_peaks` (0 = uncapped)

      --write-scores
          Also write `<out>.scores.parquet`

      --sample-candidates <SAMPLE_CANDIDATES>
          Evaluation only: score a seeded sample of about N candidates (survivors then cover the sample only and are not an extract allowlist)

          [default: 0]

      --tags-only
          The database-free tag prefilter only: keep the candidates with an observed trimer in their isolation window (no fragment score; pass no --run-windows for the retention-time-free prefilter)

Plus the 7 repeated flags removed above: see "Global flags".

search-seed

Native broad DIA seed search over the fragment index -> seed_psms.parquet

Usage: mumdia search-seed [OPTIONS] --ms2 <MS2> --lib-precursors <LIB_PRECURSORS> --lib-fragments <LIB_FRAGMENTS> --out <OUT>

Options:
      --ms2 <MS2>

      --lib-precursors <LIB_PRECURSORS>

      --lib-fragments <LIB_FRAGMENTS>

      --out <OUT>

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

rt-im-train

Per-run RT calibration + windows -> run_windows.parquet, cal.json

Usage: mumdia rt-im-train [OPTIONS] --seed-psms <SEED_PSMS> --lib-precursors <LIB_PRECURSORS> --out-windows <OUT_WINDOWS> --out-cal <OUT_CAL>

Options:
      --seed-psms <SEED_PSMS>

      --lib-precursors <LIB_PRECURSORS>

      --out-windows <OUT_WINDOWS>

      --out-cal <OUT_CAL>

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

sub-library

Subset a library to a set of candidates (a first pass's survivors, or prescan's), renumbered to the contiguous 0..n the fragment index requires

Usage: mumdia sub-library [OPTIONS] --lib-precursors <LIB_PRECURSORS> --lib-fragments <LIB_FRAGMENTS> --survivors <SURVIVORS> --out-precursors <OUT_PRECURSORS> --out-fragments <OUT_FRAGMENTS>

Options:
      --lib-precursors <LIB_PRECURSORS>

      --lib-fragments <LIB_FRAGMENTS>

      --survivors <SURVIVORS>
          Parquet with a `candidate_id` column: the candidates to keep. Order and duplicates do not matter

      --out-precursors <OUT_PRECURSORS>

      --out-fragments <OUT_FRAGMENTS>

      --no-pair-link
          Keep exactly the listed candidates instead of unioning the decision over `peptidoform_id`. A target and its decoy share that id, so the default keeps pairs together and this breaks pairing unless the list is already pair-complete

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

extract

Targeted 3D extraction (peak-major cascade) -> psms_extracted, chromatograms

Usage: mumdia extract [OPTIONS] --ms2 <MS2> --lib-precursors <LIB_PRECURSORS> --lib-fragments <LIB_FRAGMENTS> --run-windows <RUN_WINDOWS> --out-psms <OUT_PSMS> --out-chromatograms <OUT_CHROMATOGRAMS>

Options:
      --ms2 <MS2>

      --lib-precursors <LIB_PRECURSORS>

      --lib-fragments <LIB_FRAGMENTS>

      --run-windows <RUN_WINDOWS>

      --ms1 <MS1>
          Optional MS1 spectra for isotope-envelope features

      --mass-cal <MASS_CAL>
          Optional mass recalibration json (search-seed <seed>.masscal.json)

      --out-psms <OUT_PSMS>

      --out-chromatograms <OUT_CHROMATOGRAMS>

      --restrict-candidates <RESTRICT_CANDIDATES>
          Optional candidate allowlist (a prior run's psms.parquet): restrict extraction to these candidate_ids. For "gate first, then compete" - re-extract with a peak_claim strategy over only the gate-accepted survivors, keeping the two-pass profile map small

      --fragment-offset <FRAGMENT_OFFSET>
          The library row that `--lib-precursors` row 0 came from, when that table is one isolation-window band of a larger library (`groups.window_groups` writes such bands, with ids rebased to `0..n`). The band's fragments are then read from the shared `--lib-fragments` table by that id range, selectively when the table is sorted by `candidate_id`, so a band needs no fragment table of its own

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

retrace

Rebuild a diaPASEF run's chromatograms from the raw timsTOF events, and patch its psms_extracted (docs/35_diapasef.md section 6). `run` and `run-experiment` do this after extract under `retrace.enabled`; standalone it takes the same inputs by path. The configuration's `retrace` section applies, `enabled` aside

Usage: mumdia retrace [OPTIONS] --raw <RAW> --chromatograms <CHROMATOGRAMS> --psms-extracted <PSMS_EXTRACTED> --run-windows <RUN_WINDOWS> --lib-precursors <LIB_PRECURSORS> --out <OUT>

Options:
      --raw <RAW>
          The diaPASEF `.d` the spectra were converted from

      --chromatograms <CHROMATOGRAMS>
          Extract's chromatograms (the centroid traces), with their per-point 1/K0

      --psms-extracted <PSMS_EXTRACTED>
          Extract's psms_extracted; under `retrace.repick` its `.peaks.parquet` sidecar must sit beside it

      --run-windows <RUN_WINDOWS>

      --lib-precursors <LIB_PRECURSORS>

      --mass-cal <MASS_CAL>
          Optional mass recalibration json (search-seed <seed>.masscal.json)

      --out <OUT>
          The rebuilt chromatograms

      --out-psms <OUT_PSMS>
          Where the patched psms_extracted goes; default: patch --psms-extracted in place

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

localise

Site probabilities of a localised modification on one run's scored rows (experimental; docs/36_ptm_localisation.md) -> localisation.parquet; with --experiment-dir, on every run of a finished run-experiment at one temperature, and the runs combined -> localisation_experiment.parquet. Reporting only: nothing upstream changes

Usage: mumdia localise [OPTIONS]

Options:
      --psms-scored <PSMS_SCORED>
          One run's scored table: a run's psms_scored.parquet, or a run's scored.parquet of a run-experiment

      --spectra-ms2 <SPECTRA_MS2>
          That run's spectra_ms2.parquet

      --mass-cal <MASS_CAL>
          The run's search-seed masscal.json (fragment mass offset and tolerance)

      --psms-extracted <PSMS_EXTRACTED>
          The psms_extracted.parquet the scored rows came from: each row's apex 1/K0 on spectra with ion mobility. Without it the 1/K0 is read from the spectra

      --source <SOURCE>
          Keep only the rows of this source; required when the table holds several runs

      --fasta <FASTA>
          The search's FASTA: which peptides start a protein, for a modification whose N-terminal rule is protein_n_term. Without it a peptide's N-terminus is a placement only when the table carries the modification there

      --out <OUT>

      --experiment-dir <EXPERIMENT_DIR>
          A finished run-experiment directory: localise each of its runs (the inputs named by experiment_manifest.json and the run directories) and combine them. Written in place, and recorded in the manifest for `mumdia report --experiment-dir`, unless --out-dir is given

      --out-dir <OUT_DIR>
          With --experiment-dir: write <run>/localisation.parquet and localisation_experiment.parquet here instead, and leave the experiment untouched

      --sources <SOURCES>
          With --experiment-dir: only these sources (comma-separated run indices)

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

mobilogram

The 1/K0 profile (mobilogram) of candidates' fragment and MS1 ions, read from the raw events of a diaPASEF `.d` (docs/35_diapasef.md section 17). Read-only.

Per candidate: the MS2 frames whose quad slots isolate the precursor (the frame nearest the apex RT and `--frames` such frames either side) and the MS1 frames nearest the same RT. Per ion (the chromatogram's predicted fragments and MS1 isotopes), the raw intensity is binned in 1/K0 over the scans of those slots, at the run's fragment mass offset and tolerance and `extract.prec_tol_ppm` for MS1. Prints JSON on stdout, or writes a long parquet table (or JSON) with `--out`.

Usage: mumdia mobilogram [OPTIONS] --candidate <ID>...

Options:
      --run-dir <RUN_DIR>
          The run directory: psms_extracted, chromatograms, run_windows and the seed's masscal are read from it, and the `.d` is the one its spectra report names. A second-pass run directory takes the spectra of its first pass

      --candidate <ID>...
          Candidate ids (`candidate_id`), one or more

      --json
          Print JSON on stdout (the default without --out)

      --out <OUT>
          Write the profiles to this file instead: `.json` as printed, anything else as a parquet table with one row per candidate, ion, frame and non-zero bin

      --frames <FRAMES>
          Frames either side of the centre frame, per MS level (0: the centre frame only)

          [default: 2]

      --bin <BIN>
          Bin width in 1/K0 (V s cm^-2)

          [default: 0.002]

      --peak-rank <PEAK_RANK>
          The psms_extracted row of each candidate (`peak_rank`; 0 is extract's apex)

          [default: 0]

      --rt <RT>
          Centre the frames on this retention time (s) instead of each candidate's apex

      --raw <RAW>
          The diaPASEF `.d`; default: the one the run's spectra report names

      --psms-extracted <PSMS_EXTRACTED>
          Override `<run-dir>/psms_extracted.parquet`

      --chromatograms <CHROMATOGRAMS>
          Override `<run-dir>/chromatograms.parquet`

      --run-windows <RUN_WINDOWS>
          Override `<run-dir>/run_windows.parquet`

      --mass-cal <MASS_CAL>
          Override `<run-dir>/seed_psms.parquet.masscal.json`

      --config <CONFIG>
          Configuration for `extract.prec_tol_ppm` and the fallback fragment tolerance; default: the one the run's manifest recorded

Plus the 7 repeated flags removed above: see "Global flags".

features

Compute the minimal feature set -> features.parquet + PIN

Usage: mumdia features [OPTIONS] --psms-extracted <PSMS_EXTRACTED> --chromatograms <CHROMATOGRAMS> --out <OUT> --out-pin <OUT_PIN>

Options:
      --psms-extracted <PSMS_EXTRACTED>

      --chromatograms <CHROMATOGRAMS>

      --seed-psms <SEED_PSMS>
          Optional seed_psms for search-engine corroboration features

      --out <OUT>

      --out-pin <OUT_PIN>

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

pool

Pool a grouped run's band artifacts into the run-level tables.

`run` does this itself at the end of a grouped search (`groups.window_groups`). Standalone it is for the case where the search finished and the run did not: the band directories hold everything, and pooling them is a byte copy of their parquet row groups, so a killed run costs a pool rather than a re-search.

Usage: mumdia pool [OPTIONS] --groups-dir <GROUPS_DIR>

Options:
      --groups-dir <GROUPS_DIR>
          The run's `groups/` directory, holding the `gNN/` band directories

      --out-dir <OUT_DIR>
          Where the pooled tables go. Default: the parent of `--groups-dir`, which is where a run writes them

      --psms
          Also pool `psms_extracted`, which only the candidate audit reads

Plus the 7 repeated flags removed above: see "Global flags".

compete

Keep the best candidate per competition group -> psms_competed.parquet

Usage: mumdia compete [OPTIONS] --features <FEATURES> --out <OUT>

Options:
      --features <FEATURES>

      --out <OUT>

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

rescore

Rescore + native target-decoy q-values -> psms_scored.parquet

Usage: mumdia rescore [OPTIONS] --out <OUT>

Options:
      --competed <COMPETED>...
          One or more competed feature tables

      --out <OUT>

      --work-dir <WORK_DIR>
          Directory for a sidecar classifier's files: the feature handoff, the fold keys, the worker's output and its streaming memmap. Default: `MUMDIA_SIDECAR_DIR` when set, else `sidecar_work` in the current directory. The files are removed once the scores are read back, unless `MUMDIA_KEEP_HANDOFF=1`

      --config <CONFIG>

      --lib-fragments <LIB_FRAGMENTS>
          Library fragments for shadow demotion (`rescore.shadow_min_shared`)

      --isolation-windows <ISOLATION_WINDOWS>...
          `isolation_windows.parquet` of each input run, in source order, for shadow demotion

      --psms-extracted <PSMS_EXTRACTED>...
          `psms_extracted.parquet` of each input run, in source order, for the 1/K0 term of shadow demotion (`rescore.shadow_im_tolerance`)

Plus the 7 repeated flags removed above: see "Global flags".

quant

Quantify identified peptides + roll up to protein groups

Usage: mumdia quant [OPTIONS] --psms-scored <PSMS_SCORED> --chromatograms <CHROMATOGRAMS>... --out-peptide <OUT_PEPTIDE> --out-protein <OUT_PROTEIN>

Options:
      --psms-scored <PSMS_SCORED>

      --chromatograms <CHROMATOGRAMS>...
          The run's chromatogram table, or a grouped run's band tables in band order (`groups/gNN/chromatograms.parquet`) when it did not pool them

      --overlap-losers <OVERLAP_LOSERS>
          A grouped run's `groups/overlap_losers.parquet`: the candidates each band table does not contribute, because the pool's overlap dedup gave them to another band. Its `band` column indexes the `--chromatograms` list, which must be the band tables the file names, in its order (a mismatch is refused)

      --out-peptide <OUT_PEPTIDE>

      --out-protein <OUT_PROTEIN>

      --out-fragment <OUT_FRAGMENT>
          Optional per-fragment area export (for ion-level directLFQ)

      --out-peak-bounds <OUT_PEAK_BOUNDS>
          Optional per-candidate peak-window diagnostic (candidate_id, lo_rt, hi_rt, width_s)

      --out-quant-fragments <OUT_QUANT_FRAGMENTS>
          Optional account of the fragments behind every quantity (quant_fragments v1: per fragment its area, whether the rule selected it, its weight, rank and background). `run` and `run-experiment` write it under `quant.fragment_detail`

      --export-cross-run
          Write the cross-run export into `--out-fragment` (fragment_quant v5: the zero-area rows and the columns the cross-run fit reads; v6 under `quant.fragment_selection = pattern_fit` or `pattern_profile`, with the pattern columns). The first pass of the cross-run step; `run-experiment` runs it by itself

      --cross-run-from <CROSS_RUN_FROM>...
          The second pass of the cross-run step: the first-pass `--out-fragment` tables of every run of the experiment, written with `--export-cross-run`, in run order. The fit follows `quant.fragment_selection = cross_run`, `pattern_fit` or `pattern_profile`, `quant.baseline_source = experiment` and `quant.fixed_scan_halfwidth_scale`. Without it those keys fall back to the per-run quant

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

quant-lfq

Combine per-run quant tables into a protein-by-run matrix (cross-run LFQ)

Usage: mumdia quant-lfq [OPTIONS] --out <OUT>

Options:
      --inputs <INPUTS>...
          One per-run table per run: peptide_quant.parquet for maxlfq, fragment_quant.parquet for directlfq

      --method <METHOD>
          `maxlfq` (peptide-level) or `directlfq` (ion/fragment-level)

          [default: maxlfq]

      --normalize <NORMALIZE>
          Cross-run normalization: `median_ratio` (default), `median`, or `none`

          [default: median_ratio]

      --quantity-column <QUANTITY_COLUMN>
          The intensity column of the inputs: `quantity` (default), or `quantity_normalised` of `quant-normalise` tables (then with `--normalize none`)

          [default: quantity]

      --out <OUT>

Plus the 7 repeated flags removed above: see "Global flags".

quant-normalise

Cross-run normalisation of per-run precursor quantities -> peptide_quant_normalised

`quant.normalisation`, docs/12 "Cross-run normalisation": per run and retention-time bin, the median log2 deviation of a stable set of ions (`stable_set`). Writes one `peptide_quant_normalised` table per input and the fitted shifts. The estimator setting is `quant.normalisation_rank` of `--config`; the method is `stable_set` also when `quant.normalisation` is `off`, since running this subcommand is the request.

Usage: mumdia quant-normalise [OPTIONS] --inputs <INPUTS>... --outputs <OUTPUTS>... --shifts-out <SHIFTS_OUT>

Options:
      --inputs <INPUTS>...
          One `peptide_quant.parquet` per run, in run order

      --outputs <OUTPUTS>...
          One output table per input, in the same order

      --shifts-out <SHIFTS_OUT>
          The shifts table (`quant_normalisation.parquet`)

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

run

Orchestrate the full pipeline on one run and write a manifest. Given several --mzml, the files are searched as ONE pooled experiment (`run-experiment`: one combined rescore, per-run quant, cross-run LFQ), which is the default treatment of a multi-file input; use `run-experiment` directly for run names

Usage: mumdia run [OPTIONS] --mzml <MZML> --out-dir <OUT_DIR>

Options:
      --fasta <FASTA>
          FASTA to digest into the library. Omit when supplying a prebuilt library via --lib-precursors + --lib-fragments (library-input mode)

      --mzml <MZML>
          Spectra file. Repeat the flag for several files; they are then rescored together as one experiment rather than searched separately

      --out-dir <OUT_DIR>

      --lib-precursors <LIB_PRECURSORS>
          Library-input mode: consume a prebuilt precursor library (e.g. an imported DIA-NN speclib) instead of digesting --fasta. Requires --lib-fragments; skips digest/peptidoforms/predict-frag

      --lib-fragments <LIB_FRAGMENTS>
          Prebuilt fragment library paired with --lib-precursors

      --config <CONFIG>

      --profile <PROFILE>
          Named tuning preset applied on top of --config/defaults. "dia" = the validated DIA preset (Extended features, rolling-window apex, RT prior)

      --max-spectra <MAX_SPECTRA>
          [default: 0]

      --top-peaks-ms2 <TOP_PEAKS_MS2>
          Irreversible conversion-time MS2 cap (0 = all). Seed-only peak limiting is configured by `search_seed.top_n_peaks`

          [default: 0]

Plus the 7 repeated flags removed above: see "Global flags".

run-experiment

Experiment-wide orchestrator: run the per-file search chain over N runs, then one combined rescore, optional rescuable MBR transfer, per-run quant, and cross-run LFQ. Pass --mzml once per run (>= 2)

Usage: mumdia run-experiment [OPTIONS] --out-dir <OUT_DIR>

Options:
      --fasta <FASTA>

      --mzml <MZML>
          One per run; repeat the flag (>= 2 runs)

      --run-names <RUN_NAMES>
          Optional per-run labels / subdir names (default r0..rN-1)

      --out-dir <OUT_DIR>

      --lib-precursors <LIB_PRECURSORS>

      --lib-fragments <LIB_FRAGMENTS>

      --config <CONFIG>

      --profile <PROFILE>

      --max-spectra <MAX_SPECTRA>
          [default: 0]

      --top-peaks-ms2 <TOP_PEAKS_MS2>
          [default: 0]

Plus the 7 repeated flags removed above: see "Global flags".

build-library

Build the spectral library of a FASTA search without spectra: digest -> peptidoforms -> predict-frag, restored from or stored into `predict_frag.library_cache` under the key a `run --fasta` uses. Writes the two library tables, manifest.json and library.json (counts, models, cache key and the commands that search with it) into --out-dir

Usage: mumdia build-library [OPTIONS] --fasta <FASTA> --out-dir <OUT_DIR>

Options:
      --fasta <FASTA>
          FASTA to digest into the library

      --out-dir <OUT_DIR>

      --config <CONFIG>

      --profile <PROFILE>
          Named tuning preset applied on top of --config/defaults, as for `run`

      --ion-mobility <ION_MOBILITY>
          `on` builds the library for spectra with ion mobility (a timsTOF diaPASEF .d), so `predict_frag.im_predictor = auto` predicts 1/K0 and a search of such spectra finds the library in the cache; `off` for every other acquisition

          [default: off]
          [possible values: off, on]

Plus the 7 repeated flags removed above: see "Global flags".

align

Cross-run RT alignment (experiment-level) -> alignment.parquet

Usage: mumdia align [OPTIONS] --out <OUT>

Options:
      --seed-psms <SEED_PSMS>...
          One seed_psms.parquet per run; the first is the reference

      --out <OUT>

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

mbr

Match-between-runs identification transfer (Stage D3) -> transferred.parquet

Usage: mumdia mbr [OPTIONS] --psms-scored <PSMS_SCORED> --out <OUT>

Options:
      --psms-scored <PSMS_SCORED>
          Experiment-wide scored_combined.parquet (has the `source` column)

      --psms-extracted <PSMS_EXTRACTED>...
          Per-run psms.parquet in `source` order (one per run)

      --out <OUT>

      --out-psms-scored <OUT_PSMS_SCORED>
          Optional augmented scored table: input scored with accepted transfers' q_value lowered + is_transferred flag (for quant/report with q_filter=psm_q)

      --frag [<FRAG>...]
          Optional per-run fragment_quant.parquet (source order) for the fragment-consensus guard (needs mbr.consensus_corr_min > 0)

      --config <CONFIG>

Plus the 7 repeated flags removed above: see "Global flags".

inspect

Print schema, head sample, and row count for any artifact

Usage: mumdia inspect [OPTIONS] <ARTIFACT>

Arguments:
  <ARTIFACT>

Plus the 7 repeated flags removed above: see "Global flags".

peak-census

Peaks per MS2 spectrum for an mzML or a diaPASEF `.d`, as JSON: percentiles plus what each candidate `--top-peaks-ms2` cap would discard.

The pre-flight for a decision the documentation says must be made per acquisition. Reading it before setting a cap is the difference between bounding peak volume and deleting fragment evidence from most spectra. A diaPASEF `.d` is counted after the native reader's centroiding, which is what `convert` writes for it.

Usage: mumdia peak-census [OPTIONS] --mzml <MZML>

Options:
      --mzml <MZML>

      --max-spectra <MAX_SPECTRA>
          Stop after this many spectra from the head of the file (0 = all); for a diaPASEF `.d`, this many frames

          [default: 0]

      --config <CONFIG>
          Configuration file, read for `convert.*` so a vendor file can be converted the same way `run` converts it

Plus the 7 repeated flags removed above: see "Global flags".

audit

Candidate audit: reconstruct per-candidate stage flags + earliest rejection reason across the artifact chain and write candidate_audit.parquet (sensitivity program, P0.3/P0.4). Non-destructive; reruns no compute

Usage: mumdia audit [OPTIONS] --lib-precursors <LIB_PRECURSORS> --psms-extracted <PSMS_EXTRACTED> --competed <COMPETED> --psms-scored <PSMS_SCORED> --out <OUT>

Options:
      --lib-precursors <LIB_PRECURSORS>
          Library precursors parquet (the full candidate search space)

      --psms-extracted <PSMS_EXTRACTED>
          psms parquet from `extract`

      --competed <COMPETED>
          competed parquet from `compete`

      --psms-scored <PSMS_SCORED>
          scored parquet from `rescore`

      --out <OUT>
          Output candidate_audit.parquet

      --q <Q>
          Precursor q-value threshold for passed_precursor_fdr / reported

          [default: 0.01]

      --run-id <RUN_ID>
          Run identifier stamped on every row

          [default: run]

      --entrapment-substr <ENTRAPMENT_SUBSTR>
          Optional protein substring marking entrapment candidates (e.g. _HUMAN)

          [default: ""]

Plus the 7 repeated flags removed above: see "Global flags".

report

Write peptides.tsv + proteins.tsv from a scored PSM table, or the experiment-wide pair for a `run-experiment` output directory

Usage: mumdia report [OPTIONS]

Options:
      --psms-scored <PSMS_SCORED>
          A single run's scored table. Either this or --experiment-dir

      --experiment-dir <EXPERIMENT_DIR>
          A `run-experiment` output directory: rewrite its experiment-wide peptides.tsv and proteins.tsv (one quantity column per run) from the pooled scored table, per-run quantities and cross-run LFQ named in its experiment_manifest.json, at another --q if wanted

      --out-dir <OUT_DIR>
          Where the two TSVs go. Defaults to --experiment-dir in experiment mode

      --peptide-quant <PEPTIDE_QUANT>

      --protein-quant <PROTEIN_QUANT>

      --localisation <LOCALISATION>
          A `localise` table of the run: adds the localisation columns to peptides.tsv and writes sites.tsv. In experiment mode the tables the manifest names are used

      --fasta <FASTA>
          A FASTA to number the sites of sites.tsv on their proteins

      --q <Q>
          Reported q threshold. Defaults to `quant.q_threshold` from `--config` when that is given, otherwise 0.01. An explicit value always wins

      --config <CONFIG>
          Read `quant.q_threshold` from this config, so a standalone report uses the same threshold as the `run` that produced the table.

          Without it, a config setting `quant.q_threshold = 0.05` yielded 0.05 from `run` and 0.01 from `report` on the same scored table, silently.

Plus the 7 repeated flags removed above: see "Global flags".

cache

Show, trim or clear the engine's caches: FASTA-built libraries and DeepLC's trunk projection (docs/14, "The engine's caches")

Usage: mumdia cache [OPTIONS] [ACTION]

Arguments:
  [ACTION]
          `show` lists the cache root, the bound (MUMDIA_CACHE_MAX_GB) and each cache's directory, entries and size; `prune` applies the bound now, as the end of a run does; `clear` removes every entry, however recently used

          [default: show]
          [possible values: show, prune, clear]

Options:
      --config <CONFIG>
          Resolve the two cache settings from this configuration (default: the engine defaults, `"auto"` for both)

      --json
          Emit the result as JSON on stdout. The desktop application lists and clears the caches through it

Plus the 7 repeated flags removed above: see "Global flags".

doctor

Check that the configured Python sidecar environments are usable

Usage: mumdia doctor [OPTIONS]

Options:
      --config <CONFIG>

      --json
          Emit the report as JSON on stdout instead of prose on stdout.

          For a caller that has to act on the result rather than read it: the desktop application renders one row per role and offers to install what is missing, which means it needs the modules and versions as data, not a paragraph to regex. The exit status is unchanged.

      --no-import-check
          Skip the real import of each interpreter's packages and only check that they are installed.

          By default every interpreter the configuration uses is asked to import its role's packages for real (`deeplc` first, then torch with one operation), with a 120 s bound per role. That costs seconds, and it is the only check that catches a package which is installed but cannot load, such as a torch whose DLLs fail to initialise on Windows. `MUMDIA_DOCTOR_IMPORT_CHECK=0` does the same as this flag, for a caller that cannot know whether its engine has it.

      --out-dir <OUT_DIR>
          Also check that this results folder can be written (nothing is created)

Plus the 7 repeated flags removed above: see "Global flags".