Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions docs/DISCOVERY_PREDICTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,18 +285,22 @@ Basis:
- SEED-006 (Mastoparan-X derivatives): known mast-cell-degranulating risk at high concentration
(not necessarily hemolytic); monitor at 4×MIC

**Selectivity proxy coverage of current 8 seeds:**

| Seed | sel_proxy | cytotox_risk | Notes |
|------|-----------|--------------|-------|
| SEED-001 | 0.968 | No | Optimal charge+hydro window |
| SEED-002 | 1.000 | No | Most selective profile |
| SEED-003 | 1.000 | No | Neg GRAVY, good charge |
| SEED-004 | 0.300 | **Yes** | Low charge + high GRAVY |
| SEED-005 | 1.000 | No | Moderate GRAVY, good charge |
| SEED-006 | 0.977 | No | Just above GRAVY threshold |
| SEED-007 | 1.000 | No | Optimal window |
| SEED-008 | 1.000 | No | Neg GRAVY (Trp-dominant) |
**Selectivity proxy and mechanism coverage — all 10 seeds:**

| Seed | sel_proxy | cytotox_risk | Mechanism class | Notes |
|------|-----------|--------------|-----------------|-------|
| SEED-001 | 0.968 | No | Helical membrane-disruption (carpet) | Optimal charge+hydro window |
| SEED-002 | 1.000 | No | Helical membrane-disruption (pore) | Most selective profile |
| SEED-003 | 1.000 | No | Cationic Trp-mediated disruption | Neg GRAVY, good charge |
| SEED-004 | 0.300 | **Yes** | Short hydrophobic helix (depol.) | Low charge + high GRAVY — HIGH_CYTOTOX_RISK |
| SEED-005 | 1.000 | No | Cecropin-magainin hybrid (dual) | Moderate GRAVY, good charge |
| SEED-006 | 0.977 | No | Wasp venom, hydrophobic helix insertion | Just above GRAVY threshold |
| SEED-007 | 1.000 | No | Bee venom, non-helical | Optimal window |
| SEED-008 | 1.000 | No | Trp-mediated lipid intercalation | Neg GRAVY (Trp-dominant); plant origin |
| SEED-009 | 1.000 | No | **Proline-rich intracellular (DnaK)** | GRAVY −1.64; Pro=42%; distinct from all above |
| SEED-010 | 1.000 | No | Helical amphipathic (human LL-37 frag.) | GRAVY −0.71; μH=0.947; clinical relevance |

**Mechanism diversity summary:** 10 seeds cover 7 distinct mechanistic classes: (1) carpet/pore-forming helical, (2) cationic Trp-mediated, (3) short hydrophobic helix, (4) hybrid cecropin-magainin, (5) wasp venom helix-insertion, (6) Trp lipid intercalation, (7) proline-rich intracellular. This is the most mechanistically diverse scaffold set achievable without synthetic lipopeptides or cyclic peptides.

Known bias: safety scorer penalizes μH and cysteine but cannot predict cell-type-specific lysis.
Selectivity proxy is a population-level heuristic, not a prediction for any specific cell line.
Expand Down
176 changes: 176 additions & 0 deletions docs/WAVE2_PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# Wave 2 Active-Learning Plan

**Version:** 1.0
**Date:** 2026-06-28
**Status:** Pre-registered strategy — locked before Wave 1 assay results are analysed

---

## Purpose

This document pre-specifies the Wave 2 strategy for each possible Wave 1 outcome. Pre-specifying
Wave 2 before seeing Wave 1 results prevents outcome-dependent strategy changes that would
invalidate the iterative learning loop.

> **Mandatory:** Read Wave 1 results BEFORE opening this document further than the decision tree
> below. Do not change any Wave 2 parameters based on Wave 1 outcomes that are not in scope here.

---

## Wave 1 → Wave 2 Decision Tree

### Scenario A: 0 hits (all MIC > 128 µg/mL across all organisms)

**Interpretation:** Either the scoring model is miscalibrated for this peptide series, or the
target organisms are resistant to all scaffold families tested.

**Wave 2 actions:**
1. Run `make validate-scoring` on a dataset that includes Wave 1 inactive candidates as negatives
→ AUROC drop > 0.05 indicates the scoring model needs recalibration
2. Add D-amino acid variants of the 3 highest-scoring Wave 1 candidates (scaffold rescue attempt)
3. Add 2 new seed families from outside the current 10 — prioritise:
- β-sheet forming scaffold (protegrin-type, without Cys): e.g. VDKPPYLPRPRPPHPRI
- Arginine-rich non-amphipathic scaffold: e.g. RRIRPRPPRLPRPRPRR
4. Publish negative result with full pipeline transparency

