perf: pool HMM (kofam/sulfur) via Z-independent bit-score prefilter (-T)#11
Merged
Conversation
On branch perf/hmm-pool-bitscore (experiment, NOT for PR #10). Re-enables kofam/sulfur pooling + chunking (un-reverts 3457a80) and switches hmmsearch from the e-value prefilter (-E, scales with search-space size Z) to a bit-score prefilter (-T 10 --domT 10). Bit scores are Z-independent, so pooled multi-genome hmmsearch reports the SAME hits as per-genome; hmm_parser still applies per-profile bit-score thresholds. Floor 10 < lowest kofam threshold (15.07), so no real hit is pre-cut. Goal: validate per-genome(-T) == pooled(-T) on extraves (proves -T removes the Z-dependence that made -E pooling churn ~5% of kofam calls). NB changes results vs -E, so a future pipeline-wide decision, not mid-campaign. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…validated) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #10 (base
perf/search-bundling; retargets todevonce #10 merges). Adds HMM (kofam/sulfur) to--pool_searchesby removing the only thing that blocked it.mmseqs pooling (#10) is byte-identical because mmseqs filters on bit score (independent of search-space size). HMM couldn't be pooled byte-identically because
hmmsearch's-Eprefilter — andhmm_parseralready filters on per-profile bit-score thresholds, so the-Eprefilter is the only Z-dependent step. This PR replaces it with a Z-independent bit-score prefilter:10sits below kofam's lowest profile threshold (15.07of 24,405), so no hit a real threshold would keep is pre-cut. Bit score is identical whether a gene is searched alone or in a 134k-gene pool, so pooled HMM == per-genome HMM. kofam/sulfur pooling + pooled-then-chunked kofam (search_chunk_size) are enabled on top.Validation (extraves, 56 bins)
per-genome(
-T) vs pooled-chunked(-T), all 5 DBs:kofam fanned out to 8 chunks (vs 56 per-genome). With this PR the entire annotation path (mmseqs + HMM) pools byte-identically.
-E(why this is separate from #10)-Trecovers the bit-score-significant hits that-E 1e-5silently dropped: +63 kofam calls (~0.08%) on extraves. Bit score is the intended KOfam filter, so this is arguably a latent-bug fix — but it does change kofam/sulfur output vs the-Epipeline. #10 has zero behavior change; this PR is a deliberate, pipeline-wide switch and should be adopted for a fresh campaign (everything-Tfrom the start), not mixed with already-finished-Ecohorts.Output size is unchanged (final annotations 34M == 34M; only the transient domtblout grows).
Notes
-Z/--domZdoes not work here: one pooled-Zcan only match one genome's size, but a pool has differently-sized genomes.docs/dev/search-bundling.md.nextflow lint: no errors.🤖 Generated with Claude Code