From 4931be04d54f47e1e1383f0c9dc68435f9132d0b Mon Sep 17 00:00:00 2001 From: j Date: Sun, 28 Jun 2026 21:55:53 +0700 Subject: [PATCH 1/2] docs: sync pre-lab docs with 7-scaffold pool (PRs #61-76) - docs/NOMINATION_REPORT.md: add historical-record banner directing readers to current outputs/ for the post-PR #72 synthesis pool - reports/external_predict.py: document Macrel v1.6.0 ONNX model bug where log-softmax scores are compared against 0.5 (causing ALL sequences to be classified as NAMP, including canonical AMPs like magainin-2 and LL-37); recommend web server as reliable alternative and add --keep-negatives flag to CLI instructions --- docs/NOMINATION_REPORT.md | 5 +++++ .../reports/external_predict.py | 19 ++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/NOMINATION_REPORT.md b/docs/NOMINATION_REPORT.md index 662a0f9a..e1e12693 100644 --- a/docs/NOMINATION_REPORT.md +++ b/docs/NOMINATION_REPORT.md @@ -7,6 +7,11 @@ **Config hash:** 79006c5f18f594c40564f27aea947bb581a5fde73f055789cecbb535489603da **Branch:** feat/phase4-lab-bridge +> **⚠ Historical record:** This report documents the pipeline as of 2026-06-27 (5 seed families, +> 89 candidates, pre-PRs #61–76). The pipeline has since been extended to 7 scaffold families +> and 100 synthesis candidates. For the current synthesis pool see `outputs/pilot_panel.md`, +> `outputs/synthesis_readiness_report.md`, and `outputs/presynth_qc_report.md`. + --- ## Abstract diff --git a/src/openamp_foundry/reports/external_predict.py b/src/openamp_foundry/reports/external_predict.py index 38cc25f4..69aa2f97 100644 --- a/src/openamp_foundry/reports/external_predict.py +++ b/src/openamp_foundry/reports/external_predict.py @@ -59,18 +59,23 @@ ), }, { - "name": "Macrel (command-line)", + "name": "Macrel (web server preferred)", "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" + "Submit FASTA to the Macrel web server at https://macrel.big-data-biology.org/ " + "OR use the command-line: pip install macrel; " + "macrel peptides -f pilot_panel.fasta --output macrel_out/ --log-file macrel.log --keep-negatives" ), - "positive_label": "AMP", + "positive_label": "AMP (is_AMP = True in output)", "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." + "IMPORTANT — Known issue with Macrel v1.6.0 local install: the ONNX model ships " + "log-softmax scores (range [-1, 0]) rather than probabilities, but the code " + "compares against 0.5, so ALL sequences are classified as NAMP locally (including " + "canonical AMPs like magainin-2 and LL-37). Use the official Macrel web server " + "(https://macrel.big-data-biology.org/) for reliable predictions, or check the " + "installed version and verify scores are in [0, 1] before trusting local results. " + "Trained on DRAMP v2 (2019 metagenome AMPs); also reports hemolytic probability." ), }, ] From d83c4afd605cbee3de1c199efdc41167e079f621 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 28 Jun 2026 22:03:12 +0700 Subject: [PATCH 2/2] fix: correct Macrel v1.6.0 bug description and URL per review - Use package-documented URL (big-data-biology.org/software/macrel) instead of unverified subdomain - Change "range [-1, 0]" to "always <= 0; observed ~-0.8 to -0.05 on canonical AMPs" (log-softmax is bounded above by 0 but not below) - Update module docstring to match web-server-preferred stance and link to bug note --- .../reports/external_predict.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/openamp_foundry/reports/external_predict.py b/src/openamp_foundry/reports/external_predict.py index 69aa2f97..a3058777 100644 --- a/src/openamp_foundry/reports/external_predict.py +++ b/src/openamp_foundry/reports/external_predict.py @@ -14,7 +14,8 @@ - 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) + - Macrel: https://big-data-biology.org/software/macrel (web server preferred; + v1.6.0 local CLI has a known ONNX scoring bug — see tool entry below) """ from __future__ import annotations @@ -63,18 +64,19 @@ "url": "https://macrel.readthedocs.io/", "method": "Random Forest on 22 physicochemical + 8 predicted structural features; trained on DRAMP + UniProt", "input": ( - "Submit FASTA to the Macrel web server at https://macrel.big-data-biology.org/ " + "Submit FASTA to the Macrel web server at https://big-data-biology.org/software/macrel " "OR use the command-line: pip install macrel; " "macrel peptides -f pilot_panel.fasta --output macrel_out/ --log-file macrel.log --keep-negatives" ), "positive_label": "AMP (is_AMP = True in output)", "note": ( - "IMPORTANT — Known issue with Macrel v1.6.0 local install: the ONNX model ships " - "log-softmax scores (range [-1, 0]) rather than probabilities, but the code " - "compares against 0.5, so ALL sequences are classified as NAMP locally (including " - "canonical AMPs like magainin-2 and LL-37). Use the official Macrel web server " - "(https://macrel.big-data-biology.org/) for reliable predictions, or check the " - "installed version and verify scores are in [0, 1] before trusting local results. " + "IMPORTANT — Known issue with Macrel v1.6.0 local install: the ONNX model " + "outputs log-softmax scores (always ≤ 0; observed ~−0.8 to −0.05 on canonical AMPs) " + "rather than probabilities in [0, 1], but the code compares against threshold 0.5. " + "This causes ALL sequences to be classified as NAMP locally, including canonical AMPs " + "like magainin-2 and LL-37 (verified 2026-06-28). " + "Use the official Macrel web server (https://big-data-biology.org/software/macrel) " + "for reliable predictions. " "Trained on DRAMP v2 (2019 metagenome AMPs); also reports hemolytic probability." ), },