**Do NOT:** Synthethise additional variants from the same 10 seed families without mechanistic
rationale. Correlation between near-seed variants means new variants from the same seeds add
minimal new information.

---

### Scenario B: ≥1 active (MIC ≤ 32 µg/mL) but 0 selective (all TI < 5)

**Interpretation:** The pipeline has identified biologically active scaffolds but they are too
toxic for mammalian cells. This is a selectivity problem, not an activity problem.

**Wave 2 strategy: selectivity improvement**

For each active-but-toxic candidate:

| Modification | Goal | How |
|-------------|------|-----|
| C-terminal truncation (−2 to −4 residues) | Reduce hydrophobic tail | Resynthesise truncated variant |
| Hydrophobic → polar substitution (L→S, F→Y) at C-terminus | Reduce amphipathicity | Generator: conservative substitution |
| D-amino acid at critical Trp/Phe position | Reduce membrane affinity | Manual design |
| Introduce Gly/Pro helix-breaker | Disrupt continuous hydrophobic face | Generator: Gly-insertion |

Run modified variants through `make score` and filter by:
- selectivity_proxy > 0.60 (stricter than 0.50)
- safety_score > 0.65
- activity_score > 0.60

Target: 10 selectivity-improved variants from the 3 most active Wave 1 scaffolds.

---

### Scenario C: ≥1 hit (MIC ≤ 32 µg/mL AND TI ≥ 10) — primary success case

**Interpretation:** The pipeline has identified at least one therapeutically relevant AMP candidate.

**Wave 2 strategy: hit confirmation + serum stability**

#### C1 — Hit confirmation (priority 1)

Re-test all confirmed hits (Scenario C candidates) in at least one additional lab for
independent replication. Required for publication and to rule out assay artefacts.

**Target MIC for "breaking news" classification:**

| MIC range | Classification |
|-----------|---------------|
| ≤ 4 µg/mL | Outstanding — major publication target |
| 4–16 µg/mL | Strong — publishable with selectivity evidence |
| 16–32 µg/mL | Moderate — publishable if spectrum is broad or scaffold is genuinely novel |

#### C2 — D-amino acid variants (priority 2)

For each Scenario C hit, generate D-amino acid variants at proteolytic sites (machine-readable
guidance in synthesis_checklist.md):

- D-Lys at each trypsin K site
- D-Arg at each trypsin R site
- D-Trp at first tryptophan if present (chymotrypsin site)

Expected serum stability gain: 3–10× (from t½ ~0.5 h → ~2–5 h).

Run D-variants through `make score`. Expected activity retention: 60–80% of parent activity
(some loss from reduced amphipathicity is acceptable if stability is gained).

#### C3 — MDR strain panel (priority 3)

Test confirmed hits against:

| Organism | Strain | Rationale |
|----------|--------|-----------|
| MRSA | USA300 (ATCC BAA-1556) | Most clinically relevant community-acquired MRSA strain |
| K. pneumoniae NDM-1 | ATCC BAA-2146 | NDM-1 carbapenemase-producing; carbapenem-resistant (not merely ESBL) |
| A. baumannii MDR | ATCC BAA-1710 | Clinical MDR isolate from ESKAPE panel; multi-drug resistant |

> **Note:** ATCC 19606 is A. baumannii's susceptible reference strain — do NOT use it for MDR
> testing. ATCC BAA-1710 is the correct clinical MDR representative.

Expected activity: AMPs from the current scaffold classes are typically more active against
MRSA than Gram-negative MDR strains. SEED-009 (Bac2A, proline-rich) may have better
Gram-negative activity than the membrane-disrupting seeds.

#### C4 — Mechanism confirmation (priority 4, for top 1–2 hits only)

If budget permits, run one mechanistic assay:
- **Membrane potential assay** (DiSC3 dye): distinguishes pore-forming from carpet mechanism
- **DNA/RNA binding assay**: confirms intracellular target for SEED-009 variants
- **Electron microscopy**: gold standard for membrane disruption confirmation

---

## Wave 2 Candidate Generation

To generate Wave 2 candidates from Wave 1 hits, run:

```bash
# Replace SEED-00X_VAR_NNN with the actual Wave 1 hit IDs
make generate SEED_OVERRIDE=SEED-00X_VAR_NNN

# Score and filter
make score
make pilot
```

For D-amino acid variant generation, the synthesis_checklist.md generated by `make synthesis-order`
already contains D-amino substitution instructions per candidate. Convert these to new seed
sequences manually and re-run the pipeline.

---

