nf-core / nf-core/modules

Multiple samtools modules use task.cpus-1 without checking for lower boundary

Open
#3,654 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Nextflow
Stars
429
Forks
1.1k
Avg merge
1d 6h
Merged PRs (30d)
153

Description

Have you checked the docs?
Description of the bug

Multiple samtools modules (e.g. depth, index, merge) decrease the task.cpus variable by 1 to set the number of threads. This leads to an invalid setting when using the module for a single core job. I can't see a reason why this is done, as it only makes sense when multiple commands are executed in a pipe, which is not the case here.

Command used and terminal output

No response

Relevant files

No response

System information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by searching the samtools depth, index, and merge module definitions for task.cpus-1 and compare how each module sets threads. Run the relevant module checks, including the single-core case; done means those modules no longer produce an invalid thread setting for one CPU.

Written by the indexing model from the issue text.

Assessment

Domain
bioinformatics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.