Commit b500ee16 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Style fixes

parent 5b535f49
......@@ -16,9 +16,9 @@
package nl.lumc.sasc.biopet.pipelines.kopisu
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.core.{PipelineCommand, Reference}
import nl.lumc.sasc.biopet.pipelines.kopisu.methods.{ConiferMethod, FreecMethod}
import nl.lumc.sasc.biopet.utils.{BamUtils, Logging}
import nl.lumc.sasc.biopet.core.{ PipelineCommand, Reference }
import nl.lumc.sasc.biopet.pipelines.kopisu.methods.{ ConiferMethod, FreecMethod }
import nl.lumc.sasc.biopet.utils.{ BamUtils, Logging }
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
......
......@@ -3,7 +3,7 @@ package nl.lumc.sasc.biopet.pipelines.kopisu.methods
import java.io.File
import nl.lumc.sasc.biopet.extensions.Ln
import nl.lumc.sasc.biopet.extensions.conifer.{ConiferAnalyze, ConiferCall, ConiferRPKM}
import nl.lumc.sasc.biopet.extensions.conifer.{ ConiferAnalyze, ConiferCall, ConiferRPKM }
import nl.lumc.sasc.biopet.utils.config.Configurable
/**
......@@ -23,13 +23,14 @@ class ConiferMethod(val root: Configurable) extends CnvMethod {
def biopetScript: Unit = {
val RPKMdir = new File(outputDir, "rpkm")
val rpkmFiles: List[File] = inputBams.map { case (sampleName, bamFile) =>
val coniferRPKM = new ConiferRPKM(this)
coniferRPKM.bamFile = bamFile.getAbsoluteFile
coniferRPKM.probes = this.probeFile
coniferRPKM.output = new File(RPKMdir, s"$sampleName.rpkm.txt")
add(coniferRPKM)
coniferRPKM.output
val rpkmFiles: List[File] = inputBams.map {
case (sampleName, bamFile) =>
val coniferRPKM = new ConiferRPKM(this)
coniferRPKM.bamFile = bamFile.getAbsoluteFile
coniferRPKM.probes = this.probeFile
coniferRPKM.output = new File(RPKMdir, s"$sampleName.rpkm.txt")
add(coniferRPKM)
coniferRPKM.output
}.toList ++ controlsDir.list.filter(_.toLowerCase.endsWith(".txt")).map { path =>
val oldFile = new File(path)
val newFile = new File(RPKMdir, s"control.${oldFile.getName}")
......@@ -37,20 +38,21 @@ class ConiferMethod(val root: Configurable) extends CnvMethod {
newFile
}
inputBams.foreach { case (sampleName, bamFile) =>
val sampleDir = new File(outputDir, "samples" + File.separator + sampleName)
val coniferAnalyze = new ConiferAnalyze(this)
coniferAnalyze.deps ++= rpkmFiles
coniferAnalyze.probes = probeFile
coniferAnalyze.rpkmDir = RPKMdir
coniferAnalyze.output = new File(sampleDir, s"$sampleName.hdf5")
add(coniferAnalyze)
val coniferCall = new ConiferCall(this)
coniferCall.input = coniferAnalyze.output
coniferCall.output = new File(sampleDir, s"${sampleName}.calls.txt")
add(coniferCall)
inputBams.foreach {
case (sampleName, bamFile) =>
val sampleDir = new File(outputDir, "samples" + File.separator + sampleName)
val coniferAnalyze = new ConiferAnalyze(this)
coniferAnalyze.deps ++= rpkmFiles
coniferAnalyze.probes = probeFile
coniferAnalyze.rpkmDir = RPKMdir
coniferAnalyze.output = new File(sampleDir, s"$sampleName.hdf5")
add(coniferAnalyze)
val coniferCall = new ConiferCall(this)
coniferCall.input = coniferAnalyze.output
coniferCall.output = new File(sampleDir, s"${sampleName}.calls.txt")
add(coniferCall)
}
addSummaryJobs()
......
/**
* Biopet is built on top of GATK Queue for building bioinformatic
* pipelines. It is mainly intended to support LUMC SHARK cluster which is running
* SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
* should also be able to execute Biopet tools and pipelines.
*
* Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
*
* Contact us at: sasc@lumc.nl
*
* A dual licensing mode is applied. The source code within this project that are
* not part of GATK Queue is freely available for non-commercial use under an AGPL
* license; For commercial users or users who do not want to follow the AGPL
* license, please contact us to obtain a separate license.
*/
* Biopet is built on top of GATK Queue for building bioinformatic
* pipelines. It is mainly intended to support LUMC SHARK cluster which is running
* SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
* should also be able to execute Biopet tools and pipelines.
*
* Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
*
* Contact us at: sasc@lumc.nl
*
* A dual licensing mode is applied. The source code within this project that are
* not part of GATK Queue is freely available for non-commercial use under an AGPL
* license; For commercial users or users who do not want to follow the AGPL
* license, please contact us to obtain a separate license.
*/
package nl.lumc.sasc.biopet.pipelines.kopisu
import java.io.{File, FileOutputStream}
import java.io.{ File, FileOutputStream }
import com.google.common.io.Files
import nl.lumc.sasc.biopet.extensions.freec.{FreeC, FreeCAssessSignificancePlot, FreeCCNVPlot}
import nl.lumc.sasc.biopet.extensions.freec.{ FreeC, FreeCAssessSignificancePlot, FreeCCNVPlot }
import nl.lumc.sasc.biopet.utils.ConfigUtils
import nl.lumc.sasc.biopet.utils.config.Config
import org.broadinstitute.gatk.queue.QSettings
import org.scalatest.Matchers
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.{DataProvider, Test}
import org.testng.annotations.{ DataProvider, Test }
import scala.collection.mutable.ListBuffer
/**
* Test class for [[Kopisu]]
*
* Created by pjvan_thof on 3/2/15.
*/
* Test class for [[Kopisu]]
*
* Created by pjvan_thof on 3/2/15.
*/
class KopisuTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): Kopisu = {
new Kopisu() {
......@@ -121,7 +121,7 @@ object KopisuTest {
"md5sum" -> Map("exe" -> "test"),
"bgzip" -> Map("exe" -> "test"),
"tabix" -> Map("exe" -> "test"),
"freec" -> Map("exe" -> "test", "chrFiles" -> "test", "chrLenFile" ->"test"),
"freec" -> Map("exe" -> "test", "chrFiles" -> "test", "chrLenFile" -> "test"),
"controls_dir" -> controlDir.getAbsolutePath,
"conifer" -> Map("script" -> "/usr/bin/test"),
"probe_file" -> "test",
......
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