Skip to content
Snippets Groups Projects
Commit 2b183db6 authored by Ruben Vorderman's avatar Ruben Vorderman
Browse files

remove redundant inputs

parent 8ec3976c
No related branches found
No related tags found
1 merge request!90Move all picard tasks to containers.
......@@ -4,9 +4,6 @@ import "common.wdl"
task BedToIntervalList {
input {
String? preCommand
File? picardJar
File bedFile
File dict
String outputPath
......@@ -17,15 +14,10 @@ task BedToIntervalList {
String dockerTag = "2.18.26--0"
}
String toolCommand = if defined(picardJar)
then "java -Xmx" + memory + "G -jar " + picardJar
else "picard -Xmx" + memory + "G"
command {
set -e -o pipefail
mkdir -p $(dirname "~{outputPath}")
~{preCommand}
~{toolCommand} \
picard -Xmx~{memory}G \
BedToIntervalList \
I=~{bedFile} \
O=~{outputPath} \
......@@ -44,7 +36,6 @@ task BedToIntervalList {
task CollectMultipleMetrics {
input {
String? preCommand
IndexedBamFile bamFile
Reference reference
String basename
......@@ -59,22 +50,16 @@ task CollectMultipleMetrics {
Boolean collectSequencingArtifactMetrics = true
Boolean collectQualityYieldMetrics = true
String? picardJar
Int memory = 4
Float memoryMultiplier = 3.0
String dockerTag = "2.18.26--0"
}
String toolCommand = if defined(picardJar)
then "java -Xmx" + memory + "G -jar " + picardJar
else "picard -Xmx" + memory + "G"
command {
set -e -o pipefail
mkdir -p $(dirname "~{basename}")
~{preCommand}
~{toolCommand} \
picard -Xmx~{memory}G \
CollectMultipleMetrics \
I=~{bamFile.file} \
R=~{reference.fasta} \
......@@ -120,28 +105,21 @@ task CollectMultipleMetrics {
task CollectRnaSeqMetrics {
input {
String? preCommand
IndexedBamFile bamFile
File refRefflat
String basename
String strandSpecificity = "NONE"
String? picardJar
Int memory = 4
Float memoryMultiplier = 3.0
String dockerTag = "2.18.26--0"
}
String toolCommand = if defined(picardJar)
then "java -Xmx" + memory + "G -jar " + picardJar
else "picard -Xmx" + memory + "G"
command {
set -e -o pipefail
mkdir -p $(dirname "~{basename}")
~{preCommand}
~{toolCommand} \
picard -Xmx~{memory}G \
CollectRnaSeqMetrics \
I=~{bamFile.file} \
O=~{basename}.RNA_Metrics \
......@@ -163,29 +141,22 @@ task CollectRnaSeqMetrics {
task CollectTargetedPcrMetrics {
input {
String? preCommand
IndexedBamFile bamFile
Reference reference
File ampliconIntervals
Array[File]+ targetIntervals
String basename
String? picardJar
Int memory = 4
Float memoryMultiplier = 3.0
String dockerTag = "2.18.26--0"
}
String toolCommand = if defined(picardJar)
then "java -Xmx" + memory + "G -jar " + picardJar
else "picard -Xmx" + memory + "G"
command {
set -e -o pipefail
mkdir -p $(dirname "~{basename}")
~{preCommand}
~{toolCommand} \
picard -Xmx~{memory}G \
CollectTargetedPcrMetrics \
I=~{bamFile.file} \
R=~{reference.fasta} \
......@@ -211,25 +182,18 @@ task CollectTargetedPcrMetrics {
# Combine multiple recalibrated BAM files from scattered ApplyRecalibration runs
task GatherBamFiles {
input {
String? preCommand
Array[File]+ inputBams
Array[File]+ inputBamsIndex
String outputBamPath
String? picardJar
Int memory = 4
Float memoryMultiplier = 3.0
String dockerTag = "2.18.26--0"
}
String toolCommand = if defined(picardJar)
then "java -Xmx" + memory + "G -jar " + picardJar
else "picard -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
picard -Xmx~{memory}G \
GatherBamFiles \
INPUT=~{sep=' INPUT=' inputBams} \
OUTPUT=~{outputBamPath} \
......@@ -253,25 +217,18 @@ task GatherBamFiles {
task GatherVcfs {
input {
String? preCommand
Array[File]+ inputVcfs
Array[File]+ inputVcfIndexes
String outputVcfPath
String? picardJar
Int memory = 4
Float memoryMultiplier = 3.0
String dockerTag = "2.18.26--0"
}
String toolCommand = if defined(picardJar)
then "java -Xmx" + memory + "G -jar " + picardJar
else "picard -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
picard -Xmx~{memory}G \
GatherVcfs \
INPUT=~{sep=' INPUT=' inputVcfs} \
OUTPUT=~{outputVcfPath}
......@@ -290,12 +247,10 @@ task GatherVcfs {
# Mark duplicate reads to avoid counting non-independent observations
task MarkDuplicates {
input {
String? preCommand
Array[File]+ inputBams
Array[File] inputBamIndexes
String outputBamPath
String metricsPath
String? picardJar
Int memory = 4
Float memoryMultiplier = 3.0
......@@ -311,15 +266,10 @@ task MarkDuplicates {
# This works because the output of BWA is query-grouped and therefore, so is the output of MergeBamAlignment.
# While query-grouped isn't actually query-sorted, it's good enough for MarkDuplicates with ASSUME_SORT_ORDER="queryname"
String toolCommand = if defined(picardJar)
then "java -Xmx" + memory + "G -jar " + picardJar
else "picard -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
mkdir -p $(dirname ~{outputBamPath})
~{toolCommand} \
picard -Xmx~{memory}G \
MarkDuplicates \
INPUT=~{sep=' INPUT=' inputBams} \
OUTPUT=~{outputBamPath} \
......@@ -351,12 +301,10 @@ task MarkDuplicates {
# Combine multiple VCFs or GVCFs from scattered HaplotypeCaller runs
task MergeVCFs {
input {
String? preCommand
Array[File]+ inputVCFs
Array[File]+ inputVCFsIndexes
String outputVcfPath
Int? compressionLevel
String? picardJar
Int memory = 4
Float memoryMultiplier = 3.0
......@@ -366,14 +314,9 @@ task MergeVCFs {
# Using MergeVcfs instead of GatherVcfs so we can create indices
# See https://github.com/broadinstitute/picard/issues/789 for relevant GatherVcfs ticket
String toolCommand = if defined(picardJar)
then "java -Xmx" + memory + "G -jar " + picardJar
else "picard -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
picard -Xmx~{memory}G \
MergeVcfs \
INPUT=~{sep=' INPUT=' inputVCFs} \
OUTPUT=~{outputVcfPath}
......@@ -394,26 +337,19 @@ task MergeVCFs {
task SamToFastq {
input {
String? preCommand
IndexedBamFile inputBam
String outputRead1
String? outputRead2
String? outputUnpaired
String? picardJar
Int memory = 16 # High memory default to avoid crashes.
Float memoryMultiplier = 3.0
String dockerTag = "2.18.26--0"
}
String toolCommand = if defined(picardJar)
then "java -Xmx" + memory + "G -jar " + picardJar
else "picard -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
picard -Xmx~{memory}G \
SamToFastq \
I=~{inputBam.file} \
~{"FASTQ=" + outputRead1} \
......@@ -436,25 +372,18 @@ task SamToFastq {
task ScatterIntervalList {
input {
String? preCommand
File interval_list
Int scatter_count
String? picardJar
Int memory = 4
Float memoryMultiplier = 3.0
String dockerTag = "2.18.26--0"
}
String toolCommand = if defined(picardJar)
then "java -Xmx" + memory + "G -jar " + picardJar
else "picard -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
mkdir scatter_list
~{toolCommand} \
picard -Xmx~{memory}G \
IntervalListTools \
SCATTER_COUNT=~{scatter_count} \
SUBDIVISION_MODE=BALANCING_WITHOUT_INTERVAL_SUBDIVISION_WITH_OVERFLOW \
......@@ -477,26 +406,19 @@ task ScatterIntervalList {
task SortVcf {
input {
String? preCommand
String? picardJar
Array[File]+ vcfFiles
String outputVcfPath
File? dict
Int memory = 4
Float memoryMultiplier = 3.0
}
String dockerTag = "2.18.26--0"
}
String toolCommand = if defined(picardJar)
then "java -Xmx" + memory + "G -jar " + picardJar
else "picard -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
picard -Xmx~{memory}G \
SortVcf \
I=~{sep=" I=" vcfFiles} \
~{"SEQUENCE_DICTIONARY=" + dict} \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment