Skip to content

Hydrophobin validation: module split, CFEM/hydrophobin activation, truth set, measurements, relaxed level (not shipped) - #77

Merged
hyphaltip merged 46 commits into
mainfrom
hydrophobin-validation
Oct 9, 2026
Merged

hyphaltip merged 46 commits into
mainfrom
hydrophobin-validation

Conversation

@hyphaltip

@hyphaltip hyphaltip commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Summary

This branch does the hydrophobin work for the sorting hat (cellsurface_sorting_hat) and the changes the tool needs for it: a separate module and calls for hydrophobin and HsbA Pfam families, the CFEM and hydrophobin family sign-offs, a hydrophobin truth set, a measurement of the strict hydrophobin call in 8 proteomes, and a tested relaxed (extended) level that is built but not yet part of any call. It also carries the planning documents and independent reviews. 42 commits, 194 files, +32,209/-30 lines (most of the lines are analysis tables, sequences and documents; src/ is about 300 lines changed plus 2 new modules).

It supersedes PR #75 (CFEM and hydrophobin activation, closed unmerged: #75 put the hydrophobin rows in pfam_adhesion, so hydrophobin hits set wall_family_domain). Its note fix 1466f90 is carried here as 97f2676. per-call-status (#76) is merged to main and this branch contains it.

Behaviour changes to review (src and data)

