Skip to content

feat: AUPRC benchmark metric, 2 new seeds (Bac2A + KR-12), assay pre-registration - #58

Merged
cschanhniem merged 2 commits into
mainfrom
feat/pre-wetlab-polish-sprint
Jun 28, 2026
Merged

cschanhniem merged 2 commits into
mainfrom
feat/pre-wetlab-polish-sprint

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

Pre-wet-lab polish sprint — three improvements that increase scientific rigor and wet-lab success probability:

1. AUPRC benchmark metric

  • Added _auprc() to benchmark/retrospective.py (trapezoidal PR-curve integration)
  • run_retrospective_benchmark() now returns auprc, auprc_random_baseline, auprc_above_random
  • AUPRC is preferable to AUROC for class-imbalanced screening datasets (emphasises precision at the operating point used for selection)
  • Random baseline = dataset prevalence; values above baseline indicate positive signal
  • 10 new tests covering perfect/worst/random/edge cases + full integration test

2. Two new mechanistically distinct seeds

  • SEED-009: Bac2A (RRLPRPPYLPRP, bovine proline-rich cathelicidin)
    • Intracellular DnaK-targeting mechanism — genuinely distinct from all 8 prior membrane-disruption seeds
    • Gram-negative selective; naturally proline-rich (synthesis penalty flagged appropriately)
  • SEED-010: KR-12 (KRIVQRIKDFLR, shortest active fragment of human LL-37 cathelicidin)
    • Human origin → clinical relevance context; good selectivity profile (MRSA + E. coli data)
  • Effect on calibrated probability: effective independent scaffold families 8 → 10; breaking-news P(≥1) improves from 12–22% to 15–26% (DISCOVERY_PREDICTION External Calibration section updated)

3. Assay pre-registration

  • docs/ASSAY_PREREGISTRATION.md: full pre-registration template
    • EUCAST ISO 20776-1 broth microdilution protocol (4 target organisms with QC strains)
    • HC50 hemolysis assay protocol (0.5% hRBC, 541 nm readout)
    • Pre-registered hit criteria and selectivity index thresholds (TI > 10 = PASS)
    • Statistical plan (biological triplicate, geometric mean MIC)
    • Negative result reporting obligations
    • Decision gate table (P1/P2/P3)
    • Signature block for PI, synthesiser, biosafety officer, lab partner

Test plan

  • 1182 tests pass (10 new AUPRC tests)
  • Pre-push hook CI passed
  • Verify make validate-scoring output includes auprc field
  • Have domain expert confirm EUCAST broth microdilution parameters in ASSAY_PREREGISTRATION.md
  • Check that SEED-009 and SEED-010 generate valid candidates through make generate

🤖 Generated with Claude Code

AUPRC (Area Under Precision-Recall Curve):
- Add _auprc() to retrospective.py (trapezoidal integration)
- run_retrospective_benchmark() now returns auprc, auprc_random_baseline,
  auprc_above_random alongside existing AUROC + bootstrap CI
- 10 new tests in tests/test_auprc.py (perfect/worst/random/edge cases +
  integration test verifying all three keys appear in benchmark output)
- METHODS.md Section 8 updated with AUPRC explanation and rationale

New seeds:
- SEED-009: RRLPRPPYLPRP — Bac2A bovine proline-rich cathelicidin
  (intracellular DnaK-targeting mechanism, genuinely distinct from all
  8 prior membrane-disruption seeds; Gram-negative selective)
- SEED-010: KRIVQRIKDFLR — KR-12, shortest active fragment of human LL-37
  cathelicidin (clinical relevance; good selectivity vs MRSA + E. coli)
- Increases effective independent scaffolds: 8 → 10
- Calibrated breaking-news probability: 15-30% → 18-30%

Pre-registration:
- docs/ASSAY_PREREGISTRATION.md: full assay pre-registration template
  including EUCAST/CLSI broth microdilution protocol, HC50 protocol,
  selectivity index definition, pre-registered hit criteria, statistical
  plan, deviation log, and signature block
…d HC50 ceiling

AUPRC tie-breaking:
- Sort key changed from (-score,) to (-score, label) so negatives sort before
  positives on tied scores; prevents inflation to 1.0 for random classifiers
  (matches sklearn average_precision_score pessimistic convention)
- Add test_all_tied_scores_pessimistic_not_inflated to verify behavior
- Fix test_worst_classifier: assert result < prevalence (was trivially true)
- Add test for tied-scores case

Assay pre-registration:
- Ciprofloxacin EUCAST QC range: 0.008-0.06 → 0.004-0.016 µg/mL (v14 Table 5)
- HC50 concentration ceiling: 256 → 512 µg/mL to resolve TI ambiguity at the
  32 µg/mL MIC boundary; add explicit interpretation rule for >512 µg/mL
@cschanhniem
cschanhniem merged commit a0f7db2 into main Jun 28, 2026
@cschanhniem
cschanhniem deleted the feat/pre-wetlab-polish-sprint branch June 28, 2026 09:36
cschanhniem added a commit that referenced this pull request Jun 28, 2026
* chore: update ROADMAP.md with current metrics, add coverage gate to make coverage

- AUROC 0.8164→0.8420 (bootstrap CI₉₅: 0.76–0.91) in v0.4 milestone entry
- Add v0.6.x section documenting PRs #61–#72 scoring improvements
- Mark AUPRC gap as Done (PR #58, pipeline AUPRC=0.8627)
- Update large-scale benchmark gap row with corrected n=87 and CI
- coverage target: add --cov-fail-under=80 so make coverage exits non-zero
  below 80%; currently passes at 87.40%

* docs: fix v0.6.x chain gap (add PR #65) and AUPRC attribution
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