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

samtools to 1.0

parent 6b79eb1d
No related branches found
No related tags found
1 merge request!34Move all files to version 1.0
task Index {
String? preCommand
File bamFilePath
String? bamIndexPath
version 1.0
task Index {
input {
String? preCommand
File bamFilePath
String? bamIndexPath
}
command {
set -e -o pipefail
${preCommand}
samtools index ${bamFilePath} ${bamIndexPath}
~{preCommand}
samtools index ~{bamFilePath} ~{bamIndexPath}
}
output {
......@@ -15,14 +18,15 @@ task Index {
}
task Merge {
String? preCommand
Array[File]+ bamFiles
String outputBamPath
input {
String? preCommand
Array[File]+ bamFiles
String outputBamPath
}
command {
set -e -o pipefail
${preCommand}
samtools merge ${outputBamPath} ${sep=' ' bamFiles}
~{preCommand}
samtools merge ~{outputBamPath} ~{sep=' ' bamFiles}
}
output {
......@@ -31,14 +35,16 @@ task Merge {
}
task Markdup {
String? preCommand
File inputBam
String outputBamPath
input {
String? preCommand
File inputBam
String outputBamPath
}
command {
set -e -o pipefail
${preCommand}
samtools markdup ${inputBam} ${outputBamPath}
~{preCommand}
samtools markdup ~{inputBam} ~{outputBamPath}
}
output {
......@@ -47,15 +53,17 @@ task Markdup {
}
task Flagstat {
String? preCommand
File inputBam
String outputPath
input {
String? preCommand
File inputBam
String outputPath
}
command {
set -e -o pipefail
${preCommand}
mkdir -p $(dirname ${outputPath})
samtools flagstat ${inputBam} > ${outputPath}
~{preCommand}
mkdir -p $(dirname ~{outputPath})
samtools flagstat ~{inputBam} > ~{outputPath}
}
output {
......@@ -64,35 +72,37 @@ task Flagstat {
}
task fastq {
String? preCommand
File inputBam
String outputRead1
String? outputRead2
String? outputRead0
Int? includeFilter
Int? excludeFilter
Int? excludeSpecificFilter
Boolean? appendReadNumber
Boolean? outputQuality
Int? compressionLevel
Int? threads
Int? memory
Int totalThreads = select_first([threads, 1])
input {
String? preCommand
File inputBam
String outputRead1
String? outputRead2
String? outputRead0
Int? includeFilter
Int? excludeFilter
Int? excludeSpecificFilter
Boolean? appendReadNumber
Boolean? outputQuality
Int? compressionLevel
Int? threads
Int? memory
Int totalThreads = select_first([threads, 1])
}
command {
${preCommand}
~{preCommand}
samtools fastq \
${true="-1" false="-s" defined(outputRead2)} ${outputRead1} \
${"-2 " + outputRead2} \
${"-0 " + outputRead0} \
${"-f " + includeFilter} \
${"-F " + excludeFilter} \
${"-G " + excludeSpecificFilter} \
${true="-N" false="-n" appendReadNumber} \
${true="-O" false="" outputQuality} \
${"-c " + compressionLevel} \
${"--threads " + totalThreads} \
${inputBam}
~{true="-1" false="-s" defined(outputRead2)} ~{outputRead1} \
~{"-2 " + outputRead2} \
~{"-0 " + outputRead0} \
~{"-f " + includeFilter} \
~{"-F " + excludeFilter} \
~{"-G " + excludeSpecificFilter} \
~{true="-N" false="-n" appendReadNumber} \
~{true="-O" false="" outputQuality} \
~{"-c " + compressionLevel} \
~{"--threads " + totalThreads} \
~{inputBam}
}
output {
File read1 = outputRead1
......@@ -116,31 +126,33 @@ task fastq {
}
task view {
String? preCommand
File inFile
File? referenceFasta
String outputFileName
Boolean? outputBam
Boolean? uncompressedBamOutput
Int? includeFilter
Int? excludeFilter
Int? excludeSpecificFilter
Int? threads
Int? memory
input {
String? preCommand
File inFile
File? referenceFasta
String outputFileName
Boolean? outputBam
Boolean? uncompressedBamOutput
Int? includeFilter
Int? excludeFilter
Int? excludeSpecificFilter
Int? threads
Int? memory
}
command {
set -e -o pipefail
${preCommand}
~{preCommand}
samtools view \
${"-T " + referenceFasta} \
${"-o " + outputFileName} \
${true="-b " false="" outputBam} \
${true="-u " false="" uncompressedBamOutput} \
${"-f " + includeFilter} \
${"-F " + excludeFilter} \
${"-G " + excludeSpecificFilter} \
${"--threads " + threads - 1} \
${inFile}
~{"-T " + referenceFasta} \
~{"-o " + outputFileName} \
~{true="-b " false="" outputBam} \
~{true="-u " false="" uncompressedBamOutput} \
~{"-f " + includeFilter} \
~{"-F " + excludeFilter} \
~{"-G " + excludeSpecificFilter} \
~{"--threads " + threads - 1} \
~{inFile}
}
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