Skip to content

Commit 084486c

Browse files
committed
Add pbmm2 outputPrefix parameter
1 parent fff0fe8 commit 084486c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ that users understand how the changes affect the new version.
1010

1111
version 6.0.0-dev
1212
---------------------------
13+
+ Allow pbmm2 to work with a set output prefix for the BAM file.
14+
+ Update pbmm2 docker container to version 1.17
1315
+ Add VEP task.
1416
+ Add Sequali task.
1517
+ Add Clair3 task.

pbmm2.wdl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ task Mapping {
2525
String presetOption
2626
Boolean sort=true
2727
String sample
28+
String outputPrefix = sample + ".align"
2829
File referenceMMI
2930
File queryFile
3031

@@ -35,19 +36,21 @@ task Mapping {
3536
}
3637

3738
command {
39+
set -e
40+
mkdir -p ~{outputPrefix}
3841
pbmm2 align \
3942
--preset ~{presetOption} \
4043
~{true="--sort" false="" sort} \
4144
-j ~{cores} \
4245
~{referenceMMI} \
4346
~{queryFile} \
4447
--sample ~{sample} \
45-
~{sample}.align.bam
48+
~{outputPrefix}.bam
4649
}
4750

4851
output {
49-
File outputAlignmentFile = sample + ".align.bam"
50-
File outputIndexFile = sample + ".align.bam.bai"
52+
File outputAlignmentFile = outputPrefix + ".bam"
53+
File outputIndexFile = outputPrefix + ".bam.bai"
5154
}
5255

5356
runtime {
@@ -62,14 +65,15 @@ task Mapping {
6265
presetOption: {description: "This option applies multiple options at the same time.", category: "required"}
6366
sort: {description: "Sort the output bam file.", category: "advanced"}
6467
sample: {description: "Name of the sample.", category: "required"}
68+
outputPrefix: {description: "The prefix of the output filename before the .bam extension." category: "advanced"}
6569
referenceMMI: {description: "MMI file for the reference.", category: "required"}
6670
queryFile: {description: "BAM file with reads to align against the reference.", category: "required"}
6771
cores: {description: "The number of cores to be used.", category: "advanced"}
6872
memory: {description: "The amount of memory available to the job.", category: "advanced"}
6973
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
7074
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.", category: "advanced"}
7175

72-
# outputs
76+
# output
7377
outputAlignmentFile: {description: "Mapped bam file."}
7478
outputIndexFile: {description: "Bam index file."}
7579
}

0 commit comments

Comments
 (0)