Skip to content

feat: add C-terminal amidation recommendation to presynth QC module - #36

Merged
cschanhniem merged 3 commits into
mainfrom
feat/cterminal-amidation-flag
Jun 28, 2026
Merged

cschanhniem merged 3 commits into
mainfrom
feat/cterminal-amidation-flag

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

  • c_amidation_recommended (bool) and c_amidation_reason (str) added to SynthQC dataclass and to_dict() output.
  • check_sequence() now evaluates whether C-terminal amidation would benefit the candidate and populates a C_AMIDATION_RECOMMENDED flag in the flags list.
  • 11 new tests in TestCTerminalAmidation covering all recommendation cases.

Scientific rationale

~70% of natural helical AMPs that reach clinical trials are synthesized with C-terminal amidation (CONH₂ instead of COOH). The modification:

  1. Charge: adds ~+0.5 to +1.0 net charge at pH 7.4 (replaces anionic carboxylate with neutral amide); removes the negative contribution from the C-terminal COOH
  2. Serum stability: removes carboxypeptidase cleavage site at C-terminus → extends effective half-life
  3. Membrane binding: additional positive charge enhances electrostatic attraction to negatively charged bacterial membranes
  4. Cost: zero additional cost in most SPPS workflows — simply specify "C-terminal amide" or "CONH₂" in the synthesis order form

Impact on pilot panel

Primary beneficiary: SEED-004 variants (sequence ALPFIGRVLSGIL + variants):

  • Current charge_pH7.4 ≈ 0.8 (just above LOW_CHARGE threshold)
  • C-terminus = L (leucine, neutral)
  • Post-amidation: effective charge ≈ 1.3–1.5 → above LOW_CHARGE, better membrane interaction
  • Combined with serum_stability=0.85 (best in panel), this makes SEED-004 variants even stronger candidates

Other sequences ending in G, A, L, I, V, M, F, W with charge < 3.0 also flagged.

Recommendation logic

if c_term not in (K, R) and charge_pH7.4 < 3.0:
    → c_amidation_recommended = True  (strong: cost-free, meaningful improvement)
elif c_term not in (K, R):
    → c_amidation_recommended = False  (optional: mention in reason string)

Test plan

  • pytest tests/test_presynth_qc.py — 74/74 pass
  • Full suite — 883/883 pass (pre-push hook verified)
  • SEED-004 scaffold (ALPFIGRVLSGIL) → c_amidation_recommended=True
  • K-terminus sequence → c_amidation_recommended=False
  • R-terminus sequence → c_amidation_recommended=False
  • to_dict() exposes both c_amidation_recommended and c_amidation_reason

~70% of natural helical AMPs are C-terminally amidated. Amidation adds
~+0.5–1.0 net charge, improves carboxypeptidase resistance (serum stability),
and enhances membrane binding at no synthesis cost (specify CONH₂ in order).

Logic: recommend when C-terminal residue is NOT K or R (neutral) AND
charge_pH7.4 < 3.0. The flag is informational — the synthesis vendor just
needs CONH₂ specified in the order form.

Primary beneficiary: SEED-004 variants (charge_pH7.4 ≈ 0.8, ends in L);
amidation would push them above the LOW_CHARGE threshold and improve the
Stage 3 (serum stability) outlook.

- presynth_check.py: add c_amidation_recommended (bool) + c_amidation_reason
  (str) to SynthQC dataclass; populate in check_sequence(); emit
  C_AMIDATION_RECOMMENDED flag in flags list; expose both in to_dict()
- tests/test_presynth_qc.py: 11 new tests in TestCTerminalAmidation covering
  low-charge/neutral-cterm, K/R C-term exclusions, flag presence, to_dict()
  key coverage, and empty-sequence safety
@cschanhniem
cschanhniem merged commit a1613e2 into main Jun 28, 2026
3 checks passed
@cschanhniem
cschanhniem deleted the feat/cterminal-amidation-flag branch June 28, 2026 04:57
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