Commit a10e91cf authored by Peter van 't Hof's avatar Peter van 't Hof

Rename old Gears to GearsSingle

parent 8e1b1d70
......@@ -28,7 +28,7 @@ object BiopetExecutablePublic extends BiopetExecutable {
nl.lumc.sasc.biopet.pipelines.carp.Carp,
nl.lumc.sasc.biopet.pipelines.toucan.Toucan,
nl.lumc.sasc.biopet.pipelines.shiva.ShivaSvCalling,
nl.lumc.sasc.biopet.pipelines.gears.Gears
nl.lumc.sasc.biopet.pipelines.gears.GearsSingle
)
def pipelines: List[MainCommand] = List(
......
......@@ -28,7 +28,7 @@ import org.broadinstitute.gatk.queue.QScript
/**
* Created by wyleung
*/
class Gears(val root: Configurable) extends QScript with SummaryQScript with SampleLibraryTag {
class GearsSingle(val root: Configurable) extends QScript with SummaryQScript with SampleLibraryTag {
def this() = this(null)
@Input(doc = "R1 reads in FastQ format", shortName = "R1", required = false)
......@@ -66,7 +66,7 @@ class Gears(val root: Configurable) extends QScript with SummaryQScript with Sam
}
override def reportClass = {
val gears = new GearsReport(this)
val gears = new GearsSingleReport(this)
gears.outputDir = new File(outputDir, "report")
gears.summaryFile = summaryFile
sampleId.foreach(gears.args += "sampleId" -> _)
......@@ -155,4 +155,4 @@ class Gears(val root: Configurable) extends QScript with SummaryQScript with Sam
}
/** This object give a default main method to the pipelines */
object Gears extends PipelineCommand
\ No newline at end of file
object GearsSingle extends PipelineCommand
\ No newline at end of file
......@@ -18,11 +18,11 @@ package nl.lumc.sasc.biopet.pipelines.gears
import nl.lumc.sasc.biopet.core.report._
import nl.lumc.sasc.biopet.utils.config.Configurable
class GearsReport(val root: Configurable) extends ReportBuilderExtension {
def builder = GearsReport
class GearsSingleReport(val root: Configurable) extends ReportBuilderExtension {
def builder = GearsSingleReport
}
object GearsReport extends ReportBuilder {
object GearsSingleReport extends ReportBuilder {
// TODO: Add dustbin analysis (aggregated)
// TODO: Add alignment stats per sample for the dustbin analysis
......
......@@ -31,14 +31,14 @@ import org.scalatest.testng.TestNGSuite
import org.testng.annotations._
/**
* Test class for [[Gears]]
* Test class for [[GearsSingle]]
*
* Created by wyleung on 10/22/15.
*/
class GearsPipelineTest(val testset: String) extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): Gears = {
new Gears {
class GearsSingleTest(val testset: String) extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): GearsSingle = {
new GearsSingle {
override def configName = "gears"
override def globalConfig = new Config(map)
......@@ -67,16 +67,16 @@ class GearsPipelineTest(val testset: String) extends TestNGSuite with Matchers {
def testGears(testset: String, fromBam: Boolean, paired: Boolean,
hasOutputName: Boolean, hasFileExtension: Boolean) = {
val map = ConfigUtils.mergeMaps(Map(
"output_dir" -> GearsTest.outputDir
), Map(GearsTest.executables.toSeq: _*))
"output_dir" -> GearsSingleTest.outputDir
), Map(GearsSingleTest.executables.toSeq: _*))
val gears: Gears = initPipeline(map)
val gears: GearsSingle = initPipeline(map)
if (fromBam) {
gears.bamFile = if (hasFileExtension) Some(GearsTest.bam) else Some(GearsTest.bam_noext)
gears.bamFile = if (hasFileExtension) Some(GearsSingleTest.bam) else Some(GearsSingleTest.bam_noext)
} else {
gears.fastqR1 = if (hasFileExtension) Some(GearsTest.r1) else Some(GearsTest.r1_noext)
gears.fastqR2 = if (paired) if (hasFileExtension) Some(GearsTest.r2) else Some(GearsTest.r2_noext) else None
gears.fastqR1 = if (hasFileExtension) Some(GearsSingleTest.r1) else Some(GearsSingleTest.r1_noext)
gears.fastqR2 = if (paired) if (hasFileExtension) Some(GearsSingleTest.r2) else Some(GearsSingleTest.r2_noext) else None
}
if (hasOutputName)
gears.outputName = "test"
......@@ -106,11 +106,11 @@ class GearsPipelineTest(val testset: String) extends TestNGSuite with Matchers {
// remove temporary run directory all tests in the class have been run
@AfterClass def removeTempOutputDir() = {
FileUtils.deleteDirectory(GearsTest.outputDir)
FileUtils.deleteDirectory(GearsSingleTest.outputDir)
}
}
object GearsTest {
object GearsSingleTest {
val outputDir = Files.createTempDir()
new File(outputDir, "input").mkdirs()
......
......@@ -27,7 +27,7 @@ import nl.lumc.sasc.biopet.extensions.{ Gsnap, Tophat, _ }
import nl.lumc.sasc.biopet.pipelines.bammetrics.BamMetrics
import nl.lumc.sasc.biopet.pipelines.bamtobigwig.Bam2Wig
import nl.lumc.sasc.biopet.pipelines.flexiprep.Flexiprep
import nl.lumc.sasc.biopet.pipelines.gears.Gears
import nl.lumc.sasc.biopet.pipelines.gears.GearsSingle
import nl.lumc.sasc.biopet.pipelines.mapping.scripts.TophatRecondition
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
......@@ -259,7 +259,7 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
outputFiles += ("finalBamFile" -> finalBamFile.getAbsoluteFile)
if (config("unmapped_to_gears", default = false).asBoolean) {
val gears = new Gears(this)
val gears = new GearsSingle(this)
gears.bamFile = Some(finalBamFile)
gears.outputDir = new File(outputDir, "gears")
gears.init()
......
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