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

small fixes

parent 2d5d02f2
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ version 1.0
task Bowtie {
input {
Array[File]+ readsUpstream
Array[File]+? readsDownstream
Array[File] readsDownstream = []
String outputPath = "mapped.bam"
Array[File]+ indexFiles
Int? seedmms
......@@ -59,7 +59,7 @@ task Bowtie {
~{"--sam-RG '" + samRG}~{true="'" false="" defined(samRG)} \
~{sub(indexFiles[0], "(\.rev)?\.[0-9]\.ebwt$", "")} \
~{true="-1" false="" defined(readsDownstream)} ~{sep="," readsUpstream} \
~{true="-2" false="" defined(readsDownstream)} ~{sep="," readsDownstream} \
~{true="-2" false="" length(readsDownstream) > 0} ~{sep="," readsDownstream} \
| picard -Xmx~{picardMemory}G SortSam \
INPUT=/dev/stdin \
OUTPUT=~{outputPath} \
......
......@@ -4,8 +4,8 @@ task Cutadapt {
input {
File read1
File? read2
String read1output
String? read2output
String read1output = "cut_r1.fq.gz"
String? read2output = if defined(read2) then "cut_r2.fq.gz" else read2
String? format
Array[String]+? adapter
Array[String]+? front
......
......@@ -362,34 +362,36 @@ task MergeVCFs {
task SamToFastq {
input {
File inputBam
File inputBamIndex
String outputRead1
String? outputRead2
String? outputUnpaired
Boolean paired = true
Int memory = 16 # High memory default to avoid crashes.
Float memoryMultiplier = 3.0
String dockerTag = "2.18.26--0"
String dockerImage = "quay.io/biocontainers/picard:2.18.26--0"
File? NONE
}
String outputRead1 = basename(inputBam, "\.[bs]am") + "_R1.fastq.gz"
String outputRead2 = basename(inputBam, "\.[bs]am") + "_R2.fastq.gz"
String outputUnpaired = basename(inputBam, "\.[bs]am") + "_unpaired.fastq.gz"
command {
set -e
picard -Xmx~{memory}G \
SamToFastq \
I=~{inputBam} \
~{"FASTQ=" + outputRead1} \
~{"SECOND_END_FASTQ=" + outputRead2} \
~{"UNPAIRED_FASTQ=" + outputUnpaired}
~{if paired then "SECOND_END_FASTQ=" + outputRead2 else ""} \
~{if paired then "UNPAIRED_FASTQ=" + outputUnpaired else ""}
}
output {
File read1 = outputRead1
File? read2 = outputRead2
File? unpairedRead = outputUnpaired
File? read2 = if paired then outputRead2 else NONE
File? unpairedRead = if paired then outputUnpaired else NONE
}
runtime {
docker: "quay.io/biocontainers/picard:" + dockerTag
docker: dockerImage
memory: ceil(memory * memoryMultiplier)
}
}
......
......@@ -208,8 +208,8 @@ task View {
input {
File inFile
File? referenceFasta
String outputFileName
Boolean? outputBam
String outputFileName = if outputBam then "view.bam" else "view.sam"
Boolean outputBam = true
Boolean? uncompressedBamOutput
Int? includeFilter
Int? excludeFilter
......
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