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 1 commit
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
8 changes: 5 additions & 3 deletions tasks/src/main/scala/dagr/tasks/bwa/BwaMem.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ class BwaMem(fastq: PathToFastq = Io.StdIn,
basesPerBatch: Option[Int] = None,
minThreads: Int = 1,
maxThreads: Int = 32,
memory: Memory = Memory("8G")
) extends ProcessTask with VariableResources with Pipe[Fastq,Sam] {
memory: Memory = Memory("8G"),
outputAllAlignments: Boolean = false
) 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
}
}
}