Skip to content
Snippets Groups Projects
Unverified Commit 4c9f70bd authored by Jasper's avatar Jasper Committed by GitHub
Browse files

Merge pull request #211 from biowdl/BIOWDL-420

BIOWDL-420: Replace mv command with cp.
parents b1717493 ff613d41
Branches BIOWDL-450
No related tags found
No related merge requests found
......@@ -10,6 +10,8 @@ that users understand how the changes affect the new version.
-->
version 3.1.0
---------------------------
+ Isoseq3: Remove cp commands and other bash magic, file naming is now solved by pipeline.
+ Lima: Replace mv command with cp.
+ Add WDL task for smoove (lumpy) sv-caller.
+ Default threads for BWA in bwa.Kit task: 4. Samtools sort in the
same task: 1. Output BAM compression level to 1.
......
......@@ -31,8 +31,8 @@ task CCS {
File subreadsFile
String outputPrefix
Int cores = 4
String memory = "10G"
Int cores = 2
String memory = "2G"
String dockerImage = "quay.io/biocontainers/pbccs:4.2.0--0"
}
......
......@@ -27,50 +27,35 @@ task Refine {
String logLevel = "WARN"
File inputBamFile
File primerFile
String outputPrefix
String outputDir
String outputNamePrefix
Int cores = 4
String memory = "10G"
Int cores = 2
String memory = "1G"
String dockerImage = "quay.io/biocontainers/isoseq3:3.3.0--0"
}
command <<<
set -e
mkdir -p "$(dirname ~{outputPrefix})"
# Create a unique output name base on the input bam file.
bamBasename="$(basename ~{inputBamFile})"
bamNewName="${bamBasename/fl/flnc}"
folderDirname="$(dirname ~{outputPrefix})"
combinedOutput="${folderDirname}/${bamNewName}"
mkdir -p "$(dirname ~{outputDir})"
isoseq3 refine \
--min-polya-length ~{minPolyAlength} \
~{true="--require-polya" false="" requirePolyA} \
--log-level ~{logLevel} \
--num-threads ~{cores} \
--log-file "${bamNewName}.stderr.log" \
--log-file "~{outputDir}/~{outputNamePrefix}.stderr.log" \
~{inputBamFile} \
~{primerFile} \
${bamNewName}
# Copy commands below are needed because naming schema for Refine output
# can not be correctly handled in the WDL output section.
cp "${bamNewName}" "${combinedOutput}"
cp "${bamNewName}.pbi" "${combinedOutput}.pbi"
cp "${bamNewName/bam/consensusreadset}.xml" "${combinedOutput/bam/consensusreadset}.xml"
cp "${bamNewName/bam/filter_summary}.json" "${combinedOutput/bam/filter_summary}.json"
cp "${bamNewName/bam/report}.csv" "${combinedOutput/bam/report}.csv"
cp "${bamNewName}.stderr.log" "${combinedOutput}.stderr.log"
"~{outputDir}/~{outputNamePrefix}.bam"
>>>
output {
Array[File] outputFLNCfile = glob("*.bam")
Array[File] outputFLNCindexFile = glob("*.bam.pbi")
Array[File] outputConsensusReadsetFile = glob("*.consensusreadset.xml")
Array[File] outputFilterSummaryFile = glob("*.filter_summary.json")
Array[File] outputReportFile = glob("*.report.csv")
Array[File] outputSTDERRfile = glob("*.stderr.log")
File outputFLNCfile = outputDir + "/" + outputNamePrefix + ".bam"
File outputFLNCindexFile = outputDir + "/" + outputNamePrefix + ".bam.pbi"
File outputConsensusReadsetFile = outputDir + "/" + outputNamePrefix + ".consensusreadset.xml"
File outputFilterSummaryFile = outputDir + "/" + outputNamePrefix + ".filter_summary.json"
File outputReportFile = outputDir + "/" + outputNamePrefix + ".report.csv"
File outputSTDERRfile = outputDir + "/" + outputNamePrefix + ".stderr.log"
}
runtime {
......@@ -86,7 +71,8 @@ task Refine {
logLevel: {description: "Set log level. Valid choices: (TRACE, DEBUG, INFO, WARN, FATAL).", category: "advanced"}
inputBamFile: {description: "BAM input file.", category: "required"}
primerFile: {description: "Barcode/primer fasta file.", category: "required"}
outputPrefix: {description: "Output directory path + output file prefix.", category: "required"}
outputDir: {description: "Output directory path.", category: "required"}
outputNamePrefix: {description: "Basename of the output files.", category: "required"}
cores: {description: "The number of cores to be used.", category: "advanced"}
memory: {description: "The amount of memory available to the job.", category: "advanced"}
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"}
......
......@@ -48,8 +48,8 @@ task Lima {
File barcodeFile
String outputPrefix
Int cores = 4
String memory = "10G"
Int cores = 2
String memory = "2G"
String dockerImage = "quay.io/biocontainers/lima:1.11.0--0"
}
......@@ -87,13 +87,13 @@ task Lima {
~{barcodeFile} \
~{basename(outputPrefix) + ".fl.bam"}
# Move commands below are needed because glob command does not find
# copy commands below are needed because glob command does not find
# multiple bam/bam.pbi/subreadset.xml files when not located in working
# directory.
mv "~{basename(outputPrefix)}.fl.json" "~{outputPrefix}.fl.json"
mv "~{basename(outputPrefix)}.fl.lima.counts" "~{outputPrefix}.fl.lima.counts"
mv "~{basename(outputPrefix)}.fl.lima.report" "~{outputPrefix}.fl.lima.report"
mv "~{basename(outputPrefix)}.fl.lima.summary" "~{outputPrefix}.fl.lima.summary"
cp "~{basename(outputPrefix)}.fl.json" "~{outputPrefix}.fl.json"
cp "~{basename(outputPrefix)}.fl.lima.counts" "~{outputPrefix}.fl.lima.counts"
cp "~{basename(outputPrefix)}.fl.lima.report" "~{outputPrefix}.fl.lima.report"
cp "~{basename(outputPrefix)}.fl.lima.summary" "~{outputPrefix}.fl.lima.summary"
}
output {
......
Subproject commit dfef7cb2555667126dc1751add414527240d71bc
Subproject commit b83da72b9b43b956a3062b78fb08044eb9fae464
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