Change Files Effect
Hydrophobin-class Pfam models move to their own module pfam_hydrophobin (PF01185, PF06766, PF22354, PF28987, PF29785, PF29802, PF29465). HsbA (PF12296) goes to pfam_hsba. data/sorting_hat/family_table.tsv, modules/pfam.py (MODULES), modules/cli.py A hydrophobin hit no longer sets wall_family_domain or cell_wall_adhesion_candidate.
Two new evidence calls hydrophobin_domain and hsba_domain, both added to the mechanism lists of other_not_surface and other_surface_no_mechanism categories.yaml A surface protein with a hydrophobin or HsbA hit is not "no mechanism". config_sha256 changes.
Active Pfam families: PA14 (signed off 2026-10-07), CFEM, Hydrophobin and the other hydrophobin-class models, Hydrophobin_like, HsbA (owner decisions 2026-10-08). Cerato-platanin was dropped as out of scope. Candidate families (Flocculin PF00624, Flocculin_t3 PF13928, Hyr1 PF15789, PIR1-like_C PF22799, ALS_M PF30910) were added inactive with notes. family_table.tsv (24 families, 10 active) Activation is evidence only. Call status stays unvalidated unless a status file exists.
Per-module Pfam artefact digest (a change to one Pfam module's rows no longer changes the identity of the others) modules/cli.py _family_digest(families, module) The identities of pfam_adhesion and pfam_allergen change once, so any status file tied to the old identities needs re-measuring.
New module cys8_pattern (eight-cysteine spacing from published sets plus the R0 signal peptide) modules/cys8.py, data/sorting_hat/cys8_spacing.yaml (85 gap entries with source quotes) Reported side column. Not read by any call.
New module hydrophobin_relaxed and the frozen model file hydrophobin_relaxed.hmm (seven Pfam models, GA 2.60/-1000, --nobias) with provenance modules/hydrophobin_relaxed.py, data/sorting_hat/hydrophobin_relaxed.{hmm,provenance.json} The module can be run and is tested. No call reads it, and no job is added to submit_modules.sh. See "What this PR does not do".
Report text for limit 4 now says hydrophobin and HsbA are separate evidence calls outputs.py, docs/superpowers/specs/2026-10-04-orchestrator-design.md (kept equal, a test checks it) Text only.
pfam.parse_domtblout also returns seq_score and query modules/pfam.py Additive.

Golden files (tests/cellsurface_sorting_hat/golden/) were regenerated after reading every changed line. The only differences are the new calls and modules, the new config_sha256, and the new basis strings.

Analysis and data (analysis/hydrophobin_truth/)

  • Truth set: 174 Swiss-Prot entries named hydrophobin or rodlet (UniProt 2026_03): 131 T2 (experimental PubMed evidence on a FUNCTION, SUBCELLULAR LOCATION or SUBUNIT comment), 43 T3, no T1. Pfam is not used for any label. 30 MMseqs2 clusters (28 with a T2 member). Literature lists (Jensen 2010, Xu 2021) were read; none gives protein-level evidence, so they form a held-out "literature, predicted" tier (50 Jensen proteins resolved to sequences).
  • Calibration inputs: truth mapped to 16 proteomes (12 used), assumed-negative tables, a stored development/test split, hard-negative sets (CFEM, cerato-platanin, HsbA, PIR/Ccw12, small secreted cysteine-rich; counts in hard_negative_queries.md), R0 SignalP on 1,608 reference sequences.
  • Runs: SignalP, TMHMM, Pfam and the new modules on 12 proteomes (3 A. fumigatus strains, C. immitis, B. dermatitidis, C. albicans, S288C, B. bassiana, F. fulva, F. graminearum, P. expansum, P. ostreatus PC9). Run drivers are in analysis/hydrophobin_truth/run/.
  • Freeze: freeze.json (commit f1986e2) pre-registers the relaxed level (--nobias, 2.6 bits, R0 called, at least 8 cysteines), the cutoff rule, the per-fold HMM cutoffs, the thresholds and what the author had seen. Only tuning data was scored before it. Large score and HMM files stay untracked; their hashes are in freeze.json.
  • Evidence sheets and curation: evidence_sheets.tsv (61 unlabelled calls) and curation_rubric.md (written before any decision).
  • Tests: tests/hydrophobin_truth/ (about 90 tests) cover tiers, folds, cutoff rule, derived HMM file vs --cut_ga, alignment checks, evaluation, cost and freeze checks.

Measured results (all smoke; negatives are assumed; leakage partial or tuned on truth)

Result Value Report
Strict pfam_hydrophobin (module status) in 8 proteomes sensitivity 1.00 in 5, 0.80, 0.60 and 0.25 in the others; 3 to 7 positives per proteome; lower bounds 0.00 to 0.57; specificity not informative (19 of 22 unlabelled calls have 8 or more cysteines) docs/reports/2026-10-08-hydrophobin-validation.md
Published-spacing rescue (cys8_pattern) recovers 1 of 6 Pfam-missed proteins in the proteomes; matches 78 of 131 T2 (60%) same report
Relaxed level, leave-cluster-out recovers 6 of 6 Pfam-missed clusters (Wilson [0.61, 1.00]); extended recall on T2 130 of 131 vs 122 strict docs/reports/2026-10-08-hydrophobin-extended-level-L5.md
Custom HMM not testable on the primary set (relaxed leaves 0 clusters unrecovered); leave-cluster-out 58% of T2 with default filters, 90% with --nobias; not part of v1 L5 report
Aligner comparison (mafft L-INS-i, famsa, muscle 5.1) equivalent within 1 or 2 of 131 proteins; --nobias is what matters L5 report
Cost of the relaxed level on the 7 test proteomes (limit 5 unlabelled extra calls per 10,000) failed in 2 of 7: B. bassiana 10.55 and F. graminearum 10.72; the other 5 are within 1.0 to 1.9 docs/reports/2026-10-08-hydrophobin-relaxed-cost-and-sheets.md
Repeat call re-measured after the config change unchanged: S288C 0.435 [0.067, 0.667] / 0.987; C. albicans 0.462 [0.000, 0.788] / 0.976 ledger row H4 in docs/paper/02

What this PR does not do

  • hydrophobin_extended is not added to categories.yaml. By the ship rule frozen in freeze.json, the relaxed level is not added while any condition fails, and the cost condition failed in 2 of 7 test proteomes. Precision also failed (see below). Recall and hard negatives passed.
  • The custom HMM is not shipped.
  • No status file is committed for a call that does not exist yet.
  • Nothing about SOWgp-like proteins (see docs/ROADMAP-2026-10-08-DRAFT.md, milestone M5).

Curation of the 61 unlabelled calls and the ship decision (added 2026-10-08)

analysis/hydrophobin_truth/curation_rubric.md (committed first, a9b7a32), evidence in curation/ (24 proteins with the doublet architecture, 21 strict Pfam, 0 named hydrophobin by a paper or curated record under the mapping rule, 6 reciprocal best hits to known hydrophobins, 8 with evidence of another function; 21 papers read, 98 paper gene IDs mapped by sequence), decisions in curator_decisions.tsv, rule in apply_rubric.py (7 tests), ship rule in ship_rule.py (3 tests) and ship_decision.json. Report: docs/reports/2026-10-08-hydrophobin-curation-and-ship-decision.md.

Group hydrophobin not hydrophobin unresolved
strict and relaxed, unlabelled (18) 16 0 2
strict only, unlabelled (3) 0 0 3
relaxed only, unlabelled (40) 0 8 32

Ship rule: recall pass, hard negatives pass, cost fail (2 of 7 test proteomes), precision fail (0 hydrophobin of 7 resolved clusters among 36 clusters of the relaxed-only calls; 29 unresolved, which means no evidence found, not false positive). The relaxed level is not shipped; the owner confirmed on 2026-10-08: keep the strict call only. A bug found and fixed on the way: the evidence sheet's BLAST column against the known hydrophobins was empty for all rows (a repeated BLAST output field name dropped the column); 24 of 61 rows have a hit.

Caveats

  • Every status is smoke. No species has 20 independent positive clusters. The Pfam-missed set is 9 proteins in 6 clusters.
  • Specificity rests on assumed negatives. The T2 labels were only keyword-checked.
  • Pre-freeze changes (aligner, cysteine-column check) were made before any held-out score existed and are recorded in freeze.json.
  • The owner could not curate the 61 evidence sheets, so they were curated from evidence and literature (tier T4, "not owner-reviewed") under a rubric committed before any decision. See the new section below. The owner can audit and overrule any row.

Documents (planning and review trail)

Specs (docs/superpowers/specs/2026-10-08-hydrophobin-*.md): validation design rev 3 and custom-HMM/extended-level design rev 4, each with independent reviews. Plans (docs/superpowers/plans/2026-10-08-hydrophobin-*.md) with plan reviews. Reports in docs/reports/. Paper notes updated: docs/paper/02 (ledger rows H1 to H4), 04, 05 (literature, prior art, cysteine spacing quotes). A hand-off: docs/HANDOFF-2026-10-08-hydrophobin.md. A whole-project roadmap draft: docs/ROADMAP-2026-10-08-DRAFT.md.

How to review

  1. src/ and data/ first (about 10 files): categories.yaml, family_table.tsv, modules/hydrophobin_relaxed.py, modules/cys8.py, modules/cli.py, pfam.py, and the golden diffs.
  2. Check the tests: PYTHONPATH=$PWD/src python3.12 -m pytest tests/cellsurface_sorting_hat tests/hydrophobin_truth tests/calibration_truth -q gives 910 passed and 9 skipped (the skips are tool tests that need hmmer, mafft or MMseqs2 on PATH, and shellcheck). With module load hmmer/3.4 mafft/7.505 mmseqs2/17-b804f the tool tests run too.
  3. The numbers in the reports come from analysis/hydrophobin_truth/ scripts. The freeze, evaluate.py, cost.py and the L5 report are the main audit trail.

hyphaltip and others added 30 commits October 8, 2026 08:46
…as active

Owner sign-off 2026-10-08 after the review of 16 rows (CFEM 7, Hydrophobin 1 accepted as members; CSA2 accepted).
CFEM keeps the no_tm condition. Status stays unvalidated: evidence only. On the stored runs: Hydrophobin calls
1 to 6 proteins per proteome, CFEM 1 to 7. The shipped-table test pins the signed-off set.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d candidate families (inactive)

Activates PF06766, PF22354, PF28987, PF29785 (Hydrophobin_D, recovers RodD) and PF29802
under the owner rule that a hydrophobin Pfam model places a protein in the category.
Adds PF29465, PF12296 HsbA, PF07249 Cerato-platanin and five adhesion-repeat domain
candidates as inactive rows. Adds the 8-proteome search scripts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…atanin, classify repeat-domain candidates

Owner decisions 2026-10-08: PF29465 and PF12296 count as hydrophobins; PF07249 is out of
scope; PF00624 and PF13928 under flocculin; PF15789, PF22799, PF30910 labelled by role.
The five repeat-domain families stay inactive until reviewed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…design, prior-art notes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ent review 1

Addresses 4 blockers and 12 major findings: call syntax, R0 condition instead of cleavage site,
one negative set, scope of the rescue measurement, leakage partial, all statuses smoke,
keep rule fixed in advance, stale call files, test changes. Stores UniProt query provenance.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n spec

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e's family rows

A change to a pfam_adhesion row no longer changes the identity of pfam_allergen, and the reverse.
Existing pfam_adhesion and pfam_allergen module identities change once.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… (task H3, H3b)

85 gap entries, each with a source quote locator; sets kept separate. Wessels 1994, Linder 2005
and Sunde 2008 not read. Written before any truth set is built.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ptide condition

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ers of named entries (task H2)

131 T2, 43 T3, 15 not named; 174 named entries fall in 30 MMseqs2 clusters (30% id).
Split is made in H2c with the negatives.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…taxon table (task H2b)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…or 8 proteomes (task H2c)

Positives per proteome 3 to 7; no species reaches 10 positive clusters in the test part.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…0 signal peptide (task H4)

Matches any one published spacing set (D9); hit needs the R0 call (D10). The R0 module identity is in
params, so a new R0 run makes a call file stale. categories.yaml is not changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…phobin_domain and hsba_domain calls (task H1)

Moves PF01185, PF06766, PF22354, PF28987, PF29785, PF29802, PF29465 to pfam_hydrophobin and PF12296 HsbA
to pfam_hsba (owner D6). A hydrophobin hit no longer sets wall_family_domain or cell_wall_adhesion_candidate.
Both new calls are mechanism evidence for the other_* calls. config_sha256 changes, so existing call status
files are stale until H1b. Route: per-call-status merged locally into this branch (f005e20).
Golden files regenerated after reading every changed line; the orchestrator spec limit 4 is synced.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… 8 proteomes, rescue rule result

All statuses smoke (3 to 7 positives per proteome). Rule 6.3: no evidence that the cys8 rescue helps.
Frozen published spacing matches 60% of T2 Swiss-Prot hydrophobins.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rement files (H1b, H7)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…truth/run

The scripts/sorting_hat lint tests apply to every job script there; these drivers only loop over existing ones.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ll design rev 1

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… and Xu 2021 lists), Jensen IDs resolved to sequences

