Repository navigation
feat/diamond cluster - #137
Merged
Merged
Conversation
…f mmseqs The unmapped proteins and singletons (with --denovo: all proteins) can now be clustered with diamond (diamond-cluster / diamond-deepclust) to compare against mmseqs easy-cluster (still the default). New params diamond_approx_id, diamond_member_cover and diamond_mutual_cover; diamond gets the task threads and the same memory budget as mmseqs (-M). The subprocess/error handling and cluster parsing shared by both wrappers moved to clusterers/_common.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the per-tool options (--mmseqs-coverage/-cov-mode/-min-seq-id/-threads/ -split-memory-limit, --diamond-*) by generic ones that both wrappers translate: --cluster-threads, --cluster-memory-limit, --cluster-coverage (0-1), --cluster-cov-mode (bidirectional|member) and --cluster-min-seq-id (0-1). --mmseqs-sensitivity stays mmseqs-only. In mmseqs clustering the target is the member, so --cov-mode 1 == diamond --member-cover and --cov-mode 0 == --mutual-cover (checked with a fragment of DNAK_AQUAE, now a test). Unset, each tool keeps its default. The Nextflow params are renamed accordingly (unreleased). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Debian ships mmseqs 15 and diamond 2.1.11; a micromamba stage now installs pinned mmseqs2 20.ae60e and diamond 2.2.9 from bioconda (amd64 and arm64) into /opt/tools, which is appended to PATH so its conda dependencies don't shadow system tools. environment-conda.yml pins the same versions, so docker, singularity and conda cluster identically. The image checks both binaries run.
With diamond 2.2.9 in all environments, --cluster-min-seq-id is passed to diamond as --id, the identity of the alignment like mmseqs --min-seq-id, instead of --approx-id (estimated from the bitscore). --id replaces the default approx-id cutoff of diamond cluster (50%); unset, that default still applies. Requires diamond >= 2.2.1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alpae
commented
Dec 1, 2026
alpae
commented
Dec 1, 2026
alpae
commented
Dec 1, 2026
alpae
commented
Dec 1, 2026
- A --clusterer diamond-* that is not installed now stops the run in check_input and infer_roothogs, also without --denovo. Before, the proteins without OMAmer placement and the singletons were silently left unclustered. A missing default mmseqs still only skips this clustering with a warning, as before. - read_clusters puts the representative first in each cluster. diamond writes its lines in member order, so the representative could come later, contrary to the docstrings. - cluster_sequences (mmseqs) checks cov_mode before looking for the binary, so test_unknown_cov_mode passes without mmseqs installed. - The tests that hide mmseqs/diamond now use an empty PATH. The interpreter's own folder also holds mmseqs and diamond in the conda env. - The protein trace records the clusterer that was used (source=<clusterer>) instead of source=linclust. The --denovo memory comment in base.config mentions diamond too.
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.
add diamond cluster as an alternative cluster method for the --denovo flag.