Skip to content

detect: give exonerate the NCBI table string for genetic codes it lacks (v0.6.1) - #13

Merged
hyphaltip merged 1 commit into
release-buildsfrom
fix-gencode-26
Oct 4, 2026
Merged

hyphaltip merged 1 commit into
release-buildsfrom
fix-gencode-26

Conversation

@hyphaltip

@hyphaltip hyphaltip commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Problem

exonerate 2.4.0 has built-in NCBI tables 1–6, 9–16 and 21–23 only. For code 26 (Pachysolen tannophilus nuclear, CUG = Ala; the Alaninales) it exits 1 with No built in genetic code corresponding to id [26]. _run_checked makes that fatal, so the whole genome got no report: 20 of 19,415 BFD Ascomycota genomes in the v0.6.0 run.

Fix

  • exonerate also accepts --geneticcode as a 64-letter table in NCBI TCAG order. For a code it has no built-in table for, MATPredict now passes that string, built from Biopython's NCBI tables (ncbi_code_string, exonerate_gencode_args). No exonerate change is needed.
  • Measured: a synthetic 120-aa gene with 15 CTG codons aligns at identity 100.00 with the table-26 string, 87.50 with code 1 or 12. The 17 built-in exonerate tables equal Biopython's.
  • Only a code with no NCBI table skips exonerate (miniprot model only).
  • The first version of this PR (ff0e581) skipped exonerate for these codes. Curator: miniprot models genes less well than exonerate. Measured on the 20 genomes: miniprot-only 4/20 called; with the table string 15/20 called.
  • Version 0.6.1 (pyproject, CITATION.cff, README, CHANGELOG).

Checks

  • Tests: 1007 passed (genetic-code tests: string for 26, skip only for a code with no NCBI table, built-in codes unchanged, miniprot -T 26).
  • Regression panel (166 genomes) + Zygo 23, run-b04a77b vs v0.6.0: 0 changed loci in all five panels (results/2026-10-04_regression_v061s/).
  • 20 Alaninales genomes: 20/20 reports, 0 failures, 15/20 called (miniprot-only 4/20). Median 457 s per genome (miniprot-only 34 s). All route phylum_fallback (no Alaninales record), so family labels there are not reliable. Results in results: MAT campaigns — Mucoromycotina publication set; full Basidiomycota and Ascomycota on v0.6.0 #14.

Stacked on #12 (release-builds), which is stacked on #11. Merge #11, #12, then this, then tag v0.6.1.

🤖 Generated with Claude Code
Claude-Session: https://claude.ai/code/session_01JkhYFEPaa1WenE5MtA8Qya

exonerate 2.4.0 has NCBI tables 1-6, 9-16 and 21-23. For code 26 (Alaninales,
CUG = Ala) it exits 1, and _run_checked made that fatal for the whole genome:
20 of 19,415 BFD Ascomycota genomes got no report in the v0.6.0 run. Exonerate
is now skipped for such codes; the gene model comes from miniprot alone
(polished_single). miniprot 0.18 -T 26 translates CTG as Ala (synthetic gene,
15 CTG in 120 aa: identity 1.00 with -T 26, 0.875 with -T 1 or -T 12).

Version 0.6.1 (pyproject, CITATION.cff, README, CHANGELOG).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JkhYFEPaa1WenE5MtA8Qya
hyphaltip added a commit that referenced this pull request Oct 4, 2026
run-b04a77b (PR #13): 20/20 reports, 15/20 called vs 4/20 miniprot-only;
median 457 s vs 34 s per genome. Regression vs v0.6.0: 0 changed loci.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JkhYFEPaa1WenE5MtA8Qya
@hyphaltip hyphaltip changed the title detect: skip exonerate for genetic codes it does not have (v0.6.1) detect: give exonerate the NCBI table string for genetic codes it lacks (v0.6.1) Oct 4, 2026
@hyphaltip
hyphaltip merged commit 83aeeb0 into release-builds Oct 4, 2026
1 check passed
hyphaltip added a commit that referenced this pull request Oct 4, 2026
Re-land #13 on main: exonerate NCBI table string for codes it lacks (v0.6.1)
hyphaltip added a commit that referenced this pull request Oct 4, 2026
detect: exonerate gets the NCBI table string for codes it lacks (the commit #13/#16 missed)
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