Skip to content

Add literature-backed SduA protein example to Shedu system - #1802

Merged
realmarcin merged 5 commits into
mainfrom
duf-protein-examples
Oct 11, 2026
Merged

realmarcin merged 5 commits into
mainfrom
duf-protein-examples

Conversation

@realmarcin

@realmarcin realmarcin commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1804, fixes #1805, fixes #1808, fixes #1809, fixes #1810, fixes #1811, fixes #1812, fixes #1813, fixes #1818.

What this adds

One protein example, on one record.

data/traits/genomics/shedu_system.yaml (traitmech:000220) gains a
GENE_OR_PROTEIN causal node, sdua_immune_nuclease, carrying
UniProtKB:B7HFR2 (Shedu protein SduA, Bacillus cereus B4264,
NCBITaxon:405532) as a taxon-paired protein_examples entry, plus one
contributes to (RO:0002326) edge into the existing
shedu_nuclease_activation node. mapping_status stays PROPOSED;
scope_status stays NONMECHANISTIC; definition, hierarchy, synonyms,
canonical example and existing evidence are untouched.

The node is grounding_status: REVIEWED_LABEL_ONLY with notes: InterPro has
only domain-level entries for this single-protein system — IPR025359
(SduA C-terminal, Pfam PF14082 SduA_C, formerly DUF4263) and IPR048396
(SduA N-terminal, Pfam PF21407) — and no GO, NCBIfam or Complex Portal term
names the protein family, so grounding the whole-protein node to one of its
domains would be the domain trap docs/GROUNDING_POLICY.md §2 forbids.

Evidence per protein

Added — SduA, UniProtKB:B7HFR2

  • UniProt checks (live REST, anonymous, no contact address in the request,
    2026-10-08 UTC): current primary accession B7HFR2, no secondary
    accessions, reviewed (Swiss-Prot), entry name SDUA_BACC4, protein name
    "Shedu protein SduA", gene sduA, organism Bacillus cereus (strain B4264)
    = taxon 405532, entry version 58, sequence version 1. Pfam
    cross-references PF14082 (SduA_C, the former DUF4263) and PF21407.
    just audit-uniprot resolves the new row with an empty finding (every
    column YES).
  • Primary reference: Gu et al. 2024, Mol Cell —
    DOI:10.1016/j.molcel.2024.12.004, PMID:39742666.
  • Why this reference is about this accession: PDBe maps that paper's
    cryo-EM entries 8TI8, 8TI9 and 8TIA to UniProtKB:B7HFR2
    (Bacillus cereus B4264), and the PDBe citation for 8TI8 is that DOI/PMID.
    So the structurally characterised protein is this entry, not a same-species
    homolog.
  • Snippets (contiguous, no ellipsis, verified verbatim as substrings of the
    Europe PMC abstract of PMID:39742666):
    • "we reveal the structural basis for activation of Bacillus cereus Shedu"
    • "Two cryoelectron microscopy structures of Shedu show that it switches
      between inactive and active states through conformational changes affecting
      active-site architecture, which are controlled by the protein's N-terminal
      domain (NTD)"
  • Scope of the role statement: confined to the tested protein — SduA is the
    single protein of this Shedu system and carries the nuclease core whose
    active site its own N-terminal domain switches between states. The paper's
    survey of 79 N-terminal-domain types is about homologs and is not asserted of
    this accession.

Skipped — Cap4, UniProtKB:C0VHC9

Two independent reasons, either of which is sufficient.

  1. The biology does not match any of the candidate records. UniProt
    describes C0VHC9 as the effector DNase of a CBASS system: activated by
    a cyclic trinucleotide made by CdnD, its ligand binding in a C-terminal
    SAVED domain, with the Lowey et al. 2020 PDB entries 6VM6/6WAM titled
    "Acinetobacter baumannii Cap4 SAVED/CARF-domain containing receptor". That is
    not gao_her_duf_system.yaml / gao_her_system.yaml, which DefenseFinder
    models as a two-profile Gao_Her_DUF__DUF4297 + Gao_Her_DUF__HerA_DUF
    locus from Gao et al. 2020, and it is not
    lamassu_cap4_nuclease_system.yaml, which is a Lamassu-Fam subtype with an
    SMC-like LmuB sensor and an LmuA effector — that record's own open discussion
    already flags the relationship between the DefenseFinder _II row and
    characterised Cap4 branches as unresolved. Shared Pfam membership
    (PF14130, formerly DUF4297) is domain homology, not system identity, and
    the repository's grounding policy is explicit that a family/domain match is
    not an instance claim. The record whose biology does match is
    cbass_system.yaml, which was not among the requested targets.
  2. No Europe PMC-verifiable primary snippet for this protein. Its primary
    source, Lowey et al. 2020 (DOI:10.1016/j.cell.2020.05.019,
    PMID:32544385), is not open access: Europe PMC serves only the abstract,
    and that abstract names Enterobacter cloacae Cap4, not the Acinetobacter
    protein. The only abstract-level sentences about AbCap4 are in a later
    paper (PMID:36796558) restating Lowey et al., which is a secondary
    description rather than primary evidence for this protein's role.

