Skip to content

feat: proline synthesis penalty + helix bonus weight (PR #51) - #51

Merged
cschanhniem merged 2 commits into
mainfrom
feat/proline-penalty-helix-bonus
Jun 28, 2026
Merged

cschanhniem merged 2 commits into
mainfrom
feat/proline-penalty-helix-bonus

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

  • Proline synthesis penalty: synthesis_feasibility_score now deducts −0.10 when proline_fraction > 0.15. XP junctions are prone to diketopiperazine formation during Fmoc SPPS; high-proline peptides require extended activation and show reduced coupling efficiency (Barlos 1989, Quibell 1994, Fischer 2003).
  • Helix bonus enhancement: activity_likeness_score helix_bonus weight raised from 0.01 → 0.03. Helical AMPs (LL-37, magainin, mastoparan) represent ~70% of membrane-active AMP families; this bonus now better distinguishes them from structurally disordered or beta-sheet peptides at otherwise equal composition scores (Huang 2000 Biochim Biophys Acta; Tossi 2000 Biopolymers).
  • AUROC improved 0.8138 → 0.8164 on retrospective benchmark (verified before/after the helix change).
  • Score ceiling rises from 0.95 to 0.97 (sum of all weights).

Changes

File Change
scoring/synthesis.py Proline fraction penalty −0.10 when pro > 0.15
scoring/activity.py helix_bonus weight 0.01 → 0.03, ceiling comment updated
tests/test_scoring_synthesis.py 6 new tests for proline penalty (boundary, exact value, backward compat, stacking)
tests/test_scoring_activity.py Docstring updated: max 0.03, total 0.97
Makefile Test-suite count updated to 1164

Test plan

  • 1164 tests pass (6 new proline tests, docstring updates)
  • Proline boundary at exactly 0.15 → no penalty (condition is >)
  • Missing proline_fraction key defaults to 0.0 → backward compatible
  • Proline penalty stacks correctly with other penalties
  • AUROC verified to improve with helix bonus change
  • Pre-push hook green

🤖 Generated with Claude Code

- synthesis_feasibility_score: penalise pro_fraction > 0.15 by -0.10
  (DKP formation risk at XP junctions during Fmoc SPPS; Barlos 1989,
  Quibell 1994, Fischer 2003)
- activity_likeness_score: helix_bonus weight 0.01 → 0.03; score ceiling
  rises from 0.95 to 0.97 (helical AMPs represent ~70% of membrane-active
  families; Huang 2000, Tossi 2000)
- AUROC improved 0.8138 → 0.8164 on retrospective benchmark
- Add 6 proline-penalty tests to test_scoring_synthesis.py
- Update test_scoring_activity.py docstring to reflect new helix weight
- Makefile: bump test-suite count to 1164
- Add TestHelixBonusWeight with 3 numeric tests that pin the 0.03 helix
  bonus weight: exact delta at helix_pa=1.20, half-value at pa=1.10,
  and score ceiling assertion at 0.97
- Add test_proline_stacks_with_aggregation_propensity to cover combined
  agg+pro penalty interaction
- Fix synthesis.py docstring: DKP formation is N-terminal dipeptide risk
  during piperidine deprotection, not exclusive to XP junction coupling
- Makefile: bump test count to 1168
@cschanhniem
cschanhniem merged commit 4455aac into main Jun 28, 2026
2 checks passed
@cschanhniem
cschanhniem deleted the feat/proline-penalty-helix-bonus branch June 28, 2026 08:12
cschanhniem added a commit that referenced this pull request Jun 28, 2026
- Add PR #51 to completed improvements header
- Add detailed PR #51 section: proline synthesis penalty (DKP risk)
  and helix bonus weight 0.01→0.03 with literature citations
- Update AUROC from 0.811/0.8138 → 0.8164 throughout
- MIC gate updated ~60-70% → ~61-71% to reflect AUROC improvement
- Breaking news probability updated ~27-47% → ~28-48%
- Add item 15 to "What the Pipeline Got Right"
- Update summary table, confidence calibration, roadmap gap references
- Scoring model limitation: ~-5 pp → ~-4 pp (AUROC improved)
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