Skip to content

feat: synthesis-order CLI — vendor-ready order CSV + checklist - #45

Merged
cschanhniem merged 1 commit into
mainfrom
feat/synthesis-order-generator
Jun 28, 2026
Merged

cschanhniem merged 1 commit into
mainfrom
feat/synthesis-order-generator

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

  • New CLI subcommand synthesis-order (make synthesis-order)
  • New module src/openamp_foundry/qc/order_generator.py
  • 54 new tests; 1036 total passing

What it does

Reads a confident panel CSV, runs pre-synthesis QC on every candidate, and outputs two files:

  1. synthesis_order.csv — GenScript-compatible order form with:

    • pilot_rank, candidate_id, sequence, length, mol_weight_da
    • n_modification — Ac- when interior trypsin sites exist (N-terminal acetylation), Free otherwise
    • c_modification — NH2 when c_amidation_recommended, OH otherwise
    • purity_spec — always >95% HPLC
    • quantity_mg — 2× for HIGH-difficulty, default (5 mg) for LOW/MODERATE
    • synthesis_difficulty, special_handling (condensed, vendor-readable notes)
  2. synthesis_checklist.md — human-facing per-candidate brief with:

    • Order summary table (total mg, n Ac-, n NH2, difficulty counts)
    • Pre-order checklist (CoA requirements, Cys/Trp handling, vendor discussion)
    • Per-candidate N-Ac and C-amide rationale
    • Wave 2 D-amino substitution guide

Downstream changes

  • cli.py: added synthesis-order subparser + _run_synthesis_order() handler with file-not-found guard
  • Makefile: added synthesis-order target (depends on confident_panel.csv)

Test plan

  • 54 unit tests in tests/test_order_generator.py
    • _extract_handling flag-to-note mapping (11 tests)
    • Order row structure, N/C modification logic, quantity logic, special handling
    • write_order_csv — creates files, roundtrip, parent dir creation
    • write_synthesis_checklist — content checks, disclaimer, Wave 2 section
    • CLI integration tests — missing-file returns rc=1, outputs created, HIGH 2× qty
    • End-to-end: realistic 4-candidate mixed panel
  • python3 -m pytest tests/ -q → 1036 passed

🤖 Generated with Claude Code

…om panel QC

Adds synthesis-order subcommand and qc/order_generator.py module.

Reads a panel CSV, runs presynth QC on every candidate, auto-fills
N-terminal modification (Ac- when trypsin sites present), C-terminal
modification (NH2 when c_amidation_recommended), purity spec (>95%
HPLC), quantity (2× for HIGH-difficulty peptides), and condensed
special-handling notes. Outputs synthesis_order.csv (GenScript-
compatible) and synthesis_checklist.md (human-facing pre-order brief
with per-candidate handling notes and Wave 2 D-amino guide).

54 new tests; 1036 total passing.
@cschanhniem
cschanhniem merged commit 25fde67 into main Jun 28, 2026
1 of 2 checks passed
@cschanhniem
cschanhniem deleted the feat/synthesis-order-generator branch June 28, 2026 06:22
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