Repository navigation
Conversation
AlphaFold 3 (google-deepmind/alphafold3@03f4f48) now builds HMMER 3.4 with two more patches on top of --seq_limit: - easel_fast_fasta_parsing.patch: Easel copies residues while it scans the read buffer instead of in a second pass (EddyRivasLab/easel#83). Reported 2-2.5x faster jackhmmer. - jackhmmer_parallel_fasta.patch: on a rewindable FASTA every worker opens the database itself and claims 512 KB chunks, so jackhmmer is no longer limited by one reader thread (EddyRivasLab/hmmer#353). Reported 98 s -> 38 s at 8 CPUs and 94 s -> 18 s at 24 CPUs on UniRef90. Both upstream issues are open with no maintainer response yet. The three patches are vendored in docker/hmmer with their SHA256 sums (Apache-2.0, from that commit; the seq_limit patch is byte-identical to the one in the alphafold3 submodule). docker/hmmer/build_hmmer.sh downloads HMMER 3.4, checks every checksum, applies the patches with --fuzz=0 in AlphaFold 3's order, installs into a prefix, and then checks that a serial (--cpu 0) and a threaded (--cpu 4) jackhmmer give the same hits, alignment and target count on a generated ~6 MB database. - AF3 image: builds HMMER with the script instead of applying only the seq_limit patch from the submodule. - AF2 image: builds it in an ubuntu:20.04 stage and overwrites conda's HMMER binaries, as is already done for hhblits; the build fails if the installed jackhmmer lacks --seq_limit. - docs: how to install the same build into a conda environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DimaMolod
marked this pull request as ready for review
October 20, 2026 01:36
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
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.
Builds HMMER 3.4 in both prediction images with the jackhmmer speed-up patches that AlphaFold 3 ships since google-deepmind/alphafold3@03f4f48. Snakemake runs feature generation in these images, so the speed-up reaches workflow users without changes elsewhere.
The patches
jackhmmer_seq_limit.patch--seq_limit, already in the AF3 imageeasel_fast_fasta_parsing.patchjackhmmer_parallel_fasta.patchBoth upstream issues are open with no maintainer response. The author's identity test was 3 queries against PDB seqres.
Changes
docker/hmmer/: the three patches (Apache-2.0, copied from that commit; the seq_limit patch is byte-identical to the submodule's),SHA256SUMS, andbuild_hmmer.sh PREFIX. The script downloads HMMER 3.4, checks all checksums, applies the patches with--fuzz=0in AF3's order, and installs. It then checks that serial (--cpu 0) and threaded (--cpu 4) jackhmmer give identical hits, alignment and target count on a generated ~6 MB database.alphafold3/docker/.ubuntu:20.04stage and overwrites conda's binaries, like hhblits. The build fails ifjackhmmer -hlacks--seq_limit.docs/backend_installation.md: how to put the same build into a conda env.Not changed: AP still runs jackhmmer with 8 CPUs (
JACKHMMER_N_CPU, AF2 default), and the Snakemake feature walltime is unchanged. Both should follow from measurements.Tested so far
build_hmmer.shon an EMBL compute node (gcc 14.3): patches apply with--fuzz=0, build and self-check pass (21 s).ubuntu:20.04with gcc 9 (apptainer, EMBL node): build and self-check pass.--cpu 0and--cpu 4.--cpu 8vs the patched one at 8 and 16, with the exact AF2/AF3 flags. Alignments (-AStockholm), target counts and hit tables are identical in all 57 comparisons. The tblout target-name column was padded differently in 2 of them (EGFR x small BFD). That is pre-existing:p7_tophits_GetMaxNameLength()readsunsrt[0..N-1], which after--seq_limitare the first hits found, and the seq_limit-only build alone gives width 87 at--cpu 4/8 and 71 at 16. Details:/scratch/dima/hmmer_speedup_test/identity/RESULT.txt.Wall time on our storage (BeeGFS
/scratch/AlphaFold_DBs, up to 7 jobs per node, so indicative). AF3 columns are the four protein searches added up; AF3 runs them concurrently.The gain shrinks with query length: long queries were already limited by the search itself, not by reading, so for them more CPUs is what helps. hmmsearch on pdb_seqres and nhmmer on Rfam take the same time before and after.
End-to-end
create_individual_features.pywith the Snakemake defaults, in the 2.11.0 images, using either each image's HMMER or the patched build compiled inside that image's OS. Databases were on/scratch_cached. The figures are wall time of the whole feature job; current and patched ran side by side on the same nodes.bfd_uniref_hits.a3mchanges from run to run with the same binary (two runs of the current image already differ). p53 and HSP90A features are identical.feature_threadsis worth doing on its own, separately from this PR.Raw numbers:
/scratch/dima/hmmer_speedup_test/e2e/FINAL.txt.🤖 Generated with Claude Code