Skip unused distributions in entropy-weighting bisection - #14
Open
kevinmoran1988 wants to merge 2 commits into
Open
Skip unused distributions in entropy-weighting bisection#14kevinmoran1988 wants to merge 2 commits into
kevinmoran1988 wants to merge 2 commits into
Conversation
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.
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.
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.