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

remove pipeline specific command from samtools.wdl

parent 05a55103
No related branches found
No related tags found
2 merge requests!9Changes for virus assembly pipeline,!10Extra tasks required for assembly.
......@@ -83,7 +83,7 @@ task mem {
INPUT=/dev/stdin OUTPUT=${outputFile}
}
output {
File samFile = select_first([outputFile])
File alignedFile = select_first([outputFile])
}
runtime {
cpu: select_first([threads])
......
task getContigMostCoverage {
String? preCommand
File bamFile
String? outputFilePath = "mostCoveredContig.bam"
command <<<
set -e -o pipefail
${preCommand}
samtools view -hb wgs1.bam $( \
samtools idxstats wgs1.bam \
| grep -ve "^\*" \
| awk '{ print $1"\t"($3/$2)}' \
| sort -rnk2 \
| head -n 1 \
| cut -f1) \
> ${outputFilePath}
samtools index ${outputFilePath}
>>>
output {
File contig = outputFilePath
}
parameter_meta {
preCommand: "This command is run before running the samtools command. Can be used to set up environments such as conda."
bamFile: "Must be a sorted BAM file with an index"
outputFilePath: "where the output file is stored"
}
}
\ No newline at end of file
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