Skip to content
Snippets Groups Projects
Unverified Commit 400d865d authored by Cats's avatar Cats Committed by GitHub
Browse files

Merge pull request #165 from biowdl/update_scripts

update scripts submodule
parents f17ce2e4 6271478e
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,10 @@ that users understand how the changes affect the new version.
version 2.2.0-dev
---------------------------
+ Removed unused inputs (trimPrimer and format) for cutadapt.
+ Various minor command tweaks to increase stability.
+ Fixed unused inputs in bedtools sort (inputs are now used).
+ Added miniwdl check to linting.
+ Update TALON default image to version 4.4.1.
version 2.1.0
......
......@@ -18,7 +18,7 @@ task CPAT {
# select_first is needed in order to convert the optional arrays to non-optionals.
command {
set -e
mkdir -p $(dirname ~{outFilePath})
mkdir -p "$(dirname ~{outFilePath})"
cpat.py \
--gene ~{gene} \
--outfile ~{outFilePath} \
......
......@@ -27,6 +27,7 @@ task Sort {
Boolean sizeD = false
Boolean chrThenSizeA = false
Boolean chrThenSizeD = false
Boolean chrThenScoreA = false
Boolean chrThenScoreD = false
File? g
File? faidx
......@@ -36,11 +37,14 @@ task Sort {
command {
set -e
mkdir -p $(dirname ~{outputBed})
mkdir -p "$(dirname ~{outputBed})"
bedtools sort \
-i ~{inputBed} \
~{true="-sizeA" false="" sizeA} \
~{true="-sizeD" false="" sizeD} \
~{true="-chrThenSizeA" false="" chrThenSizeA} \
~{true="-chrThenSizeD" false="" chrThenSizeD} \
~{true="-chrThenScoreA" false="" chrThenScoreA} \
~{true="-chrThenScoreD" false="" chrThenScoreD} \
~{"-g " + g} \
~{"-faidx" + faidx} \
......
......@@ -36,7 +36,7 @@ task InputConverter {
command <<<
set -e
mkdir -p $(dirname ~{outputFile})
mkdir -p "$(dirname ~{outputFile})"
biowdl-input-converter \
-o ~{outputFile} \
~{true="--skip-file-check" false="" skipFileCheck} \
......
......@@ -49,7 +49,7 @@ task Bowtie {
command {
set -e -o pipefail
mkdir -p $(dirname ~{outputPath})
mkdir -p "$(dirname ~{outputPath})"
bowtie -q \
--sam \
~{"--seedmms " + seedmms} \
......
......@@ -18,7 +18,7 @@ task Mem {
command {
set -e -o pipefail
mkdir -p $(dirname ~{outputPath})
mkdir -p "$(dirname ~{outputPath})"
bwa mem \
~{"-t " + threads} \
~{"-R '" + readgroup}~{true="'" false="" defined(readgroup)} \
......
......@@ -18,7 +18,7 @@ task CollectColumns {
command {
set -e
mkdir -p $(dirname ~{outputPath})
mkdir -p "$(dirname ~{outputPath})"
collect-columns \
~{outputPath} \
~{sep=" " inputTables} \
......
......@@ -57,7 +57,7 @@ task ConcatenateTextFiles {
command {
set -e -o pipefail
mkdir -p $(dirname ~{combinedFilePath})
mkdir -p "$(dirname ~{combinedFilePath})"
~{cmdPrefix} ~{sep=" " fileList} ~{cmdSuffix} > ~{combinedFilePath}
}
......@@ -82,7 +82,7 @@ task Copy {
command {
set -e
mkdir -p $(dirname ~{outputPath})
mkdir -p "$(dirname ~{outputPath})"
cp ~{true="-r" false="" recursive} ~{inputFile} ~{outputPath}
}
......@@ -121,7 +121,8 @@ task MapMd5 {
}
command {
cat ~{write_map(map)} | md5sum - | sed -e 's/ -//'
set -e -o pipefail
md5sum "~{write_map(map)}" | cut -f 1 -d ' '
}
output {
......@@ -166,7 +167,7 @@ task YamlToJson {
}
command {
set -e
mkdir -p $(dirname ~{outputJson})
mkdir -p "$(dirname ~{outputJson})"
python <<CODE
import json
import yaml
......
......@@ -6,7 +6,6 @@ task Cutadapt {
File? read2
String read1output = "cut_r1.fq.gz"
String? read2output
String? format
Array[String] adapter = []
Array[String] front = []
Array[String] anywhere = []
......@@ -49,7 +48,6 @@ task Cutadapt {
String? untrimmedPairedOutputPath
Boolean? colorspace
Boolean? doubleEncode
Boolean? trimPrimer
Boolean? stripF3
Boolean? maq
Boolean? bwa
......@@ -169,10 +167,6 @@ task Cutadapt {
description: "The name of the resulting second end fastq file.",
category: "common"
}
format: {
description: "Equivalent to cutadapt's --format option.",
category: "advanced"
}
adapter: {
description: "A list of 3' ligated adapter sequences to be cut from the given first or single end fastq file.",
category: "common"
......@@ -341,10 +335,6 @@ task Cutadapt {
description: "Equivalent to cutadapt's --double-encode flag.",
category: "advanced"
}
trimPrimer: {
description: "Equivalent to cutadapt's --trim-primer flag.",
category: "advanced"
}
stripF3: {
description: "Equivalent to cutadapt's --strip-f3 flag.",
category: "advanced"
......
......@@ -145,7 +145,9 @@ task GetConfiguration {
command <<<
set -e
fastqcDir=$(dirname $(readlink -f $(which fastqc)))
fastqcExe="$(command -v fastqc)"
fastqcPath="$(readlink -f $fastqcExe)"
fastqcDir="$(dirname $fastqcPath)"
mkdir Configuration
cp ${fastqcDir}/Configuration/adapter_list.txt Configuration/adapter_list.txt
cp ${fastqcDir}/Configuration/contaminant_list.txt Configuration/contaminant_list.txt
......
......@@ -38,7 +38,7 @@ task Fastqsplitter {
command <<<
set -e
for FILE in ~{sep=' ' outputPaths}
do mkdir -p $(dirname $FILE)
do mkdir -p "$(dirname $FILE)"
done
fastqsplitter \
~{"-c " + compressionLevel} \
......
......@@ -19,7 +19,7 @@ task ApplyBQSR {
command {
set -e
mkdir -p $(dirname ~{outputBamPath})
mkdir -p "$(dirname ~{outputBamPath})"
gatk --java-options -Xmx~{javaXmx} \
ApplyBQSR \
--create-output-bam-md5 \
......@@ -69,7 +69,7 @@ task BaseRecalibrator {
command {
set -e
mkdir -p $(dirname ~{recalibrationReportPath})
mkdir -p "$(dirname ~{recalibrationReportPath})"
gatk --java-options -Xmx~{javaXmx} \
BaseRecalibrator \
-R ~{referenceFasta} \
......@@ -108,7 +108,7 @@ task CombineGVCFs {
command {
set -e
mkdir -p $(dirname ~{outputPath})
mkdir -p "$(dirname ~{outputPath})"
gatk --java-options -Xmx~{javaXmx} \
CombineGVCFs \
-R ~{referenceFasta} \
......@@ -141,7 +141,7 @@ task GatherBqsrReports {
command {
set -e
mkdir -p $(dirname ~{outputReportPath})
mkdir -p "$(dirname ~{outputReportPath})"
gatk --java-options -Xmx~{javaXmx} \
GatherBQSRReports \
-I ~{sep=' -I ' inputBQSRreports} \
......@@ -177,7 +177,7 @@ task GenotypeGVCFs {
command {
set -e
mkdir -p $(dirname ~{outputPath})
mkdir -p "$(dirname ~{outputPath})"
gatk --java-options -Xmx~{javaXmx} \
GenotypeGVCFs \
-R ~{referenceFasta} \
......@@ -223,7 +223,7 @@ task HaplotypeCallerGvcf {
command {
set -e
mkdir -p $(dirname ~{gvcfPath})
mkdir -p "$(dirname ~{gvcfPath})"
gatk --java-options -Xmx~{javaXmx} \
HaplotypeCaller \
-R ~{referenceFasta} \
......@@ -271,7 +271,7 @@ task MuTect2 {
command {
set -e
mkdir -p $(dirname ~{outputVcf})
mkdir -p "$(dirname ~{outputVcf})"
gatk --java-options -Xmx~{javaXmx} \
Mutect2 \
-R ~{referenceFasta} \
......@@ -440,7 +440,7 @@ task FilterMutectCalls {
command {
set -e
mkdir -p $(dirname ~{outputVcf})
mkdir -p "$(dirname ~{outputVcf})"
gatk --java-options -Xmx~{javaXmx} \
FilterMutectCalls \
-R ~{referenceFasta} \
......@@ -485,7 +485,7 @@ task SplitNCigarReads {
command {
set -e
mkdir -p $(dirname ~{outputBam})
mkdir -p "$(dirname ~{outputBam})"
gatk --java-options -Xmx~{javaXmx} \
SplitNCigarReads \
-I ~{inputBam} \
......@@ -526,20 +526,19 @@ task CombineVariants {
command <<<
set -e
mkdir -p $(dirname "~{outputPath}")
mkdir -p "$(dirname ~{outputPath})"
# build "-V:<ID> <file.vcf>" arguments according to IDs and VCFs to merge
# Make sure commands are run in bash
bash -c '#!/usr/bin/env bash
set -eux
V_args=$(bash -c '
set -eu
ids=(~{sep=" " identifiers})
vars=(~{sep=" " variantVcfs})
V_args=$(
for (( i = 0; i < ${#ids[@]}; ++i ))
do
printf -- "-V:%s %s " "${ids[i]}" "${vars[i]}"
done
)
for (( i = 0; i < ${#ids[@]}; ++i ))
do
printf -- "-V:%s %s " "${ids[i]}" "${vars[i]}"
done
')
java -Xmx~{javaXmx} -jar ~{installDir}/GenomeAnalysisTK.jar \
-T CombineVariants \
-R ~{referenceFasta} \
......@@ -547,7 +546,6 @@ task CombineVariants {
--filteredrecordsmergetype ~{filteredRecordsMergeType} \
--out ~{outputPath} \
$V_args
'
>>>
output {
......
......@@ -31,8 +31,8 @@ task GffCompare {
File? noneFile # This is a wdl workaround. Please do not assign!
}
# This allows for the creation of output directories
String dirPrefix= if defined(outputDir)
then outputDir + "/"
String dirPrefix = if defined(outputDir)
then select_first([outputDir]) + "/"
else ""
String totalPrefix = dirPrefix + outPrefix
......
......@@ -24,7 +24,7 @@ task Hisat2 {
command {
set -e -o pipefail
mkdir -p $(dirname ~{outputBam})
mkdir -p "$(dirname ~{outputBam})"
hisat2 \
-p ~{threads} \
-x ~{sub(indexFiles[0], "\.[0-9]\.ht2", "")} \
......
......@@ -18,7 +18,7 @@ task HTSeqCount {
command {
set -e
mkdir -p $(dirname ~{outputTable})
mkdir -p "$(dirname ~{outputTable})"
htseq-count \
-f ~{format} \
-r ~{order} \
......
......@@ -37,7 +37,7 @@ task Indexing {
command {
set -e
mkdir -p $(dirname ~{outputPrefix})
mkdir -p "$(dirname ~{outputPrefix})"
minimap2 \
~{true="-H" false="" useHomopolymerCompressedKmer} \
~{"-k " + kmerSize} \
......@@ -116,7 +116,7 @@ task Mapping {
command {
set -e
mkdir -p $(dirname ~{outputPrefix})
mkdir -p "$(dirname ~{outputPrefix})"
minimap2 \
~{"-x " + presetOption} \
~{"-k " + kmerSize} \
......
......@@ -13,7 +13,7 @@ task BedToIntervalList {
command {
set -e
mkdir -p $(dirname "~{outputPath}")
mkdir -p "$(dirname ~{outputPath})"
picard -Xmx~{javaXmx} \
BedToIntervalList \
I=~{bedFile} \
......@@ -58,7 +58,7 @@ task CollectMultipleMetrics {
command {
set -e
mkdir -p $(dirname "~{basename}")
mkdir -p "$(dirname ~{basename})"
picard -Xmx~{javaXmx} \
CollectMultipleMetrics \
I=~{inputBam} \
......@@ -140,7 +140,7 @@ task CollectRnaSeqMetrics {
command {
set -e
mkdir -p $(dirname "~{basename}")
mkdir -p "$(dirname ~{basename})"
picard -Xmx~{javaXmx} \
CollectRnaSeqMetrics \
I=~{inputBam} \
......@@ -179,7 +179,7 @@ task CollectTargetedPcrMetrics {
command {
set -e
mkdir -p $(dirname "~{basename}")
mkdir -p "$(dirname ~{basename})"
picard -Xmx~{javaXmx} \
CollectTargetedPcrMetrics \
I=~{inputBam} \
......@@ -217,7 +217,7 @@ task GatherBamFiles {
command {
set -e
mkdir -p $(dirname ~{outputBamPath})
mkdir -p "$(dirname ~{outputBamPath})"
picard -Xmx~{javaXmx} \
GatherBamFiles \
INPUT=~{sep=' INPUT=' inputBams} \
......@@ -251,7 +251,7 @@ task GatherVcfs {
command {
set -e
mkdir -p $(dirname ~{outputVcfPath})
mkdir -p "$(dirname ~{outputVcfPath})"
picard -Xmx~{javaXmx} \
GatherVcfs \
INPUT=~{sep=' INPUT=' inputVcfs} \
......@@ -294,7 +294,7 @@ task MarkDuplicates {
command {
set -e
mkdir -p $(dirname ~{outputBamPath})
mkdir -p "$(dirname ~{outputBamPath})"
picard -Xmx~{javaXmx} \
MarkDuplicates \
INPUT=~{sep=' INPUT=' inputBams} \
......@@ -339,7 +339,7 @@ task MergeVCFs {
command {
set -e
mkdir -p $(dirname ~{outputVcfPath})
mkdir -p "$(dirname ~{outputVcfPath})"
picard -Xmx~{javaXmx} \
MergeVcfs \
INPUT=~{sep=' INPUT=' inputVCFs} \
......@@ -443,7 +443,7 @@ task SortVcf {
command {
set -e
mkdir -p $(dirname ~{outputVcfPath})
mkdir -p "$(dirname ~{outputVcfPath})"
picard -Xmx~{javaXmx} \
SortVcf \
I=~{sep=" I=" vcfFiles} \
......
cromwell
\ No newline at end of file
cromwell
miniwdl
\ No newline at end of file
......@@ -13,7 +13,7 @@ task BgzipAndIndex {
command {
set -e
mkdir -p $(dirname ~{outputGz})
mkdir -p "$(dirname ~{outputGz})"
bgzip -c ~{inputFile} > ~{outputGz}
tabix ~{outputGz} -p ~{type}
}
......@@ -45,7 +45,7 @@ task Index {
# Make sure outputBamPath does not exist.
if [ ! -f ~{outputPath} ]
then
mkdir -p $(dirname ~{outputPath})
mkdir -p "$(dirname ~{outputPath})"
ln ~{bamFile} ~{outputPath}
fi
samtools index ~{outputPath} ~{bamIndexPath}
......@@ -74,7 +74,7 @@ task Merge {
command {
set -e
mkdir -p $(dirname ~{outputBamPath})
mkdir -p "$(dirname ~{outputBamPath})"
samtools merge ~{true="-f" false="" force} ~{outputBamPath} ~{sep=' ' bamFiles}
samtools index ~{outputBamPath} ~{indexPath}
}
......@@ -99,7 +99,7 @@ task SortByName {
command {
set -e
mkdir -p $(dirname ~{outputBamPath})
mkdir -p "$(dirname ~{outputBamPath})"
samtools sort -n ~{bamFile} -o ~{outputBamPath}
}
......@@ -122,7 +122,7 @@ task Markdup {
command {
set -e
mkdir -p $(dirname ~{outputBamPath})
mkdir -p "$(dirname ~{outputBamPath})"
samtools markdup ~{inputBam} ~{outputBamPath}
}
......@@ -145,7 +145,7 @@ task Flagstat {
command {
set -e
mkdir -p $(dirname ~{outputPath})
mkdir -p "$(dirname ~{outputPath})"
samtools flagstat ~{inputBam} > ~{outputPath}
}
......@@ -224,7 +224,7 @@ task Tabix {
# FIXME: It is better to do the indexing on VCF creation. Not in a separate task. With file localization this gets hairy fast.
command {
set -e
mkdir -p $(dirname ~{outputFilePath})
mkdir -p "$(dirname ~{outputFilePath})"
if [ ! -f ~{outputFilePath} ]
then
ln ~{inputFile} ~{outputFilePath}
......@@ -262,7 +262,7 @@ task View {
# Always output to bam and output header
command {
set -e
mkdir -p $(dirname ~{outputFileName})
mkdir -p "$(dirname ~{outputFileName})"
samtools view -b \
~{"-T " + referenceFasta} \
~{"-o " + outputFileName} \
......
Subproject commit 83bf72b91f6b9660f64dfa9d8096f6e57b167083
Subproject commit fc603e5d408b89b99297fb5737586c059c5f9df6
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