Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Add flag to allow for the output of all alignments in bwa mem. #380

Merged
merged 2 commits into from
Jul 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tasks/src/main/scala/dagr/tasks/bwa/BwaMem.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ class BwaMem(fastq: PathToFastq = Io.StdIn,
minScore: Option[Int] = None,
smartPairing: Boolean = true,
basesPerBatch: Option[Int] = None,
outputAllAlignments: Boolean = false,
minThreads: Int = 1,
maxThreads: Int = 32,
memory: Memory = Memory("8G")
) extends ProcessTask with VariableResources with Pipe[Fastq,Sam] {
) extends ProcessTask with VariableResources with Pipe[Fastq,Sam] {
name = "BwaMem"

override def pickResources(resources: ResourceSet): Option[ResourceSet] = {
Expand All @@ -58,6 +59,7 @@ class BwaMem(fastq: PathToFastq = Io.StdIn,
val buffer = ListBuffer[Any](Bwa.findBwa, "mem", "-t", resources.cores.toInt)

if (smartPairing) buffer.append("-p")
if (outputAllAlignments) buffer.append("-a")
minSeedLength.foreach(l => buffer.append("-k", l))
matchScore.foreach(s => buffer.append("-A", s))
mismatchPenalty.foreach(p => buffer.append("-B", p))
Expand All @@ -72,4 +74,4 @@ class BwaMem(fastq: PathToFastq = Io.StdIn,

buffer.toList
}
}
}