Repository navigation
First-class TUI: qc view, figures drawn once, squeeze folded into qc, one view rule; version 0.10.9 - #42
Merged
Conversation
YPARK
force-pushed
the
ypp/trusting-pasteur-ao27p0
branch
from
October 31, 2026 14:49
36baaf8 to
7b28ac7
Compare
… one view rule; version 0.10.9 `data-beans qc` opens a full-screen view on a terminal, modelled on `faba qc`: each cell QC rule with its edge, how many cells it fails and how many only it removes; the selected rule's histogram in three layers (all cells, those passing the other rules, those only it removes); counts against genes; and the removed cells by the rules they fail. The view edits a QcConfig and reruns qc_lib's own verdict, so the flags it prints (`p`) or copies (`c`) decide the same cells. Enter writes to -o, or asks where, never over the input or an existing file. - figure: faba's SVG drawing ported in, written as PDF and PNG, drawn as terminal images in kitty, iTerm2, WezTerm and Ghostty, text plots elsewhere. `qc --figure` and `stat --figure` write the QC and statistics figures; the MCP qc and statistics tools return them. - `plot` and `squeeze` are gone. squeeze's cutoffs are qc's floors (-c is --qc-min-cell-nnz, -r --qc-feature-min-cells); --qc-auto-cutoff puts both at their troughs unless --qc-feature-min-cells is given. qc takes several files, pooled as merge-backend merges them, and writes the kept cells' batch labels. The --squeeze flags of the builders, merge and subset cut in place through squeeze_in_place. - One log axis for every histogram (qc::axis, ln(shift + x), the shift chosen from the data): printed, view and figure histograms bin on it. The stat explorer saves its figure (s) and draws images. - One rule for every view: batch under --batch-process (on every view command) or DATA_BEANS_BATCH=1, else a view where stdin and stdout are a terminal and TERM is not dumb. qc and stat open by default; the pickers open only when nothing is selected. MCP runs in batch. - stdout carries only results; QC histograms, notices, logs and errors go to stderr. - `mcp watch`: `o` on a qc call opens the QC view on the agent's data with its settings. - Review fixes: flags reproduce the view (mito off, gene rule under auto cutoff); `m` on a rule with no spread removes nothing; --qc-histogram holds after the view; figures never replace a file; the view decides quietly and says when the guardrail keeps every cell; bands, edges and masks are worked out once per change, in parallel; one place for the band and edge logic.
YPARK
force-pushed
the
ypp/trusting-pasteur-ao27p0
branch
from
October 31, 2026 14:56
7b28ac7 to
d97b183
Compare
YPARK
marked this pull request as ready for review
October 31, 2026 14:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CLI's terminal views become first-class, and its figures are drawn once (modelled on faba).
squeezeandplotare folded into specific commands, and everything stays reachable over MCP.What changes
data-beans qcis its own view on a terminal, modelled onfaba qc:mgives it a value of its own,pshows andccopies the--qc-*flags that decide the same cells,ssaves the figure. Enter writes to-o, or asks where (never over the input or an existing file).QcConfigand rerunsqc_lib's own verdict, so the printed flags reproduce it exactly.Figures (
src/figure/, ported from faba): one SVG per figure, written as PDF and PNG.qc --figureandstat --figurewrite them; the MCPqcandstatisticstools return them as images.plotandsqueezeare removed.qc --figureandstat --figurereplaceplot.qc's floors:-cis--qc-min-cell-nnz,-ris--qc-feature-min-cells.--qc-auto-cutoffputs both at their troughs, unless--qc-feature-min-cellsis given.qctakes several files, pooled asmerge-backendmerges them (--common-rows), and writes the kept cells' batch labels.--squeezeflags on the import commands,mergeandsubsetstill work throughsqueeze_in_place.One log axis for every histogram (
qc::axis): printed, view and figure histograms read values onln(shift + x), with the shift chosen from the data. Means and fractions now spread out instead of piling into the first tenth-decade bins.One rule decides every view (
interactive::opens_view/picks):--batch-process, on every view command, orDATA_BEANS_BATCH=1for a whole script.TERMisn'tdumb.qcandstatopen by default; without a terminal they say so in one stderr line.columns,rows,subset*) open only when the command line selects nothing.stdout/stderr: stdout carries only results. QC histograms, notices, logs and errors go to stderr. senna's and pinto's
--qc-histogramnow prints to stderr.mcp watch:oon aqccall opens the QC view on the agent's data with its settings; theqcresult now names its data as absolute paths.Version 0.10.9, a patch release: faba's uses of data-beans all still compile. Downstream crates see two behaviour changes:
ui::Binning's log bins now use the shared axis, andqc_libnow reads an empty mito or ribo pattern as no metric, where it used to be a regex that found every gene.Review fixes (from
/code-review)--qc-auto-cutoffso is the gene rule,0for off, andqcsets the gene trough only when--qc-feature-min-cellsisn't given.mon a rule with no spread starts from a value that removes nothing, not 0.--qc-histogramholds after the view. The printed command keeps--backend,--no-zipand--qc-histogram.saverefuses, and the views offer the next free name.CellRules. The batch summary is unchanged on the test matrix.Testing
clippy --all-targets --features sim -D warnings, the CI feature matrix (except the HDF5 builds: no libhdf5 here), andcargo test --features simall pass.qc's own defaults give the same verdicts, including mito off and a gene rule off under auto cutoff), figures (PDF/PNG, no replacing), the views (TestBackend, the guardrail line), the shared view rule, MCP figures, pooling andqc'sdata. The PTY session tests now run onqcandstat.qc(1,380 kept), moving the mito edge writes 1,374, and the printed flags reproduce that.c);oin a live watch session; speed at about 1M cells.