Skip to content

Commit 3ab97fa

Browse files
committed
style: Run lsp format on a parabricks module
For science
1 parent f97c351 commit 3ab97fa

File tree

1 file changed

+15
-16
lines changed
  • modules/nf-core/parabricks/applybqsr

1 file changed

+15
-16
lines changed

modules/nf-core/parabricks/applybqsr/main.nf

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
process PARABRICKS_APPLYBQSR {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label 'process_high'
44
label 'process_gpu'
5-
65
container "nvcr.io/nvidia/clara/clara-parabricks:4.3.2-1"
76

87
input:
@@ -15,36 +14,36 @@ process PARABRICKS_APPLYBQSR {
1514
output:
1615
tuple val(meta), path("*.bam"), emit: bam
1716
tuple val(meta), path("*.bai"), emit: bai
18-
path "versions.yml" , emit: versions
17+
path "versions.yml", emit: versions
1918

2019
when:
2120
task.ext.when == null || task.ext.when
2221

2322
script:
2423
// Exit if running this module with -profile conda / -profile mamba
2524
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
26-
error "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead."
25+
error("Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead.")
2726
}
2827
def args = task.ext.args ?: ''
2928
def prefix = task.ext.prefix ?: "${meta.id}"
30-
def interval_command = intervals ? intervals.collect{"--interval-file $it"}.join(' ') : ""
31-
def copy_index_command = bam_index ? "cp -L $bam_index `readlink -f $bam`.bai" : ""
32-
def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : ''
29+
def interval_command = intervals ? intervals.collect { "--interval-file ${it}" }.join(' ') : ""
30+
def copy_index_command = bam_index ? "cp -L ${bam_index} `readlink -f ${bam}`.bai" : ""
31+
def num_gpus = task.accelerator ? "--num-gpus ${task.accelerator.request}" : ''
3332
"""
3433
# parabricks complains when index is not a regular file in the same directory as the bam
3534
# copy the index to this path.
36-
$copy_index_command
35+
${copy_index_command}
3736
3837
pbrun \\
3938
applybqsr \\
40-
--ref $fasta \\
41-
--in-bam $bam \\
42-
--in-recal-file $bqsr_table \\
43-
$interval_command \\
39+
--ref ${fasta} \\
40+
--in-bam ${bam} \\
41+
--in-recal-file ${bqsr_table} \\
42+
${interval_command} \\
4443
--out-bam ${prefix}.bam \\
45-
--num-threads $task.cpus \\
46-
$num_gpus \\
47-
$args
44+
--num-threads ${task.cpus} \\
45+
${num_gpus} \\
46+
${args}
4847
4948
cat <<-END_VERSIONS > versions.yml
5049
"${task.process}":
@@ -55,7 +54,7 @@ process PARABRICKS_APPLYBQSR {
5554
stub:
5655
def args = task.ext.args ?: ''
5756
def prefix = task.ext.prefix ?: "${meta.id}"
58-
def interval_command = intervals ? intervals.collect{"--interval-file $it"}.join(' ') : ""
57+
def interval_command = intervals ? intervals.collect { "--interval-file ${it}" }.join(' ') : ""
5958
"""
6059
touch ${prefix}.bam
6160
touch ${prefix}.bam.bai

0 commit comments

Comments
 (0)