Skipped — DruA, UniProtKB:P0DW34

UniProt verification passes (current reviewed primary accession, DRUA_ECOU4,
Escherichia coli UMEA 4076-1 = taxon 1281278, entry version 8, sequence
version 1, Pfam PF14236), but no primary snippet establishing DruA's own
role is verifiable. Its only functional reference is Doron et al. 2018
(DOI:10.1126/science.aar4120, PMID:29371424), which is not open access in
Europe PMC; its abstract does not mention Druantia, DruA or UMEA 4076-1 at all.
A Europe PMC search for other Druantia primary work returns type-III/DruE
studies, nothing on DruA. druantia_type_i_system.yaml already records the
same limit from the other direction: Doron's type-I component is optional
("In some cases Type I systems are preceded by a gene annotated as DUF4338"),
the per-gene deletion set does not establish DruA dependence, and its open
discussion says no protein example is added without component-resolved
functional evidence. Adding P0DW34 would have been a UniProt record standing
in for evidence, which the grounding policy forbids.

pd_t4_8_system.yaml was not touched: PD-T4-8 is a separate DefenseFinder
system, not the SduA-centred Shedu record.

How it was written

scripts/add_shedu_sdua_protein_example.py — scoped to one target, asserts
traitmech:000220 and the shedu_dna_end_nicking graph, dry-run by default
with --apply opt-in, appends the per-record event through
record_curation_event (curator: claude, llm_assisted: true) and writes
through write_validated_trait. Append-only history record:
history/records/shedu_system/2026-10-08T025652Z-claude-code-39f650.yaml.
Derived artifacts were regenerated, never hand-edited:
reports/graph_protein_taxon_coverage.tsv,
reports/node_grounding_residual.tsv, pages/traits/genomics/shedu_system.html.

Gates run

Gate Result
just validate-strict data/traits/genomics/shedu_system.yaml 1 file, 0 errors
just validate-history <new record> and just validate-history 0 invalid (1 and 1158 records)
just validate-products all id/label pairs correspond
just audit-writers new writer row: curation history yes, safeguard yes, validated write yes
just audit-graph-protein-taxa (--fail-on gaps) 718 graphs; 128 pass, 589 nonmechanistic, 0 gap, 1 protected, 0 error
just audit-snippets 2419 findings, all baselined, 0 new, 0 blocking
just verify-snippets --record data/traits/genomics/shedu_system.yaml --fail-on paraphrase 17 snippets over 2 references, 17 VERIFIED, 0 paraphrase
just audit-uniprot (live) report regenerated and committed; exactly 3 rows change (see below). The recipe still exits 1 on the 110 pre-existing ENTRY_VERSION_MISMATCH rows tracked in #1806, but it writes a current report, which is why leaving the file at HEAD was wrong
just qc exit 0 (includes audit-graphs, audit-predicate-domains, audit-derived-reports, audit-proposals, pages freshness)
just gen-pages regenerated; audit-derived-reports reports OK pages/
git diff --check clean

Adversarial self-review (applied before review)

