Skip to content

Skip unused distributions in entropy-weighting bisection - #14

Open
kevinmoran1988 wants to merge 2 commits into
TravisWheelerLab:mainfrom
kevinmoran1988:stable
Open

Skip unused distributions in entropy-weighting bisection#14
kevinmoran1988 wants to merge 2 commits into
TravisWheelerLab:mainfrom
kevinmoran1988:stable

Conversation

@kevinmoran1988

Copy link
Copy Markdown

eweight_target_f() and eweight_target_exp_f() call p7_ParameterEstimation(), which reparameterizes match/insert/delete transitions and both emission distributions.

Only hmm->mat is read, by p7_MeanMatchRelativeEntropy(); the other four are discarded on every root-finder iteration (~10-15 per model).

Add p7_ParameterEstimation_MatchOnly() and call it from both callbacks. Cuts esl_mixdchlet_MPParameters() calls in the bisection from ~5M to ~M per iteration.

bathbuild over 5232 dipteraODB12 alignments, serial: 859.6s -> 778.3s (1.10x). Output byte-identical on that corpus
and across the build/weighting/prior option matrix.

eweight_target_f() and eweight_target_exp_f() call
p7_ParameterEstimation(), which reparameterizes match/insert/delete
transitions and both emission distributions. Only hmm->mat is read, by
p7_MeanMatchRelativeEntropy(); the other four are discarded on every
root-finder iteration (~10-15 per model).
Add p7_ParameterEstimation_MatchOnly() and call it from both callbacks.
Cuts esl_mixdchlet_MPParameters() calls in the bisection from ~5M to ~M
per iteration.
bathbuild over 5232 dipteraODB12 alignments, serial: 859.6s -> 778.3s
(1.10x). Output byte-identical on that corpus
and across the build/weighting/prior option matrix.
BATH dropped HMMER's hmmalign driver but kept the whole tracealign
engine (tracealign.c, p7_tracealign_*) compiled into libhmmer.a.
bathalign is a 288-line driver over that existing engine -- no new
alignment code. Alphabet-generic, as the engine is; BATH3/f is a
superset of HMMER3/f, so it reads both .bhmm and .hmm. Amino output is
byte-identical to HMMER 3.4 hmmalign across --mapali, --outformat,
--trim, and Stockholm and afa output, for models from bathbuild and
hmmbuild alike. Note that bathbuild itself is amino-only, so non-amino
models must come from hmmbuild.

c2ba68e made frameshift tau calculation unconditional and dropped
--fs, but left the gating in place: evalues.c still guards FS3/FS5 on
cfg_b->fs and p7_hmmfile.c still guards the header lines on hmm->fs.
--nofs re-exposes that switch against the new default.

Alignment never reads the frameshift stats, so for a model built to be
aligned against, the calibration is pure waste -- and it is roughly
half of bathbuild's runtime (57.9s -> 30.2s over 400 dipteraODB12
alignments). Where the model exists only for alignment, building it
dominates the cost of aligning.

A --nofs model is byte-identical to a full one apart from the omitted
FS3/FS5 STATS and FRAMESHIFT PROB lines, and gives identical bathsearch
results when --fs/--fsonly are not used. When they are, bathsearch
fails cleanly on the unset stats rather than mis-scoring.
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