The task.cpus parameter should allow passing of the nextflow config set number of cpus for a task to be passed into each command line or Rscript. Affected modules include those for kallisto, trimmomatic, sra, RNA-seq differential expression.
e.g
process INDEX {
input:
path transcriptome
output:
path 'index'
script:
"""
salmon index --threads $task.cpus -t $transcriptome -i index
"""
}
To view the number of cpus with squeue:
squeue -o"%.7i %.9P %.8j %.8u %.2t %.10M %.6D %C"