Skip to content

feat: add Chou-Fasman helix propensity scoring (Pα) to feature pipeline - #35

Merged
cschanhniem merged 2 commits into
mainfrom
feat/helix-propensity
Jun 28, 2026
Merged

cschanhniem merged 2 commits into
mainfrom
feat/helix-propensity

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

  • helix_propensity_score() — new function in physchem.py computing the mean Chou-Fasman Pα (alpha-helix propensity) across all residues. Uses published values from Chou & Fasman (1974) Biochemistry 13:222-245. Pα > 1.0 = helix-forming, < 0.75 = helix-breaking.
  • compute_features() exposes new key helix_propensity (float) for all sequences.
  • activity_likeness_score() gains a helix_bonus (max +0.01) for helix-forming sequences; amphipathicity weight reduced 0.15→0.14 to maintain score ceiling below 1.0.
  • 23 new tests covering individual residue Pα values, poly-sequences, known helical AMP vs proline-rich sequence comparison, and scoring fallback.

Scientific rationale

All 5 pilot panel seed families are membrane-active helical AMPs (magainin, LL-37 fragment, cecropin, temporin family). Their mechanism requires alpha-helix formation at the membrane interface. The existing hydrophobic_moment feature captures amphipathic helix arrangement but not helix propensity — a sequence can have high hydrophobic moment while being intrinsically disordered. Chou-Fasman Pα adds an orthogonal signal: does this sequence want to form a helix?

Key discriminators:

  • Proline (Pα = 0.57): canonical helix breaker; proline-rich sequences (apidaecin, pyrrhocoricin) have intracellular targets, not membrane disruption
  • Alanine (1.42), Met (1.45), Glu (1.51): helix-forming residues common in cecropin/magainin
  • Bonus weight is intentionally small (+0.01 max) to preserve monotonic rank order

Test plan

  • pytest tests/test_helix_propensity.py — 23/23 pass
  • Full suite — 895/895 pass (pre-push hook verified)
  • helix_propensity_score("AAAAAAAAAA") == 1.42 (poly-Ala = pure helix-former)
  • helix_propensity_score("GNRPVYIPQPRPPHPR") < 1.0 (apidaecin, Pro-rich)
  • helix_propensity_score("KWKLFKKIGAVLKVL") > 1.0 (magainin analog, helical AMP)
  • Activity score fallback: feature dicts lacking helix_propensity default to 1.0 (indifferent)

Add helix_propensity_score() using Chou-Fasman (1974) Pα parameters. The
mean Pα across all residues quantifies helical-forming tendency: >1.03 is
helix-forming, <0.75 is helix-breaking (Pro=0.57, Gly=0.57). All 5 pilot
panel seed families rely on helical amphipathicity for membrane disruption,
so this feature adds discriminative signal against proline-rich or random
sequence backgrounds.

- physchem.py: _HELIX_PROPENSITY table + helix_propensity_score(); exposes
  helix_propensity key in compute_features() return dict
- activity.py: helix_bonus (max +0.01) added; amphipathicity weight reduced
  0.15→0.14 to maintain score ceiling below 1.0
- tests/test_helix_propensity.py: 23 tests (Pα values, helix vs proline-rich
  sequences, compute_features integration, activity score fallback)
- tests/test_scoring_activity.py: update hardcoded weight assertion 0.075→0.07
- docs/DISCOVERY_PREDICTION.md: mark PR #34 done, add item 5 for Chou-Fasman
@cschanhniem
cschanhniem merged commit 1f5ed87 into main Jun 28, 2026
3 checks passed
@cschanhniem
cschanhniem deleted the feat/helix-propensity branch June 28, 2026 04:59
cschanhniem added a commit that referenced this pull request Jun 28, 2026
Combined helix propensity (PR #35) with cross-term (PR #39):
- activity.py: amphipathicity weight 0.14, adds helix_bonus + cross_bonus
- test_scoring_activity.py: update expected diffs to reflect 0.14 weight
  (test_mu_h_0_4_half_bonus: 0.074, cross term comments updated)
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