## Wave 2 Resource Budget (pre-registered)

| Scenario | Wave 2 candidates | Target cost |
|----------|-----------------|------------|
| A (all inactive) | 10–12 (new scaffold variants) | ~$2,000–3,000 synthesis |
| B (active, toxic) | 10 (selectivity-improved) | ~$2,000 synthesis |
| C (confirmed hits) | 5–10 D-amino + 3–5 MDR tests | ~$3,000–5,000 synthesis + assay |

---

## Learning Loop — What Wave 1 Teaches Us

Regardless of Wave 1 outcome, extract these pipeline calibration signals:

| Signal | How to extract | What to update |
|--------|---------------|----------------|
| Per-seed hit rate | Count hits per seed family | Seed prior probability in DISCOVERY_PREDICTION.md |
| Score correlation with MIC | Pearson r(ensemble_score, 1/MIC) | Pipeline AUROC calibration note |
| Synthesis failures | Count by flagged risk | Synthesis feasibility scoring thresholds |
| Selectivity proxy accuracy | Compare proxy < 0.5 to observed TI < 5 | Selectivity proxy weight in pilot_priority |
| AUPRC on expanded dataset | Add Wave 1 inactive as negatives | METHODS.md benchmark section |

Archive these signals in `outputs/wave1_learning.md` within 4 weeks of receiving all results.

---

## References

- Zasloff M (2002) Antimicrobial peptides of multicellular organisms. Nature 415:389–395
- Melo MN et al. (2009) Antimicrobial peptides: linking partition, activity and high membrane-bound concentrations. Nat Rev Microbiol 7:245–250
- Guinas ML et al. (2019) Cecropin A–melittin hybrid peptides: A review on their ability to destabilize biological membranes. Curr Protein Pept Sci 20:860–870
- Chung PY et al. (2017) Proline-rich antimicrobial peptides. Mini Rev Med Chem 17:1484–1494
52 changes: 52 additions & 0 deletions docs/WET_LAB_HANDOFF.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,58 @@ If fewer than 10 candidates are nominated from a batch:

---

---

## Negative Result Reporting Protocol

**All results — active and inactive — must be reported.** Selective reporting of only positive
results invalidates the pipeline's active-learning loop and creates publication bias.

### For each inactive candidate

Record the result using the schema at `schemas/lab_result.schema.json` with:

```json
{
"result_qualitative": "inactive",
"result_value": 128.0,
"result_unit": "µg/mL",
"assay_type": "MIC",
"notes": "No growth inhibition at 128 µg/mL (top concentration tested). MIC > 128 µg/mL."
}
```

> `result_value` records the **highest concentration tested with no activity** (not `null`).
> This preserves the numerical upper bound, which is required for the active-learning loop.

### What to record for inactive candidates

| Field | Value |
|-------|-------|
| `result_qualitative` | `"inactive"` |
| `result_value` | Highest concentration tested with no activity (e.g. 128.0) |
| `result_unit` | `"µg/mL"` |
| `assay_date` | Date of the assay |
| `positive_control_passed` | Must be `true` — if false, the assay is invalid |
| `notes` | e.g. `"No activity at 128 µg/mL (top concentration). Possible hydrophobic aggregation."` |

### Diagnostic questions for inactive candidates

1. **Is μH > 0.55 and selectivity_proxy < 0.5?** → Likely hemolytic, not inactive
2. **Is synthesis_feasibility < 0.7?** → Possible synthesis failure; request HPLC purity certificate
3. **Is the seed family entirely inactive?** → Scaffold-level failure; report as family-level negative
4. **Did external predictors (CAMPR4, AMPScanner) agree it was AMP?** → Scoring model error; update reference dataset
5. **Was the peptide stored correctly?** → Check freeze-thaw cycles, solubility in MHB

### Archiving

Negative results are archived in `outputs/negative_results/` as individual JSON files named
`<candidate_id>_<assay_date>_negative.json`. The lab_result schema hash links back to the
evidence certificate that nominated the candidate. This creates a full traceability chain
for the eventual publication or open data release.

---

## Confidence Statement

