mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
remove cpu restrictions (#760)
Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
parent
22ec5c6007
commit
216dc8c984
5 changed files with 12 additions and 17 deletions
|
@ -29,7 +29,6 @@ process BOWTIE_ALIGN {
|
|||
tuple val(meta), path('*fastq.gz'), optional:true, emit: fastq
|
||||
|
||||
script:
|
||||
def split_cpus = Math.floor(task.cpus/2)
|
||||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def unaligned = params.save_unaligned ? "--un ${prefix}.unmapped.fastq" : ''
|
||||
|
@ -37,7 +36,7 @@ process BOWTIE_ALIGN {
|
|||
"""
|
||||
INDEX=`find -L ./ -name "*.3.ebwt" | sed 's/.3.ebwt//'`
|
||||
bowtie \\
|
||||
--threads ${split_cpus} \\
|
||||
--threads $task.cpus \\
|
||||
--sam \\
|
||||
-x \$INDEX \\
|
||||
-q \\
|
||||
|
@ -45,7 +44,7 @@ process BOWTIE_ALIGN {
|
|||
$options.args \\
|
||||
$endedness \\
|
||||
2> ${prefix}.out \\
|
||||
| samtools view $options.args2 -@ ${split_cpus} -bS -o ${prefix}.bam -
|
||||
| samtools view $options.args2 -@ $task.cpus -bS -o ${prefix}.bam -
|
||||
|
||||
if [ -f ${prefix}.unmapped.fastq ]; then
|
||||
gzip ${prefix}.unmapped.fastq
|
||||
|
|
|
@ -29,7 +29,6 @@ process BOWTIE2_ALIGN {
|
|||
tuple val(meta), path('*fastq.gz'), optional:true, emit: fastq
|
||||
|
||||
script:
|
||||
def split_cpus = Math.floor(task.cpus/2)
|
||||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
if (meta.single_end) {
|
||||
|
@ -39,11 +38,11 @@ process BOWTIE2_ALIGN {
|
|||
bowtie2 \\
|
||||
-x \$INDEX \\
|
||||
-U $reads \\
|
||||
--threads $split_cpus \\
|
||||
--threads $task.cpus \\
|
||||
$unaligned \\
|
||||
$options.args \\
|
||||
2> ${prefix}.bowtie2.log \\
|
||||
| samtools view -@ ${split_cpus} $options.args2 -bhS -o ${prefix}.bam -
|
||||
| samtools view -@ $task.cpus $options.args2 -bhS -o ${prefix}.bam -
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
|
@ -60,11 +59,11 @@ process BOWTIE2_ALIGN {
|
|||
-x \$INDEX \\
|
||||
-1 ${reads[0]} \\
|
||||
-2 ${reads[1]} \\
|
||||
--threads $split_cpus \\
|
||||
--threads $task.cpus \\
|
||||
$unaligned \\
|
||||
$options.args \\
|
||||
2> ${prefix}.bowtie2.log \\
|
||||
| samtools view -@ ${split_cpus} $options.args2 -bhS -o ${prefix}.bam -
|
||||
| samtools view -@ $task.cpus $options.args2 -bhS -o ${prefix}.bam -
|
||||
|
||||
if [ -f ${prefix}.unmapped.fastq.1.gz ]; then
|
||||
mv ${prefix}.unmapped.fastq.1.gz ${prefix}.unmapped_1.fastq.gz
|
||||
|
|
|
@ -27,7 +27,6 @@ process BWA_MEM {
|
|||
path "versions.yml" , emit: version
|
||||
|
||||
script:
|
||||
def split_cpus = Math.floor(task.cpus/2)
|
||||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
|
||||
|
@ -37,10 +36,10 @@ process BWA_MEM {
|
|||
bwa mem \\
|
||||
$options.args \\
|
||||
$read_group \\
|
||||
-t $split_cpus \\
|
||||
-t $task.cpus \\
|
||||
\$INDEX \\
|
||||
$reads \\
|
||||
| samtools view $options.args2 -@ ${split_cpus} -bhS -o ${prefix}.bam -
|
||||
| samtools view $options.args2 -@ $task.cpus -bhS -o ${prefix}.bam -
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
|
|
|
@ -27,7 +27,6 @@ process BWAMEM2_MEM {
|
|||
path "versions.yml" , emit: version
|
||||
|
||||
script:
|
||||
def split_cpus = Math.floor(task.cpus/2)
|
||||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
|
||||
|
@ -38,10 +37,10 @@ process BWAMEM2_MEM {
|
|||
mem \\
|
||||
$options.args \\
|
||||
$read_group \\
|
||||
-t $split_cpus \\
|
||||
-t $task.cpus \\
|
||||
\$INDEX \\
|
||||
$reads \\
|
||||
| samtools view $options.args2 -@ ${split_cpus} -bhS -o ${prefix}.bam -
|
||||
| samtools view $options.args2 -@ $task.cpus -bhS -o ${prefix}.bam -
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
|
|
|
@ -27,7 +27,6 @@ process BWAMETH_ALIGN {
|
|||
path "versions.yml" , emit: version
|
||||
|
||||
script:
|
||||
def split_cpus = Math.floor(task.cpus/2)
|
||||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
|
||||
|
@ -37,10 +36,10 @@ process BWAMETH_ALIGN {
|
|||
bwameth.py \\
|
||||
$options.args \\
|
||||
$read_group \\
|
||||
-t ${split_cpus} \\
|
||||
-t $task.cpus \\
|
||||
--reference \$INDEX \\
|
||||
$reads \\
|
||||
| samtools view $options.args2 -@ ${split_cpus} -bhS -o ${prefix}.bam -
|
||||
| samtools view $options.args2 -@ $task.cpus -bhS -o ${prefix}.bam -
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
|
|
Loading…
Reference in a new issue