The one-off PDF and .doc conversion scripts stay untracked (build.py, colx.py, doc2txt.py).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…first, HMM tested against it); review 1

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…; review 2

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… 1; decision E11 (HsbA overlap)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…oteomes, floor, domain GA -1000, freeze scope); plan review 1

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…eview 1

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…eserve (4 clusters, 5 proteins), gap report

Five ACLA stated patterns are shifted by one table row (cyclic); three proteins unresolved.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ydrophobin-related terms), L2 folds (28, 6 Pfam-missed) and proteome split

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
hyphaltip and others added 12 commits October 8, 2026 20:23
…fixed before scoring

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… 130/131 called, LP 49/50, hard negatives 1246/1384)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…am --nobias at 2.6 bits; per-fold HMM cutoffs; thresholds)

Only tuning data was scored before this commit. freeze.json records input and score hashes, the frozen
choices, the aligner and check changes made before any held-out score existed, and what the author had seen.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…or the evaluation functions (red)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…missed clusters, HMM not testable), aligner comparison scripts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…valent; --nobias is what matters) and L5 report

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… model file (task L6a)

Seven hydrophobin-class Pfam models with GA 2.60 / -1000 (search option --nobias), from freeze commit f1986e2.
No categories.yaml edit and no job in submit_modules (L6c, after the ship decision).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…mes over the limit), L8 evidence sheets (61 rows)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…T4), written before any decision

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ome (survey of the whole project)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@hyphaltip hyphaltip changed the title Hydrophobin validation Hydrophobin validation: module split, CFEM/hydrophobin activation, truth set, measurements, relaxed level (not shipped) Oct 9, 2026
hyphaltip and others added 4 commits October 8, 2026 22:37
… rule: relaxed level not shipped; fix BLAST column bug

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nly; ledger rows H5 to H8

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…cell_wall_adhesion_candidate) with basis sub-labels and a report table

Owner decisions 2026-10-08: broader call kept beside the narrow one; HsbA grouped with hydrophobin as surface-active.
basis_calls in categories.yaml names the evidence calls that held (validated as earlier ungated calls). Golden files read line by line.
Repeat-call status re-measured under the new config: unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@hyphaltip
hyphaltip marked this pull request as ready for review October 9, 2026 18:25
@hyphaltip
hyphaltip merged commit fc71ee0 into main Oct 9, 2026
6 checks passed
@hyphaltip
hyphaltip deleted the hydrophobin-validation branch October 9, 2026 18:25
@hyphaltip
hyphaltip restored the hydrophobin-validation branch October 9, 2026 18:27
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