Skip to content
Snippets Groups Projects
Commit 06cf90cb authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Change bwa to bwa-mem

parent 24837f5b
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ class Carp(val root: Configurable) extends QScript with MultiSampleQScript with
def this() = this(null)
override def defaults = ConfigUtils.mergeMaps(Map(
"mapping" -> Map("skip_markduplicates" -> true, "aligner" -> "bwa")
"mapping" -> Map("skip_markduplicates" -> true, "aligner" -> "bwa-mem")
), super.defaults)
def summaryFile = new File(outputDir, "Carp.summary.json")
......
......@@ -57,7 +57,7 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
protected var skipMetrics: Boolean = config("skip_metrics", default = false)
/** Aligner */
protected var aligner: String = config("aligner", default = "bwa")
protected var aligner: String = config("aligner", default = "bwa-mem")
/** Number of chunks, when not defined pipeline will automatic calculate number of chunks */
protected var numberChunks: Option[Int] = config("number_chunks")
......@@ -209,7 +209,7 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
val outputBam = new File(chunkDir, outputName + ".bam")
bamFiles :+= outputBam
aligner match {
case "bwa" => addBwaMem(R1, R2, outputBam, deps)
case "bwa-mem" => addBwaMem(R1, R2, outputBam, deps)
case "bwa-aln" => addBwaAln(R1, R2, outputBam, deps)
case "bowtie" => addBowtie(R1, R2, outputBam, deps)
case "gsnap" => addGsnap(R1, R2, outputBam, deps)
......
......@@ -47,7 +47,7 @@ class MappingTest extends TestNGSuite with Matchers {
@DataProvider(name = "mappingOptions")
def mappingOptions = {
val aligners = Array("bwa", "bwa-aln", "star", "star-2pass", "bowtie", "stampy", "gsnap", "tophat")
val aligners = Array("bwa-mem", "bwa-aln", "star", "star-2pass", "bowtie", "stampy", "gsnap", "tophat")
val paired = Array(true, false)
val chunks = Array(1, 5, 10, 100)
val skipMarkDuplicates = Array(true, false)
......@@ -99,7 +99,7 @@ class MappingTest extends TestNGSuite with Matchers {
mapping.functions.count(_.isInstanceOf[Gzip]) shouldBe (if (skipFlexiprep) 0 else if (paired) 2 else 1)
//aligners
mapping.functions.count(_.isInstanceOf[BwaMem]) shouldBe ((if (aligner == "bwa") 1 else 0) * chunks)
mapping.functions.count(_.isInstanceOf[BwaMem]) shouldBe ((if (aligner == "bwa-mem") 1 else 0) * chunks)
mapping.functions.count(_.isInstanceOf[BwaAln]) shouldBe ((if (aligner == "bwa-aln") (if (paired) 2 else 1) else 0) * chunks)
mapping.functions.count(_.isInstanceOf[BwaSampe]) shouldBe ((if (aligner == "bwa-aln") (if (paired) 1 else 0) else 0) * chunks)
mapping.functions.count(_.isInstanceOf[BwaSamse]) shouldBe ((if (aligner == "bwa-aln") (if (paired) 0 else 1) else 0) * chunks)
......@@ -109,7 +109,7 @@ class MappingTest extends TestNGSuite with Matchers {
// Sort sam or replace readgroup
val sort = aligner match {
case "bwa" | "bwa-aln" | "stampy" => "sortsam"
case "bwa-mem" | "bwa-aln" | "stampy" => "sortsam"
case "star" | "star-2pass" | "bowtie" | "gsnap" | "tophat" => "replacereadgroups"
case _ => throw new IllegalArgumentException("aligner: " + aligner + " does not exist")
}
......
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