Commit ac61c9dd authored by Wai Yi Leung's avatar Wai Yi Leung
Browse files

Fix bowtie2 readgroup

parent 92bdf700
......@@ -116,7 +116,7 @@ class Bowtie2(val root: Configurable) extends BiopetCommandLineFunction with Ref
var no_sq: Boolean = config("no_sq", default = false)
var rg_id: Option[String] = config("rg_id")
var rg: Option[String] = config("rg")
var rg: List[String] = config("rg")
var omit_sec_seq: Boolean = config("omit_sec_seq", default = false)
......@@ -202,7 +202,7 @@ class Bowtie2(val root: Configurable) extends BiopetCommandLineFunction with Ref
conditional(no_head, "--no-head") +
conditional(no_sq, "--no-sq") +
optional("--rg-id", rg_id) +
optional("--rg", rg) +
repeat("--rg", rg)
conditional(omit_sec_seq, "--omit-sec-seq") +
/* Performance */
optional("--threads", threads) +
......
......@@ -441,6 +441,11 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
/** Add bowtie2 jobs **/
def addBowtie2(R1: File, R2: Option[File], output: File): File = {
val bowtie2 = new Bowtie2(this)
bowtie2.rg_id = Some(readgroupId)
bowtie2.rg +:= ("LB:" + libId.get)
bowtie2.rg +:= ("PL:" + platform)
bowtie2.rg +:= ("PU:" + platformUnit)
bowtie2.rg +:= ("SM:" + sampleId.get)
bowtie2.R1 = R1
if (paired) bowtie2.R2 = Some(R2.get)
val sortSam = new SortSam(this)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment