Skip to content

feat(qc): detect N-terminal pyroglutamate cyclization risk (Q1 only) - #96

Merged
cschanhniem merged 1 commit into
mainfrom
feat/pyroglutamate-qc-flag
Jun 28, 2026
Merged

cschanhniem merged 1 commit into
mainfrom
feat/pyroglutamate-qc-flag

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

Adds PYROGLUTAMATE_RISK QC flag for peptides with N-terminal Glutamine (Q).

Biology: Q at position 1 spontaneously cyclises to pyroglutamic acid (pGlu) at physiological pH 7.4 (t½ hours–days at 37°C), blocking the N-terminus and causing 5–50× MIC loss. E1 is intentionally excluded — the same ring-closure requires acid catalysis (pH 2–4) and is negligible at physiological pH on any AMP assay timescale; flagging it would incorrectly elevate synthesis_difficulty.

Remediation surfaced in the flag: Nα-acetylation at zero extra synthesis cost completely blocks cyclisation; alternative is Q1 → K1/R1 substitution (adds trypsin site — only when serum stability is not gated).

Literature: Chelius et al. (2006) Anal Chem 78:2370; Goolcharran & Borchardt (1998) J Pharm Sci 87:425.

Changes

  • src/openamp_foundry/qc/presynth_check.py: new pyroglutamate_risk: bool field on SynthQC; detection logic (seq[0] == "Q"); flag in synthesis-risk block; field in to_dict(); empty-sequence guard
  • tests/test_presynth_qc.py: 7 tests in TestPyroglutamate — Q triggers, E does NOT trigger, all 18 other non-Q canonical AAs do not trigger, Q1+QG double-flag interaction (both pyroglutamate and deamidation flags emitted), flag content (pGlu / Nα-acetylation / hours–days), to_dict() field

Test plan

  • pytest tests/test_presynth_qc.py — 136/136 pass
  • Full pytest — 1311/1311 pass
  • No pilot panel candidates affected (no Q-terminal sequences in the 20-candidate panel)

🤖 Generated with Claude Code

Add PYROGLUTAMATE_RISK flag to presynth_check.py for N-terminal Q:
- Q at position 1 cyclises to pGlu at pH 7.4 (t½ hours–days at 37°C),
  blocks N-terminus, typical 5–50× MIC loss
- E1 excluded: requires acid catalysis (pH 2–4), negligible at physiological
  pH and not supported by AMP-specific quantitative data
- Remediation: Nα-acetylation (zero extra cost) or Q1 → K1/R1 substitution
  (K/R adds trypsin site; only when serum stability is not gated)
- Literature: Chelius et al. 2006 Anal Chem 78:2370;
  Goolcharran & Borchardt 1998 J Pharm Sci 87:425

Guard against empty-sequence edge case (len > 0 before seq[0] access).
Add pyroglutamate_risk to SequenceQC.to_dict() output.
7 tests: Q triggers, E does not, all other 18 non-Q AAs do not, Q+QG
double-flag interaction, flag content (pGlu, Nα-acetylation, hours–days),
to_dict() field present.
@cschanhniem
cschanhniem merged commit 1fa668b into main Jun 28, 2026
1 of 2 checks passed
@cschanhniem
cschanhniem deleted the feat/pyroglutamate-qc-flag branch June 28, 2026 18:44
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