Skip to content

MCP returns figures, qc dry run and plots, run results, typed flags; version 0.18.4 - #40

Merged
YPARK merged 1 commit into
mainfrom
mcp-figures-and-results
Oct 31, 2026
Merged

YPARK merged 1 commit into
mainfrom
mcp-figures-and-results

Conversation

@YPARK

@YPARK YPARK commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

The rest of the MCP audit: what an agent couldn't see or set. Follows #39, now merged.

Figures come back as images

  • faba metagene and faba pwm take --figure PREFIX: the view's figure as {PREFIX}.pdf and .png, drawn without a terminal, so with --batch-process too. The MCP metagene and pwm tools pass it by default (figure: false turns it off) and return the PNG as an image beside the table.
  • pileup's Miami SVG is also returned as an image, at most 1600 px wide.
  • New figure::png and figure::save_with_png.

qc: try thresholds first, and plots in batch

  • faba qc --dry-run prints TSV and writes nothing: per batch, what the cell QC keeps; per modality, what each --site-* threshold removes, alone and only by it. Needs INPUT_DIR only. The MCP qc tool's dry_run returns it as rows.
  • faba qc --batch-process --plots draws the view's qc_plots/ figures headlessly: every modality and knob, with the metagene once the annotation is read. The MCP plots returns up to eight as images.
  • qc_plots/ now holds a PNG beside each PDF, as the docs already said.
  • The picker's construction is factored into picker() and site_views(); Meta::wait blocks for the annotation.

Results that only went to stderr

Every MCP result for a directory now carries the results of its *.run.json records, by job: a fit's R-hat, cluster sizes, and so on. Over 16 KiB it points to the file instead.

Typed flags

Common flags have their own arguments, from one TYPED table that also builds the schemas:

  • barcode, gene and UMI tags; gene type; mixture
  • run's skips and depth resolution
  • cluster's shift, seed, profile strength and holdout
  • pileup's membership, top modality and tracks
  • metagene's isoforms and non-coding

They are put ahead of options, so the existing checks still apply. A test checks each one against the command's real clap flags.

Small fixes

  • apa takes utr_bed.
  • options no longer lists the stale -I/--interactive, and says when a flag has its own argument.
  • modules' data is described as a cluster output.

Version

0.18.4.

Testing

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo test pass: 740 unit tests plus the integration suites.
  • New end-to-end tests run faba qc --dry-run and --plots on the synthetic fileset.
  • New unit tests: threshold counts against the qc rule, headless site figures, typed flags, run-record results, TSV rows, and save_with_png.
  • Not run here: --features hdf5 (this branch touches no hdf5 code), and a full MCP session end to end.

…version 0.18.4

- metagene and pwm take --figure PREFIX: the view's figure as PDF and PNG,
  drawn without a terminal. The MCP tools pass it by default and return
  the PNG as an image; pileup's Miami SVG comes back as an image too.
- qc --dry-run prints, as TSV, what the cell QC keeps per batch and what
  each --site-* threshold removes per modality (alone, and only by it);
  nothing is written. qc --batch-process --plots draws the view's
  qc_plots/ figures headlessly. qc_plots/ now holds PNG beside PDF, as
  documented. The MCP qc tool takes dry_run and plots.
- Every MCP result for a directory carries the `results` of its run
  records (a fit's R-hat, cluster sizes), which the child only logged.
- Common flags have typed MCP arguments (barcode tags, gene type,
  mixture, run's skips and depth resolution, cluster's shift, seed,
  profile strength and holdout, pileup's membership, top modality and
  tracks, metagene's isoforms and non-coding), checked against each
  command's own flags by a test.
- apa takes utr_bed; options refuses the stale -I/--interactive no more
  and says when a flag has its own argument; modules' data is described
  as a cluster output.
@YPARK
YPARK changed the base branch from fix-mcp-pileup-figure-and-modules to main October 31, 2026 18:09
@YPARK
YPARK merged commit 0c8e255 into main Oct 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant