Skip to content
Snippets Groups Projects
Unverified Commit 6af3ca35 authored by Cats's avatar Cats Committed by GitHub
Browse files

Merge pull request #147 from biowdl/bwakit

Add bwakit task
parents 690aedb5 71b8929e
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ that users understand how the changes affect the new version.
version 1.1.0-dev
---------------------------
+ Added bwakit task
+ Minimap2: Add the option for --MD tag
+ TALON: Update average memory needs for main TALON process
......
......@@ -44,6 +44,99 @@ task Mem {
}
}
task Kit {
input {
File read1
File? read2
BwaIndex bwaIndex
String outputPrefix
String? readgroup
Boolean sixtyFour = false
Int threads = 2
Int sortThreads = 2
Int memory = 10
String dockerImage = "biocontainers/bwakit:v0.7.15_cv1"
}
command {
set -e
bwa mem \
-t ~{threads} \
~{"-R '" + readgroup}~{true="'" false="" defined(readgroup)} \
~{bwaIndex.fastaFile} \
~{read1} \
~{read2} \
2> ~{outputPrefix}.log.bwamem | \
k8 /opt/conda/bin/bwa-postalt.js \
-p ~{outputPrefix}.hla \
~{bwaIndex.fastaFile}~{true=".64.alt" false=".alt" sixtyFour} | \
samtools sort \
-@ ~{sortThreads} \
-m1G \
- \
-o ~{outputPrefix}.aln.bam
samtools index ~{outputPrefix}.aln.bam ~{outputPrefix}.aln.bai
}
output {
File outputBam = outputPrefix + ".aln.bam"
File outputBamIndex = outputPrefix + ".aln.bai"
}
runtime {
cpu: threads + sortThreads
memory: memory
docker: dockerImage
}
parameter_meta {
read1: {
description: "The first-end fastq file.",
category: "required"
}
read2: {
description: "The second-end fastq file.",
category: "common"
}
bwaIndex: {
description: "The BWA index, including a .alt file.",
category: "required"
}
outputPrefix: {
description: "The prefix of the output files, including any parent directories",
category: "required"
}
readgroup: {
description: "A readgroup identifier.",
category: "common"
}
sixtyFour: {
description: "Whether or not the index uses the '.64' suffixes.",
category: "common"
}
threads: {
description: "The number of threads to use for alignment.",
category: "advanced"
}
sortThreads: {
description: "The number of threads to use for sorting.",
category: "advanced"
}
memory: {
description: "The amount of memory this job will use.",
category: "advanced"
}
dockerImage: {
description: "The docker image used for this task. Changing this may result in errors which the developers may chose not to address.",
category: "advanced"
}
outputBam: "The produced BAM file."
outputBamIndex: "The index of the produced BAM file."
}
}
struct BwaIndex {
File fastaFile
Array[File] indexFiles
......
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