From d134e78a0aa14fef469e30c8d90006092c9f3a6b Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Mon, 18 Nov 2024 12:29:00 -0600 Subject: [PATCH] style: Run lsp format on a parabricks module For science --- modules/nf-core/parabricks/applybqsr/main.nf | 31 ++++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/modules/nf-core/parabricks/applybqsr/main.nf b/modules/nf-core/parabricks/applybqsr/main.nf index 38b2af002b8..0607a11d08a 100644 --- a/modules/nf-core/parabricks/applybqsr/main.nf +++ b/modules/nf-core/parabricks/applybqsr/main.nf @@ -1,8 +1,7 @@ process PARABRICKS_APPLYBQSR { - tag "$meta.id" + tag "${meta.id}" label 'process_high' label 'process_gpu' - container "nvcr.io/nvidia/clara/clara-parabricks:4.3.2-1" input: @@ -15,7 +14,7 @@ process PARABRICKS_APPLYBQSR { output: tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.bai"), emit: bai - path "versions.yml" , emit: versions + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -23,28 +22,28 @@ process PARABRICKS_APPLYBQSR { script: // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead." + error("Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead.") } def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def interval_command = intervals ? intervals.collect{"--interval-file $it"}.join(' ') : "" - def copy_index_command = bam_index ? "cp -L $bam_index `readlink -f $bam`.bai" : "" - def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' + def interval_command = intervals ? intervals.collect { "--interval-file ${it}" }.join(' ') : "" + def copy_index_command = bam_index ? "cp -L ${bam_index} `readlink -f ${bam}`.bai" : "" + def num_gpus = task.accelerator ? "--num-gpus ${task.accelerator.request}" : '' """ # parabricks complains when index is not a regular file in the same directory as the bam # copy the index to this path. - $copy_index_command + ${copy_index_command} pbrun \\ applybqsr \\ - --ref $fasta \\ - --in-bam $bam \\ - --in-recal-file $bqsr_table \\ - $interval_command \\ + --ref ${fasta} \\ + --in-bam ${bam} \\ + --in-recal-file ${bqsr_table} \\ + ${interval_command} \\ --out-bam ${prefix}.bam \\ - --num-threads $task.cpus \\ - $num_gpus \\ - $args + --num-threads ${task.cpus} \\ + ${num_gpus} \\ + ${args} cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -55,7 +54,7 @@ process PARABRICKS_APPLYBQSR { stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def interval_command = intervals ? intervals.collect{"--interval-file $it"}.join(' ') : "" + def interval_command = intervals ? intervals.collect { "--interval-file ${it}" }.join(' ') : "" """ touch ${prefix}.bam touch ${prefix}.bam.bai