Repository navigation
--denovo: rootHOGs by mmseqs clustering instead of OMAmer, plus an mmseqs wrapper - #134
Merged
Merged
Conversation
…Amer For simulated proteomes, placing proteins into the OMA gene families with OMAmer makes little sense. With --denovo (params.denovo in the pipeline): - omamer_run is skipped and the OMAmer db is never staged; a placeholder (assets/NO_OMAMER_DB) is passed instead, so the default 7.7 GB LUCA.h5 is not downloaded. - fastoma-check-input --denovo needs neither an OMAmer db nor hogmaps, but checks that mmseqs is available. - fastoma-infer-roothogs --denovo treats all proteins as unmapped, so they all go to the existing mmseqs easy-cluster step; clusters with proteins of at least two species become rootHOGs (HOG_clust*). Without mmseqs it exits with an error instead of producing no rootHOGs. - the number of species (resources of hog_big, threshold for pairwise orthologs) is counted from the proteomes instead of the hogmaps. Tests: nf-test case with a non-existent omamer_db, check-input and infer-roothogs CLI tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… string Nextflow 26 passes command-line params as strings, and "false" is truthy in Groovy.
…stering options The clustering of unmapped proteins and singletons (with --denovo: of all proteins) now goes through FastOMA/zoo/wrappers/clusterers/mmseqs.py instead of run_linclust: - --mmseqs-threads: Nextflow passes task.cpus; before, mmseqs used all cores of the machine. - When mmseqs fails or is killed (e.g. out of memory), infer-roothogs exits with its exit code (128 + signal), like the mafft/FastTree wrappers, so Nextflow retries the task. - --mmseqs-coverage, --mmseqs-cov-mode, --mmseqs-sensitivity, --mmseqs-min-seq-id (pipeline params mmseqs_*); unset, the mmseqs defaults are used as before. - The records are passed to mmseqs under their index and the clusters mapped back, so the cluster TSV is read instead of parsing the "fasta-like" all_seqs output (mmseqs reduces UniProt-style ids to their accession in the TSV). The temporary files are removed; before, singleton_unmapped_* and tmp_linclust/ were left in the working directory. - check-input and infer-roothogs share one availability check (find_mmseqs). The rootHOG files are identical to before on testdata (OMAmer and --denovo) and on the synthetic stage dataset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
infer_roothogs asked for 2 GB in --denovo mode whatever the input, as its memory was sized from the number of hogmaps, while it clusters all proteins with mmseqs. It is now sized from the number of species and the size of the proteomes (passed to the process as values), and mmseqs gets --split-memory-limit at 60% of the task memory, so it no longer sizes its prefilter from the total RAM of the machine. Splice genes without any OMAmer hit (with --denovo: all of them) kept the first isoform listed, even a fragment that then did not cluster with its orthologs, so the family was lost. They now keep the longest isoform that passed the length filter.
Below ~1.1 GB, the mmseqs prefilter stops with "Cannot fit databases" (exit 1, not retried), even for a few sequences. The limit is now at least 2 GB.
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.
Summary
Adds a
--denovomode that skips OMAmer and infers the rootHOGs by clustering all proteins withmmseqs easy-cluster. This is meant for simulated proteomes, where placing proteins against theOMA database makes little sense. It also replaces the ad-hoc mmseqs call in infer-roothogs with a
small wrapper, in the style of the mafft/FastTree wrappers.
De-novo mode
--denovoon the pipeline,fastoma-infer-roothogsandfastoma-check-input. OMAmer is not run andno OMAmer database is needed or staged; a placeholder file stands in for the channel, so the 7.7 GB
default db is never downloaded.
(splice files) and the check that every protein is accounted for work as in the OMAmer mode.
mmseqs wrapper (
FastOMA/zoo/wrappers/clusterers/mmseqs.py)--mmseqs-threads ${task.cpus}).Before, it used every core of the node.
for running out of memory), as with mafft and FastTree, so Nextflow can retry the task with more
resources. Before, it always exited with 1.
--mmseqs_coverage,--mmseqs_cov_mode,--mmseqs_sensitivityand--mmseqs_min_seq_idare new pipeline params, and are also exposed by the CLI. If they are unset,mmseqs uses its defaults as before. They also apply without
--denovo, to the proteins OMAmer couldnot place and the singletons.
UniProt-style ids (
sp|X|NAME) to the accession in its cluster table, so its ids can't be useddirectly. This also removes the parsing of the FASTA-like output.
singleton_unmapped_*andtmp_linclust/were left in the work directory.run_linclustand the dead commented-out code in_wrappers.pyare removed.Tests
tests/test_mmseqs_wrapper.py: real clustering with UniProt ids, options passed only when set,exit codes 1 and 137 (with a fake mmseqs), no records,
find_mmseqs. CLI tests for--denovo, and astage test that a killed mmseqs makes infer-roothogs exit with 137.
nf-tests/options.nf.test.this branch). With
--denovo --mmseqs_sensitivity 7.5, the task runsmmseqs easy-cluster … --threads 2 -s 7.5.Docs
README section "De-novo gene families without OMAmer"; schema entries; CHANGELOG entries under
Added and Fixed.