Skip to content

feat: complete synthesis risk detection — QG deamidation, DG/DS isomerization, Trp photolability (#44) - #44

Merged
cschanhniem merged 2 commits into
mainfrom
feat/qc-synthesis-risk-completeness
Jun 28, 2026
Merged

cschanhniem merged 2 commits into
mainfrom
feat/qc-synthesis-risk-completeness

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

Closes three synthesis risk detection gaps found in a best-practice audit of the presynth QC module:

1. QG/QS Glutamine deamidation hotspots (previously missed)

The existing regex only caught N[GS] (Asn deamidation). Glutamine (Q) undergoes the same succinimide-mediated deamidation → glutamate via Q[GS] motifs, documented by Geiger & Clarke (1987) J Biol Chem. Updated _DEAMIDATION_RE from N[GS] to [NQ][GS]. Affects variants with Q substitutions from SEED-001/003/006 families.

2. DG/DS Aspartate isomerization hotspots (new isomerization_sites field)

D[GS] motifs form β-aspartyl peptides via succinimide intermediate (Tyler-Cross & Schirch 1991). These rearrangements change backbone geometry and can eliminate antimicrobial activity. New isomerization_sites: list[str] field + ISOMERIZATION_RISK flag with HPLC verification guidance.

3. Trp photolability flag for SEED-008 family (new trp_photolability_risk field)

SEED-008 (puroindoline-a: FPVTWRWWKWWKG) and its variants carry 3–5 Trp residues. Trp photooxidizes to kynurenine under standard lab fluorescent lighting (Agon et al. 2006 Anal Biochem). Peptides with ≥3 Trp lose >20% activity within 4h under normal conditions. New trp_photolability_risk: bool field + TRP_PHOTOLABILITY flag with storage protocol: amber vials, dim light, 2h assay window.

Key design choice: Both TRP_PHOTOLABILITY and N_ACETYLATION_RECOMMENDED are appended after synthesis_difficulty is set — they are storage/guidance flags, not synthesis complexity flags.

WET_LAB_HANDOFF.md updated

New table rows for DEAMIDATION_RISK (expanded), ISOMERIZATION_RISK, and TRP_PHOTOLABILITY with specific lab action guidance.

Test plan

  • 24 new tests (8 per category): TestDeamidationCompleteness, TestAspartateIsomerization, TestTrpPhotolability
  • All 982 tests pass
  • Verify: python -m pytest tests/test_presynth_qc.py -v

@cschanhniem
cschanhniem merged commit b58bb05 into main Jun 28, 2026
3 checks passed
@cschanhniem
cschanhniem deleted the feat/qc-synthesis-risk-completeness branch June 28, 2026 06:02
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