Skip to content

feat: novelty-check-broad — compare panel against 72-AMP curated database - #86

Merged
cschanhniem merged 2 commits into
mainfrom
feat/novelty-check-broad
Jun 28, 2026
Merged

cschanhniem merged 2 commits into
mainfrom
feat/novelty-check-broad

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

  • Adds novelty-check-broad CLI command that compares each pilot panel candidate against a curated 72-sequence AMP reference database
  • The standard pipeline novelty score only compared against ~45 seed sequences; this command detects near-copies of published AMPs that the seed-based score misses
  • Addresses the ROADMAP.md gap: "True novelty check against APD3/DRAMP/dbAMP: Current novelty scored against 45-sequence seed set only; may overestimate novelty"

Key Findings

Category Count Families
KNOWN_VARIANT (≥70% sim) 3 SEED-001_VAR_064 (86.7%), SEED-003_VAR_017/012 (81.8%)
CLOSE_RELATIVE (50–70% sim) 1 SEED-005_VAR_019 (60%)
NOVEL (<50% sim) 16 SEED-006, SEED-007, SEED-008, SEED-009
  • SEED-001_VAR_064 and SEED-003 being close to known AMPs is expected — they serve as positive controls that validate the assay platform
  • 16/20 candidates are genuinely novel — no close match in the 72-AMP database
  • SEED-006/007/008/009 confirmed as primary novelty targets; activity from any of these would be publishable as a novel AMP class

New artifact

docs/NOVELTY_BROAD_CHECK.md — generated from outputs/pilot_panel.csv; should be filed with docs/ASSAY_PREREGISTRATION.md before synthesis order

Test plan

  • 4 new TestNoveltyCheckBroad tests: returns_zero, creates_report (content), stdout_summary (n_novel==2 for both test sequences), missing_panel_returns_error
  • Full suite: 1275 passed

🤖 Generated with Claude Code

cschanhniem and others added 2 commits June 28, 2026 23:29
Compares all 20 pilot panel candidates against a curated 72-sequence AMP
reference database (broader than the 45-seed novelty score used during
ranking). Key finding: 16/20 candidates are NOVEL (<50% similarity to any
known AMP), 1 is CLOSE_RELATIVE (SEED-005_VAR_019 at 60%), and 3 are
KNOWN_VARIANT (SEED-003_VAR_017/012 ~82%, SEED-001_VAR_064 ~87% — all
expected from seed design). SEED-006/007/008/009 families confirmed
genuinely novel.

- Adds `novelty-check-broad` CLI command with --panel-csv, --references-csv,
  --out, --threshold-known, --threshold-close flags
- Outputs docs/NOVELTY_BROAD_CHECK.md with per-candidate table and
  KNOWN/CLOSE/NOVEL classification
- Addresses ROADMAP.md gap: "True novelty check against APD3/DRAMP/dbAMP"
- 4 new tests in TestNoveltyCheckBroad (all passing)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Guard against inverted thresholds (threshold-close >= threshold-known)
  returning rc=1 with clear error instead of silently wrong classification
- Fix float() ValueError on empty/NA optional fields using (val or 0.0) pattern
- Skip panel rows with empty sequence with stderr warning instead of
  classifying blank string as NOVEL
- Fix best_sim initialised at -1.0 (consistent with novelty.py) so
  refs with 0.0 similarity still populate best_ref
- Derive NOVEL seed families dynamically from results instead of hardcoding
  SEED-006/007/008/009 in the Recommendations text
- Add 2 new tests: known_variant_classification and inverted_thresholds_returns_error
- Regenerate docs/NOVELTY_BROAD_CHECK.md with fixed Recommendations section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cschanhniem
cschanhniem merged commit 5f6ed61 into main Jun 28, 2026
@cschanhniem
cschanhniem deleted the feat/novelty-check-broad branch June 28, 2026 16:35
cschanhniem added a commit that referenced this pull request Jun 28, 2026
…#87)

- ROADMAP.md: mark 'True novelty check' as Partial (PR #86 covers
  72-AMP curated DB; full APD3 BLASTp still needed before publication)
- ROADMAP.md: mark 'Pre-registration of assay protocol' as Done
- WET_LAB_PROBABILITY.md: correct SEED-003 mechanism from
  'bovine lactoferricin/defensin' to 'RRWQWRMKKLG-class tachyplesin-like'
  based on broad novelty check (81.8% similarity to REF-RRW-001)
- WET_LAB_PROBABILITY.md: raise SEED-003 P(active) from 50-65% to
  60-75% (known-active parent sequence elevates base rate)
- WET_LAB_PROBABILITY.md: update composite P(zero hits) from 0.000635
  (99.94%) to 0.000508 (99.95%) reflecting corrected SEED-003 estimate
- WET_LAB_PROBABILITY.md: add cross-reference to NOVELTY_BROAD_CHECK.md
  in scope header
- Makefile: add 'novelty-broad' target (depends on 'pilot')

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
cschanhniem added a commit that referenced this pull request Jun 28, 2026
The previous version was outdated (pipeline v0.1.0, 5 seeds, stale
phase3 candidates, old batch stats). Updated to reflect current state:

- Pipeline version 0.5.x, AUROC 0.8420, 7 seed families
- Current 20-candidate pilot panel table with novelty categories
  (16 NOVEL, 3 KNOWN_VARIANT, 1 CLOSE_RELATIVE from PR #86)
- SEED-003 annotated as KNOWN_VARIANT (82% similar to RRWQWRMKKLG)
- Gold-standard calibration section with Melittin safety blind spot
- Per-family summary table with P(active), reviewer focus, serum notes
- Updated reviewer questions targeting current 7-seed specific issues
- Updated next steps: serum stability first, MRSA USA300, external
  predictor checklist requirement before synthesis
- Updated pipeline limitations table with Melittin blind spot, serum
  model edge cases, Pro-rich stability caveat
- Document cross-reference index to all companion docs

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
cschanhniem added a commit that referenced this pull request Jun 28, 2026
SEED-003 variants were missing a dedicated special notes section despite
being KNOWN_VARIANT (81.8% similar to RRWQWRMKKLG, a known-active AMP
per PR #86 broad novelty check). Key additions:

- Known-variant classification with implications for P(activity) (60-75%)
  and publication novelty (limited — value is as assay control)
- Met oxidation risk warning for RRWNWRMKKMG at position 10
- Aggregation caution (Trp at >200 µM in aqueous buffer)
- Scorer disagreement interpretation (0.23-0.26 = model consensus)
- C-terminal amidation recommendation

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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