Skip to content

Add --save_domtblout option - #71

Merged
erikrikarddaniel merged 2 commits into
nf-core:devfrom
erikrikarddaniel:save-domtblout-69
Aug 24, 2026
Merged

Add --save_domtblout option#71
erikrikarddaniel merged 2 commits into
nf-core:devfrom
erikrikarddaniel:save-domtblout-69

Conversation

@erikrikarddaniel

Copy link
Copy Markdown
Member

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/phyloplace branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

Description

Closes #69.

hmmsearch's per-sequence hit table carries no alignment coordinates, so there was no way to work out how much of a profile a hit covers, or to find a gene split over several adjacent ORFs where no single ORF covers enough of the profile to be classified on its own. Those coordinates only exist in the per-domain table, which the pipeline never wrote and which could not be turned on from a config either: ext.args = "--domtblout …" produces a file the module never gzips and no declared output pattern matches, and overriding publishDir for HMMER_HMMSEARCH from a -c config disabled publishing for that process entirely.

The blocker was upstream: fasta_hmmsearch_rank_fastas hardcoded write_domain to false. nf-core/modules#12772 added a save_domtblout take: parameter and a domain_summary emit, and is now merged, so this PR updates the vendored subworkflow and wires the option through.

Changes

  • Update fasta_hmmsearch_rank_fastas to 56521ad, the merge commit of Support save_domtblout in fasta_hmmsearch_rank_fastas modules#12772.
  • New --save_domtblout parameter (default false), passed as an explicit value from main.nf into PHYLOPLACE and on to FASTA_HMMSEARCH_RANK_FASTAS, per the pipeline's existing convention of not reading params.* below main.nf.
  • No publishing change was needed. HMMER_HMMSEARCH already declares path('*.domtbl.gz'), emit: domain_summary and gzips it, so the default publishDir in conf/modules.config lands it in results/hmmer/.
  • Docs: a ### Saving the per-domain hit table section in docs/usage.md, and the *.domtbl.gz output listed in docs/output.md. While there, corrected docs/output.md, which listed hmmsearch's human-readable output as *.tbl.gz, a duplicate of the line above it, rather than *.txt.gz.

Testing

conf/test_phylosearch_input.config now sets save_domtblout = true, so the existing pipeline test covers the new path end to end rather than adding another full pipeline run to CI. The trade-off is that the phylosearch path no longer has a test with the option off.

The table's footer embeds the work directory path and a run timestamp, so its content is never reproducible; hmmer/*.domtbl.gz is therefore added to tests/.nftignore and the snapshot records the filenames only. Verified stable by re-running the suite without --update-snapshot, not just recorded once.

Full nf-test test --profile=+docker suite passes (6/6). nf-core pipelines lint reports 0 failures. nextflow lint . is clean on 26.04.6; on the declared minimum 25.10.4 the one remaining error is pre-existing in the vendored utils_nextflow_pipeline subworkflow and untouched here.

Not included

Issue #69 also mentions SEQTK_SUBSEQ output filenames missing a separator (domain_16s.fnaarc.fa.gz). That comes from the vendored seqtk/subseq module building its output name as ${sequences}${prefix}.${ext}.gz, so it cannot be fixed from this pipeline with ext.prefix. It needs a fix in nf-core/modules and will be picked up in the next general module update here.

erikrikarddaniel and others added 2 commits August 24, 2026 11:35
Picks up nf-core/modules#12772, which adds a save_domtblout take parameter
and a domain_summary emit, so a calling pipeline can turn on hmmsearch's
--domtblout output.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PDswY3eJxbJ9xnWSCQFVRG
hmmsearch's per-sequence hit table carries no alignment coordinates, so
there was no way to work out how much of a profile a hit covers, or to
find a gene split over several adjacent ORFs where no single ORF covers
enough of the profile to be classified on its own. Those coordinates only
exist in the per-domain table, which the pipeline never wrote and which
could not be turned on from a config either.

--save_domtblout passes save_domtblout through to
FASTA_HMMSEARCH_RANK_FASTAS, which hands it to HMMER_HMMSEARCH as its
write_domain flag. No publishing change is needed: the module already
declares path('*.domtbl.gz') and the default publishDir puts it in
results/hmmer/.

The test_phylosearch_input profile now sets the option so the existing
pipeline test covers it. The table's footer embeds the work directory
path and a run timestamp, so its content is never reproducible and it is
added to tests/.nftignore; the snapshot records the filenames only.

Also corrects docs/output.md, which listed hmmsearch's human-readable
output as *.tbl.gz, a duplicate of the line above it, rather than
*.txt.gz.

Closes nf-core#69

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PDswY3eJxbJ9xnWSCQFVRG
@github-actions

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 6cd0d64

+| ✅ 228 tests passed       |+
#| ❔  10 tests were ignored |#
!| ❗   1 tests had warnings |!
Details

❗ Test warnings:

❔ Tests ignored:

  • files_exist - File is ignored: conf/igenomes.config
  • files_exist - File is ignored: conf/igenomes_ignored.config
  • files_exist - File is ignored: .github/workflows/linting_comment.yml
  • nextflow_config - Config variable ignored: params.input
  • files_unchanged - File ignored due to lint config: .gitattributes
  • files_unchanged - File ignored due to lint config: .github/workflows/branch.yml
  • files_unchanged - File ignored due to lint config: .github/workflows/linting.yml
  • files_unchanged - File ignored due to lint config: assets/nf-core-phyloplace_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-phyloplace_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-phyloplace_logo_dark.png

✅ Tests passed:

Run details

  • nf-core/tools version 4.1.0
  • Run at 2026-08-24 09:38:17

@erikrikarddaniel
erikrikarddaniel marked this pull request as ready for review August 24, 2026 09:48

@dialvarezs dialvarezs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@erikrikarddaniel
erikrikarddaniel merged commit bc6949a into nf-core:dev Aug 24, 2026
19 checks passed
@erikrikarddaniel
erikrikarddaniel deleted the save-domtblout-69 branch August 24, 2026 12:27
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.

2 participants