Skip to content

feat: expanded benchmark (95 AMPs + 96 decoys, AUROC 0.7832) + DKP risk + stability calibration - #102

Merged
cschanhniem merged 5 commits into
mainfrom
feat/expanded-benchmark
Jun 29, 2026
Merged

cschanhniem merged 5 commits into
mainfrom
feat/expanded-benchmark

Conversation

@cschanhniem

@cschanhniem cschanhniem commented Jun 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR expands the benchmark from 43+44 (n=87) to 95+96 (n=191), adds DKP_RISK detection in presynth QC, and flags serum stability calibration gaps for short peptides.

Benchmark Expansion

  • Added 52 well-characterised public-domain AMPs from 12 taxonomic classes with clear literature citations
  • New classes: human defensins (hBD-1/2/3, histatin 5, dermcidin, hepcidin), insect (apidaecin, drosocin, formaecin, thanatin), mammalian cathelicidins (BMAP-27/28, SMAP-29, PMAP-23/36, protegrins 1-3, PR-39), plant (RsAFP1/2, snakin-1), fungal (plectasin, eurocin), fish (pleurocidin, piscidins), marine (tachyplesins, polyphemusin, arenicin)
  • Expanded random_background.csv and scrambled_decoys.csv to match
  • New AUROC: 0.7832 (CI₉₅: 0.72–0.84, n=191) — previous 0.8420 (CI₉₅: 0.76–0.91, n=87)

DKP Risk Detection (presynth_check.py)

  • All 4 SEED-008 pilot variants (FPVTWRFWRWWKG etc.) flagged for N-terminal F-Pro diketopiperazine cyclization
  • Excludes Pro-Pro (secondary amine prevents cyclization)
  • MW-based MS confirmation guidance

Stability Calibration

  • SHORT_PEPTIDE flag for <14 AA: warns serum stability model underestimates actual t½
  • Affects: SEED-003 (11 AA), SEED-007 (11 AA), SEED-008 (13 AA)

Doc Consistency

  • ASSAY_PREREGISTRATION.md: SEED-001/SEED-006 added to priority rationale
  • All AUROC/CI updated across ROADMAP, DISCOVERY_PREDICTION, WET_LAB_PROBABILITY, EXPERT_REVIEW_PACK

Tests

1336 passing (up from 1321). Regression sentinels updated for new expanded-benchmark baselines.

cschanhniem and others added 3 commits June 29, 2026 08:26
…72–0.84)

Adds 52 well-characterised public-domain AMPs from 12 taxonomic classes
(defensins, histatins, dermcidin, cathelicidins, proline-rich Bac/PR-family,
plectasin/eurocin, piscidins, tachyplesins/polyphemusins, brevinins, etc.)
with clear literature citations.

Expands scrambled decoys to 95 (one per AMP). Updates regression sentinels
and test assertions. Docs updated: ROADMAP, DISCOVERY_PREDICTION,
WET_LAB_PROBABILITY, EXPERT_REVIEW_PACK.

n=191 benchmark closes the "small 43+44 set" limitation. AUROC 0.7832
reflects honest generalisation to diverse AMP classes the helic-centric
scorer was not calibrated for.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
…lization

All four SEED-008 pilot variants (FPVTWRFWRWWKG, FPITWRWFKWWKG,
FPVSWRWWKFWKG, FPVTWRWWKWYRG) start with F-Pro — the canonical N-terminal
motif susceptible to diketopiperazine (DKP) cyclization at physiological pH
(t½ hours–days at 37°C). DKP truncates the peptide at position 3, typically
causing 5–50× activity loss if undetected at receipt.

Changes:
- Extract _AA_AVG_MASS to module level (was local dict in _molecular_weight)
- Add SynthQC.diketopiperazine_risk field and to_dict() key
- Detect X-Pro at N-terminus (excluding P-Pro: secondary amine, no cyclization)
- Set n_acetylation_recommended=True for DKP-only cases (no trypsin sites)
- Flag text includes: dynamic DKP product mass (e.g. ~244 Da for F-Pro),
  truncated sequence preview, MS receipt check guidance, Nα-Ac prevention,
  and Smyth et al. 2000 citation
