Skip to content

Add lazy bathalign, and --nofs to skip frameshift calibration - #15

Open
kevinmoran1988 wants to merge 1 commit into
TravisWheelerLab:mainfrom
kevinmoran1988:bathalign
Open

Add lazy bathalign, and --nofs to skip frameshift calibration#15
kevinmoran1988 wants to merge 1 commit into
TravisWheelerLab:mainfrom
kevinmoran1988:bathalign

Conversation

@kevinmoran1988

Copy link
Copy Markdown

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.

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