Repository navigation
Per-genome HTML/PDF report, written by detect by default - #48
Merged
Merged
Conversation
New package MATPredict.report and `matpredict report genome --run DIR [--pdf]`: a self-contained HTML report of one detect run (no network), printable to PDF. Result first in plain words (mating type and confidence; two idiomorphs: needs review; no call; not searched), one card per locus with an inline-SVG gene-order figure, idiomorph evidence and gene table, then search summary, withheld loci, provenance and glossary. Light/dark on screen, light in print. Revised over three rounds of an independent web/data-design review (analysis/2026-10-07_report-design-review.md). detect writes report.html by default (--no-html or MATPREDICT_HTML=0 to opt out; batch scripts set the variable, which older frozen worktrees ignore); --pdf adds report.pdf; a report error never fails the run. detection_report.yaml gains a `run` provenance block (sample, organism, taxid, version, database SHA-256, genome SHA-256/contigs/N50, parameters, timing); detect gains --sample and --organism. WeasyPrint 69 joins the pixi environment (25 conda packages, 10.3 MB; no existing locked version changed) and environment.yml; the Docker CI smoke test renders a PDF offline. Headless Chrome is a fallback where WeasyPrint is missing. Spec: docs/superpowers/specs/2026-10-07-genome-report-and-reads-intake-design.md (Part 2, reads intake for the service, is design only). 36 new tests; full suite unchanged apart from them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
matpredict report genome --run DIR [--pdf FILE]: one self-contained HTML report perdetectrun (no network or external files), printable to PDF.detectwritesreport.htmlby default. Opt out with--no-htmlorMATPREDICT_HTML=0;--pdfaddsreport.pdf. A report or PDF error is logged and never fails the run.MATPREDICT_HTML=0:run_clade_panel.slurm,run_polish_ab.slurm,zygo_regression.pyandrun_holdout_benchmark.py. They use the variable rather than the flag because they may run an older frozen worktree, which would reject--no-htmlbut ignores an unknown variable.detection_report.yamlgains arunprovenance block. It records sample, organism, taxid, phylum, MATPredict version, database content SHA-256, taxonomy source, genome SHA-256/contigs/length/N50, parameters and timing. The block is additive, and older reports still render.detectgains--sampleand--organism.environment.yml. That is 25 conda packages and a 10.3 MB download, against about 300 MB for headless Chromium. No existing locked version changed. The Docker CI smoke test renders a PDF with no network. Headless Chrome is the fallback where WeasyPrint is missing.docs/superpowers/specs/2026-10-07-genome-report-and-reads-intake-design.md. Part 1 (the report) is implemented here; Part 2 (reads intake for the on-demand service) is design only.Review
Three rounds of an independent web- and data-design review (a briefed model agent, not a person) on rendered HTML, screenshots at 1200 px and 390 px in light and dark, and PDFs from both engines.
Details and the remaining limits:
analysis/2026-10-07_report-design-review.md.Test plan
tests/report/,tests/detect/test_provenance.py):@pageCSS string);detect, and a missing PDF engine keeping the HTML.mainon that machine (missing Linux binaries and the viz extras).🤖 Generated with Claude Code