memory: {description: "The amount of memory this job will use.", category: "advanced"}
compressionLevel: {description: "Compression level from 0 (uncompressed) to 9 (best).", category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", 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"}
}
}
task Stats {
input {
File inputVcf
...
...
@@ -313,3 +275,47 @@ task Stats {
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
String outputType = if compressionLevel > 0 then "z" else "v"
Boolean indexing = if compressionLevel > 0 then true else false
command {
set -e
mkdir -p "$(dirname ~{outputPath})"
bcftools view \
-o ~{outputPath} \
-l ~{compressionLevel} \
-O ~{outputType} \
~{inputFile}
~{if indexing then 'bcftools index --tbi ~{outputPath}' else ''}
}
output {
File outputVcf = outputPath
File? outputVcfIndex = outputPath + ".tbi"
}
runtime {
memory: memory
time_minutes: timeMinutes
docker: dockerImage
}
parameter_meta {
inputFile: {description: "A vcf or bcf file.", category: "required"}
outputPath: {description: "The location the output VCF file should be written.", category: "common"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", 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"}