All scores are **heuristic proxies** derived from physicochemical features. They have not been
Expand Down
52 changes: 43 additions & 9 deletions src/openamp_foundry/reports/external_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- CAMPR4: http://www.camp3.bicnirrh.res.in/predict.php
- AMPScanner v2: https://www.dveltri.com/ascan/v2/ascan.html
- dbAMP 2.0: https://awi.cuhk.edu.cn/dbAMP/predict.php
- AntiCP 2.0: https://webs.iiitd.edu.in/raghava/anticp2/
- Macrel: https://macrel.readthedocs.io/ (command-line, pip install macrel)
"""
from __future__ import annotations

Expand Down Expand Up @@ -43,6 +45,34 @@
"positive_label": "AMP",
"note": "Also reports predicted activity spectrum (antibacterial/antifungal/etc.).",
},
{
"name": "AntiCP 2.0",
"url": "https://webs.iiitd.edu.in/raghava/anticp2/",
"method": "SVM trained on anticancer peptides (ACPs); Raghava lab (IIIT Delhi)",
"input": "Select 'Predict' tab, paste sequences one per line (not FASTA), click 'Predict'",
"positive_label": "ACP (anticancer peptide — NOT AMP-specific)",
"note": (
"IMPORTANT: AntiCP 2.0 predicts anticancer peptides (ACPs), not antimicrobial "
"peptides directly. ACP and AMP activity correlate because both classes disrupt "
"negatively-charged membranes, but a positive call here means 'ACP-like', not "
"'confirmed AMP'. Count as indirect supporting evidence only. Use 'Default' model."
),
},
{
"name": "Macrel (command-line)",
"url": "https://macrel.readthedocs.io/",
"method": "Random Forest on 22 physicochemical + 8 predicted structural features; trained on DRAMP + UniProt",
"input": (
"pip install macrel; "
"macrel peptides -f pilot_panel.fasta --output macrel_out/ --log-file macrel.log"
),
"positive_label": "AMP",
"note": (
"Command-line tool — requires Python ≥ 3.7 and pip install. "
"Trained on DRAMP v2 (2019 version); reports AMP probability + hemolytic probability. "
"The hemolytic probability provides an independent selectivity estimate."
),
},
]


Expand Down Expand Up @@ -102,16 +132,16 @@ def write_external_predict_checklist(
lines += [
"## Step 2 — Record results",
"",
"Fill in the table below after running all three tools. Mark each cell Y/N.",
"Fill in the table below after running all five tools. Mark each cell Y/N.",
"",
"| Rank | ID | Sequence | CAMPR4 | AMPScanner v2 | dbAMP | Tools Agree (≥2/3) |",
"|--:|---|---|:---:|:---:|:---:|:---:|",
"| Rank | ID | Sequence | CAMPR4 | AMPScanner | dbAMP | AntiCP2 | Macrel | Tools Agree (≥3/5) |",
"|--:|---|---|:---:|:---:|:---:|:---:|:---:|:---:|",
]
for c in panel:
r = c.get("pilot_rank", "?")
cid = c.get("candidate_id", "?")
seq = c.get("sequence", "?")
lines.append(f"| {r} | {cid} | `{seq}` | ? | ? | ? | ? |")
lines.append(f"| {r} | {cid} | `{seq}` | ? | ? | ? | ? | ? | ? |")

lines += [
"",
Expand All @@ -130,20 +160,24 @@ def write_external_predict_checklist(
"",
"| Outcome | Action |",
"|---|---|",
"| ≥12 candidates have Tools Agree = Y | Proceed to synthesis with confident panel |",
"| ≥12 candidates have Tools Agree = Y (≥3/5) | Proceed to synthesis with confident panel |",
"| 6–11 candidates have Tools Agree = Y | Synthesise only agreed candidates (wave 1) |",
"| < 6 candidates have Tools Agree = Y | STOP — scoring model may not be reliable; revisit |",
"",
"## Why this matters",
"",
"Our internal scorer (physicochemical heuristics + Boman index) disagreed with itself",
"(mean |activity − boman_activity| = 0.31). Three independent published tools provide",
"external calibration. If 2/3 external tools agree with our nomination, confidence rises",
"substantially. If they disagree, it is cheaper to find out now (free) than at synthesis ($500+).",
"(mean |activity − boman_activity| = 0.31). Five independent published tools from different",
"ML paradigms (SVM ensemble, LSTM, Random Forest ×3) provide external calibration.",
"If ≥3/5 external tools agree, confidence rises substantially. If they disagree, it is",
"cheaper to find out now (free) than at synthesis ($500+ per peptide).",
"",
"Macrel additionally reports a **hemolytic probability** — an independent selectivity estimate.",
"Flag any candidate with Macrel hemolytic probability > 0.5 for extra HC50 scrutiny.",
"",
"## Disclaimer",
"",
"External tool predictions are also computational — not wet-lab evidence. Even with 3/3",
"External tool predictions are also computational — not wet-lab evidence. Even with 5/5",
"tool agreement, the expected in-vitro hit rate is 20–60%. Human expert review and",
"institutional biosafety sign-off remain mandatory before synthesis.",
]
Expand Down
Loading