Skip to content

Add batch processing to InterProScan - #79

Open
olgabot wants to merge 6 commits into
devfrom
olgabot/interproscan-batches
Open

olgabot wants to merge 6 commits into
devfrom
olgabot/interproscan-batches

Conversation

@olgabot

@olgabot olgabot commented Feb 17, 2026 •

Copy link
Copy Markdown
Collaborator

PR checklist

This PR adds the option --interproscan_batch_size to allow you to run InterProScan on many proteins at a time. I was running this on a 60k proteome, and it created 60k InterProScan jobs, 1 per protein, which brought down the server. So this PR adds the option to run more proteins at once, which helps since InterProScan loads many gigabytes of databases for each job.

  • 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/proteinannotator branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (e.g. nf-test test */local --profile=~test,docker for all new local tests).
  • Check for unexpected warnings in debug mode (nf-test test */local --profile=~test,docker,debug).
  • 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).

@github-actions

github-actions Bot commented Feb 17, 2026 •

Copy link
Copy Markdown

Warning

Newer version of the nf-core template is available.

Your pipeline is using an old version of the nf-core template: 3.5.1.
Please update your pipeline to the latest version.

For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation.

@olgabot
olgabot changed the base branch from main to dev February 17, 2026 22:32
@github-actions

github-actions Bot commented Feb 17, 2026 •

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅

Posted for pipeline commit bb60f9a

+| ✅ 216 tests passed       |+
#| ❔   7 tests were ignored |#
Details

❔ Tests ignored:

  • files_exist - File is ignored: .github/workflows/ci.yml
  • files_exist - File is ignored: conf/igenomes.config
  • files_exist - File is ignored: conf/igenomes_ignored.config
  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md
  • files_unchanged - File ignored due to lint config: assets/nf-core-proteinannotator_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-proteinannotator_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-proteinannotator_logo_dark.png

✅ Tests passed:

Run details

  • nf-core/tools version 3.5.1
  • Run at 2026-02-19 21:38:13

…ches

# Conflicts:
#	ro-crate-metadata.json
#	tests/default.nf.test.snap
#	workflows/proteinannotator.nf
The FUNCTIONAL_ANNOTATION subworkflow test (newly added by the dev
merge) only passed 4 inputs, but the subworkflow now takes a 5th
param (interproscan_batch_size) for batch processing. Also refresh
default.nf.test.snap for the two l_arginase InterProScan checksums
that were stale relative to the merged pipeline state.
@github-actions

Copy link
Copy Markdown

Warning

Newer version of the nf-core template is available.

Your pipeline is using an old version of the nf-core template: 4.0.2.
Please update your pipeline to the latest version.

For more documentation on how to update your pipeline, please see the Synchronisation documentation.

@github-actions

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅

Posted for pipeline commit c70cd58

+| ✅ 224 tests passed       |+
#| ❔  11 tests were ignored |#
#| ❔   1 tests had warnings |#
Details

❔ Tests ignored:

  • files_exist - File is ignored: .github/workflows/ci.yml
  • 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
  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md
  • files_unchanged - File ignored due to lint config: .github/workflows/branch.yml
  • files_unchanged - File does not exist: .github/workflows/linting_comment.yml
  • files_unchanged - File ignored due to lint config: .github/workflows/linting.yml
  • files_unchanged - File ignored due to lint config: assets/nf-core-proteinannotator_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-proteinannotator_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-proteinannotator_logo_dark.png

❔ Tests fixed:

✅ Tests passed:

Run details

  • nf-core/tools version 4.0.2
  • Run at 2026-07-28 13:56:16

@vagkaratzas vagkaratzas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @olgabot, thanks for this. Batching InterProScan makes sense, since it's pinned to 1 CPU and a large proteome ends up as one very long job.

Heads-up: since you opened this, we found and fixed InterProScan silently ignoring the staged database, so it had been running against the small sample DB in the container:

  • nf-core/modules#13032: the interproscan module now uses the staged database (nf-core/modules#13009)
  • #115: pipeline fix. The default DB URL now matches the 5.59-91.0 container, the inner data/ folder of a release is passed on, and PIRSF is out of the default applications (#114)

A few things needed before this can go in:

  1. Rebase on dev. There are conflicts with #110, #111 and #115. The rebase should also drop the ro-crate-metadata.json changes and the older nf-test/Nextflow versions in the snapshot.
  2. Merge the batches back per sample. The schema help says results are concatenated, but nothing merges them yet. The TSV can be concatenated per original sample; XML/JSON/GFF3 can't be joined simply, so they need a decision (keep them per batch, or output TSV only when a sample is split).
  3. Don't rename unsplit samples. Only split when a sample has more sequences than batch_size, so small runs keep <id>/<id>.tsv and the current output paths don't change.
  4. Split in a process, e.g. nf-core seqkit/split2, instead of splitFasta inside flatMap. A process is cached, so -resume doesn't redo the split every time a later step fails.
  5. meta + [id: ..., original_id: ...] instead of meta.clone() and changing the copy.
  6. A test with batch_size smaller than the input, so more than one batch is actually run, plus docs/usage.md and a CHANGELOG entry.

We're aiming to release v1.2.0 within the week. Would you be able to update this in time for it, or would you prefer to target the next release? Either is fine, just let us know.

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