Commit 77e40ed5 authored by bow's avatar bow
Browse files

Use MergeSamFiles for all merges

parent 6c7c75a7
......@@ -28,7 +28,7 @@ import nl.lumc.sasc.biopet.core._
import nl.lumc.sasc.biopet.core.config._
import nl.lumc.sasc.biopet.core.summary._
import nl.lumc.sasc.biopet.extensions.{ HtseqCount, Ln }
import nl.lumc.sasc.biopet.extensions.picard.{ CollectRnaSeqMetrics, GatherBamFiles, MergeSamFiles, SortSam }
import nl.lumc.sasc.biopet.extensions.picard.{ CollectRnaSeqMetrics, SortSam, MergeSamFiles }
import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsView
import nl.lumc.sasc.biopet.pipelines.mapping.Mapping
import nl.lumc.sasc.biopet.pipelines.gentrap.extensions.{ CustomVarScan, Pdflatex, RawBaseCounter }
......@@ -511,7 +511,7 @@ class Gentrap(val root: Configurable) extends QScript with MultiSampleQScript wi
case Some(r2j) => List(f1Job.output, r2j.output)
case None => List(f1Job.output)
}
val combineJob = makeCombineJob(perStrandFiles, createFile(".plus_strand.bam"), gather = true)
val combineJob = makeCombineJob(perStrandFiles, createFile(".plus_strand.bam"))
Option(StrandSeparationJobSet(f1Job, r2Job, combineJob))
......@@ -552,7 +552,7 @@ class Gentrap(val root: Configurable) extends QScript with MultiSampleQScript wi
case Some(r1j) => List(f2Job.output, r1j.output)
case None => List(f2Job.output)
}
val combineJob = makeCombineJob(perStrandFiles, createFile(".minus_strand.bam"), gather = true)
val combineJob = makeCombineJob(perStrandFiles, createFile(".minus_strand.bam"))
Option(StrandSeparationJobSet(f2Job, r1Job, combineJob))
......@@ -648,11 +648,11 @@ class Gentrap(val root: Configurable) extends QScript with MultiSampleQScript wi
job
}
/** Super type of Ln and MergeSamFile */
/** Super type of Ln and MergeSamFiles */
private type CombineFileFunction = QFunction { def output: File }
/** Ln or MergeSamFile job, depending on how many inputs are supplied */
private def makeCombineJob(inFiles: List[File], outFile: File, gather: Boolean = false,
private def makeCombineJob(inFiles: List[File], outFile: File,
mergeSortOrder: String = "coordinate"): CombineFileFunction = {
require(inFiles.nonEmpty, "At least one input files for combine job")
if (inFiles.size == 1) {
......@@ -660,11 +660,6 @@ class Gentrap(val root: Configurable) extends QScript with MultiSampleQScript wi
job.input = inFiles.head
job.output = outFile
job
} else if (gather) {
val job = new GatherBamFiles(qscript)
job.input = inFiles
job.output = outFile
job
} else {
val job = new MergeSamFiles(qscript)
job.input = inFiles
......
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