Skip to content
Snippets Groups Projects
Commit 7db21a64 authored by van den Berg's avatar van den Berg
Browse files

Add support for outputPrefix with or without folder

parent 37ba60dd
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ task ChunkedScatter {
input {
File inputFile
String prefix = "./scatter"
Boolean splitContigs = false
Int? chunkSize
Int? overlap
Int? minimumBasesPerFile
......@@ -40,6 +41,7 @@ task ChunkedScatter {
~{"-c " + chunkSize} \
~{"-o " + overlap} \
~{"-m " + minimumBasesPerFile} \
~{true="--split-contigs " false="" splitContigs} \
~{inputFile}
}
......@@ -108,6 +110,7 @@ task ScatterRegions {
splitContigs: {description: "If set, contigs are allowed to be split up over multiple files.", category: "advanced"}
scatterSizeMillions: {description: "Over how many million base pairs should be scattered.", category: "common"}
scatterSize: {description: "Overrides scatterSizeMillions with a smaller value if set.", category: "advanced"}
splitContigs: {description: "Allow contigs to be split during scattering.", category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
......
......@@ -58,6 +58,7 @@ task Lima {
command {
set -e
mkdir -p "$(dirname ~{outputPrefix})"
lima \
~{libraryDesignOptions[libraryDesign]} \
~{true="--score-full-pass" false="" scoreFullPass} \
......@@ -86,6 +87,15 @@ task Lima {
~{inputBamFile} \
~{barcodeFile} \
~{outputPrefix + ".bam"}
# copy the files with the default filename to the folder specified in
# outputPrefix.
if [ "~{basename(outputPrefix)}.json" != "~{outputPrefix}.json" ]; then
cp "~{basename(outputPrefix)}.json" "~{outputPrefix}.json"
cp "~{basename(outputPrefix)}.lima.counts" "~{outputPrefix}.lima.counts"
cp "~{basename(outputPrefix)}.lima.report" "~{outputPrefix}.lima.report"
cp "~{basename(outputPrefix)}.lima.summary" "~{outputPrefix}.lima.summary"
fi
}
output {
......
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