- 15 new tests: detection, PP exclusion, mass value, all 4 SEED-008 pilots,
  to_dict(), n_acetylation guard for DKP-only sequences, difficulty escalation
…72–0.84)

Benchmark expansion:
- Adds 52 well-characterised public-domain AMPs from 12 taxonomic classes
  (defensins, histatins, dermcidin, cathelicidins, proline-rich Bac/PR-family,
  plectasin/eurocin, piscidins, tachyplesins/polyphemusins, brevinins, etc.)
  with clear literature citations to known_amps.csv
- Expands random_background.csv to 96 decoys and scrambled_decoys.csv to 95
- n=191 benchmark (95 AMPs + 96 decoys) — closes the "small 43+44 set" limitation

Pipeline QC (presynth_check.py):
- DKP_RISK: N-terminal X-Pro diketopiperazine cyclization check for all 4
  SEED-008 pilot variants (FP-starting); excludes Pro-Pro; couples DKP
  prevention into Nα-Ac recommendation; MW-based MS confirmation guidance
- SHORT_PEPTIDE flag for <14 AA sequences: serum stability model calibrated
  for 18–30 AA — warns wet-lab that model may underestimate actual t½

Doc consistency:
- ASSAY_PREREGISTRATION.md: adds SEED-001 (positive control) and SEED-006
  (mastoparan-X, Gram-negative cover) to priority organism rationale
- EXPERT_REVIEW_PACK.md §8: SEED-007 added to serum stability calibration
  gap row; AUROC updated throughout
- ROADMAP, DISCOVERY_PREDICTION, WET_LAB_PROBABILITY: all benchmark numbers
  updated to expanded 95+96 values
- .commandcode/ added to .gitignore

Tests: 1336 passing (up from 1321); regression sentinels updated for new
expanded-benchmark baselines (phase3 AUROC ≥0.73, pipeline AUROC <0.78)

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@cschanhniem cschanhniem changed the title feat(qc+bench): expanded benchmark (95+96 AMP set) + DKP_RISK flag for SEED-008 feat: expanded benchmark (95 AMPs + 96 decoys, AUROC 0.7832) + DKP risk + stability calibration Jun 29, 2026
cschanhniem and others added 2 commits June 29, 2026 08:37
Raise minimum assertion bounds from 43/44 (old demo set) to 90+ to
match the expanded 95+96 benchmark (PR #110). Prevents silent reversion
to the smaller 43+44 dataset.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
… docs

HIGH fixes:
- n_acetylation_reason no longer overwritten by trypsin block when DKP risk
  also present; both reasons are now concatenated (affected all 4 SEED-008
  pilots which have both F-Pro and interior K/R residues)
- EXPERT_REVIEW_PACK.md: remove truncated fragment + duplicate boilerplate block
  from end of file (doc corruption from prior patch)

MEDIUM fixes:
- EXPERT_REVIEW_PACK.md lines 33 and 63: update stale AUROC 0.8420/43-AMP →
  0.7832/95-AMP expanded benchmark numbers
- DISCOVERY_PREDICTION.md: fix "~84% of the time" → "~78% of the time" to match
  new AUROC=0.7832; remove lone '.' + duplicate paragraph from tracking section
- ASSAY_PREREGISTRATION.md: add Nα-acetylation REQUIRED note for SEED-008
  (F-Pro DKP risk, MW-244 Da MS check, 5% satellite rejection criterion)

LOW fix:
- test_phase3_benchmark_passes_gate docstring: update sentinel comment to match
  new bounds (< 0.78 not < 0.84; baseline 0.7448 not 0.8266)

New test: test_dkp_reason_preserved_when_trypsin_sites_also_present — regression
guard ensuring DKP prevention appears in n_acetylation_reason even when trypsin
sites are also detected
@cschanhniem
cschanhniem merged commit 8221ffc into main Jun 29, 2026
1 check failed
@cschanhniem
cschanhniem deleted the feat/expanded-benchmark branch June 29, 2026 01:37
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