Reviewing the diff as a separate pass caught two overclaims, both fixed in this
branch rather than left in the record:

  • The example's role said SduA "carries the PD-(D/E)XK-type nuclease core".
    That domain naming comes from Loeff et al. on the E. coli KTE10 SduA, not
    from the Gu et al. evidence attached here, so the role now says only what the
    cited snippets support.
  • grounding_notes asserted a flat negative ("no GO, NCBIfam or Complex Portal
    term names this protein family"). It now states the bounded search that was
    actually run: an all-member-database InterPro search and an OLS4 GO search for
    "Shedu" on 2026-10-08 UTC returned only PF14082/PF21407 and their InterPro
    integrations.

Two further facts were verified live rather than taken from the lead:

  • PF14082's former name: InterPro's name history for that Pfam entry is
    DUF4263 then SduA_C, so the "former DUF" premise holds for this family.
  • NCBITaxon:405532 resolves independently at NCBI Datasets to
    "Bacillus cereus B4264", rank STRAIN.

Open questions

  • Whether a Cap4 example belongs on cbass_system.yaml is left for a separate
    decision: that record was not in scope here, and the snippet problem in
    reason 2 above would still have to be solved, most likely from the paper's
    full text rather than from Europe PMC.
  • audit-uniprot's 110 pre-existing entry-version mismatches are a corpus-wide
    refresh question, not something this change should silently absorb.

Second review round (#1808-#1813)

An independent review of the first commit found the PR sound and raised six
in-PR fixes, all applied in 86cff70c77:

The record was rebuilt from the origin/main base through
scripts/add_shedu_sdua_protein_example.py --apply, so the committed YAML is
still exactly what the script produces. Every gate in the table above was re-run
after the fixes: just qc exits 0, verify-snippets reports 17/17 VERIFIED,
audit-graph-protein-taxa reports 0 gaps, audit-snippets 0 new findings.

Merge with main

#1801 and #1803 landed while this branch was open, which conflicted on 13
pages/ files exactly as docs/CURATION_PLAYBOOK.md predicts. Resolved by
regeneration (just gen-pages plus every derived-report generator), not by
picking a side; audit-derived-reports then reports OK pages/ and every
report OK (vs git). The merge is b2566d960e, and all eight CI checks pass on
it.

Writer test (#1818)

tests/test_add_shedu_sdua_protein_example.py follows the writer tests #1801
and #1803 shipped: TARGET and REPO_ROOT are monkeypatched to a temp tree,
main() is driven with and without --apply, and outcomes are judged by
before/after snapshots. Because this writer edits an existing record, the base
is derived from the committed record by removing exactly the node, edge and
curation event it adds (each asserted to occur once); that derived base equals
the origin/main record. An autouse fixture fails any socket connection, so
the tests cannot reach UniProt or Europe PMC.

test checks
test_dry_run_default_writes_nothing no write without --apply, in the temp tree or the repo
test_apply_to_base_emits_exactly_the_committed_additions the committed node (B7HFR2, NCBITaxon:405532, REVIEWED, entry v58 / seq v1, label-only), the committed edge, and one curation event with the writer's timestamp; nothing else in the record changes
test_refuses_record_that_already_has_the_node second --apply refused, nothing written
test_refuses_the_committed_record the committed record itself is refused
test_refuses_a_different_trait[False/True] identifier other than traitmech:000220, dry run and apply
test_refuses_unless_exactly_one_target_graph[renamed/duplicated] missing or duplicated shedu_dna_end_nicking graph
test_refuses_when_edge_object_node_is_missing edge object absent from the graph
test_validation_failure_writes_nothing closed-schema failure leaves the file untouched

Mutating the writer's entry version or its timestamp makes the round-trip test
fail, so it is not vacuous. Full suite: 3373 passed.

Second merge with main

#1817 landed and again conflicted on 13 pages/ files; resolved by
regeneration as before. #1817 also added a protein example (P56947) without
regenerating reports/uniprot_grounding_audit.tsv, so after the merge that
report was stale on this branch. It is regenerated (live, anonymous): the only
change is the P56947 row, which resolves clean. Against main, the report
therefore differs by four rows: B7HFR2, P06115 and P56947 added, and the
A0A0F6B2U2 HTTP 503 row resolved.

Issues filed from the review

🤖 Generated with Claude Code

Adds a GENE_OR_PROTEIN causal node for the single-protein Shedu immune
nuclease on traitmech:000220 (Shedu system) and attaches
UniProtKB:B7HFR2 (Shedu protein SduA, Bacillus cereus B4264,
NCBITaxon:405532) as a taxon-paired protein example with primary
literature evidence from Gu et al. 2024 Mol Cell
(PMID:39742666, DOI:10.1016/j.molcel.2024.12.004), whose cryo-EM
entries 8TI8/8TI9/8TIA PDBe maps to that exact accession.

The node is REVIEWED_LABEL_ONLY: InterPro has only domain-level SduA
entries (IPR025359, Pfam PF14082 SduA_C, formerly DUF4263, and
IPR048396, Pfam PF21407 SduA_N), so grounding a whole-protein node to
one of its domains would be the domain trap
docs/GROUNDING_POLICY.md forbids.

The Cap4 (UniProtKB:C0VHC9) and DruA (UniProtKB:P0DW34) candidates were
not added; the pull request records why.

Written through scripts/add_shedu_sdua_protein_example.py
(--apply opt-in, record_curation_event, write_validated_trait) with an
append-only history record and regenerated derived reports and pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
realmarcin and others added 2 commits October 7, 2026 21:37
Addresses #1808, #1809, #1810, #1811, #1812 and #1813 on the Shedu SduA
protein example added in #1802.

#1808 Regenerated reports/uniprot_grounding_audit.tsv with the live
UniProt REST API (anonymous, no address in any request). Exactly three
rows change: B7HFR2 added clean, P06115 added clean, and the stale
HTTP 503 row for A0A0F6B2U2 now resolves clean. Findings drop 111 -> 110,
the remainder being the pre-existing entry-version drift in #1806, which
is why the recipe still exits 1 while writing a current report.

#1809 The SduA -> shedu_nuclease_activation edge description no longer
generalizes a B. cereus finding across Shedu homologs; it names the
organism and says why, since the graph's scope_notes leave the sensor
class open and the Loeff edge gives the N-terminal domain a different
role in another homolog. Snippet reuse in the graph stays at 2.

#1810 The label-only justification no longer claims the grounding policy
forbids a domain grounding. It states what is true: no family-level
InterPro, NCBIfam or GO term covers SduA, only the domain entries
IPR025359 and IPR048396 exist, and PF14082 spans 1304 UniProt proteins
across 2464 taxa with 18 domain architectures, so a domain term would
not denote this protein family.

#1811 The curation event carries the real UTC time of the change rather
than a midnight placeholder. retrieved_on and the bounded-search date
move to the same UTC day. Because pages derive their "Corpus as of"
stamp from the newest curation_history entry, that moves every page's
stamp; the pages are regenerated, not edited.

#1812 The role field quotes the source's "controlled by" rather than the
stronger "switched by", and attributes the single-component architecture
to UniProt, which is where it comes from.

#1813 The history record gains links.prs (#1802) and links.issues
(#1807) and no longer points at the PR body for facts that belong in the
record.

Rebuilt through scripts/add_shedu_sdua_protein_example.py --apply from
the origin/main base, then regenerated pages and derived reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	pages/browse.html
#	pages/category/ecology.html
#	pages/category/environment.html
#	pages/category/genomics.html
#	pages/category/metabolism.html
#	pages/category/morphology.html
#	pages/category/observation.html
#	pages/category/other.html
#	pages/category/physiology.html
#	pages/category/quantitative_property.html
#	pages/category/upper.html
#	pages/graph.html
#	pages/umap.html
realmarcin and others added 2 commits October 7, 2026 22:14
Adds tests/test_add_shedu_sdua_protein_example.py in the style of the
writer tests #1801 and #1803 shipped: the writer is pointed at a temp
copy via monkeypatched TARGET/REPO_ROOT, driven through main() with and
without --apply, and judged by before/after snapshots of the temp tree.

The writer edits an existing record, so the base it is applied to is
derived from the committed record by removing exactly the node, edge
and curation event it adds, each asserted to occur once. That derived
base was checked to equal the origin/main record.

Covered:
- dry run is the default and writes nothing, here or in the repo;
- applying to the base emits exactly the committed node (B7HFR2,
  NCBITaxon:405532, REVIEWED, entry v58 / seq v1, label-only grounding),
  the committed edge, and one curation event with the writer's
  timestamp, and changes nothing else in the record;
- refusal when sdua_immune_nuclease already exists, both after a first
  apply and on the committed record itself;
- refusal for a different identifier and unless exactly one
  shedu_dna_end_nicking graph exists, and when the edge's object node
  is missing;
- a closed-schema validation failure writes nothing.

An autouse fixture makes any socket connection fail the test, so the
suite cannot reach UniProt or Europe PMC. Mutating the writer's entry
version or timestamp makes the round-trip test fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	pages/browse.html
#	pages/category/ecology.html
#	pages/category/environment.html
#	pages/category/genomics.html
#	pages/category/metabolism.html
#	pages/category/morphology.html
#	pages/category/observation.html
#	pages/category/other.html
#	pages/category/physiology.html
#	pages/category/quantitative_property.html
#	pages/category/upper.html
#	pages/graph.html
#	pages/umap.html
@realmarcin
realmarcin added this pull request to the merge queue Oct 11, 2026
@realmarcin
realmarcin removed this pull request from the merge queue due to a manual request Oct 11, 2026
@realmarcin
realmarcin added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit a7eb408 Oct 11, 2026
8 checks passed
@realmarcin
realmarcin deleted the duf-protein-examples branch October 11, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment