Commit 9ca759c7 authored by Peter van 't Hof's avatar Peter van 't Hof

Style issues

parent 385c71e9
......@@ -30,7 +30,8 @@ trait PipelineCommand extends MainCommand with GatkLogging with ImplicitConversi
* Gets location of compiled class of pipeline
* @return path from classPath to class file
*/
def pipeline: String = "/" + getClass.getName.takeWhile(_ != '$').replaceAll("\\.", "/") + ".class"
def pipeline: String =
"/" + getClass.getName.takeWhile(_ != '$').replaceAll("\\.", "/") + ".class"
def pipelineName: String = getClass.getName.takeWhile(_ != '$').split("\\.").last.toLowerCase
......
......@@ -64,27 +64,27 @@ class WriteSummary(val parent: SummaryQScript) extends InProcessFunction with Co
qscript match {
case s: MultiSampleQScript => s.initSummaryDb()
case t: SampleLibraryTag =>
t.sampleId.foreach {
sampleName =>
val sampleId = Await
.result(db.getSamples(name = Some(sampleName), runId = Some(qscript.summaryRunId))
.map(_.headOption.map(_.id)),
Duration.Inf)
.getOrElse {
Await.result(db.createOrUpdateSample(sampleName, qscript.summaryRunId),
Duration.Inf)
}
t.libId.foreach { libName =>
Await.result(db.getSamples(name = Some(libName),
runId = Some(qscript.summaryRunId),
sampleId = Some(sampleId))
.map(_.headOption.map(_.id)),
Duration.Inf)
.getOrElse {
Await.result(db.createOrUpdateLibrary(libName, qscript.summaryRunId, sampleId),
t.sampleId.foreach { sampleName =>
val sampleId = Await
.result(db.getSamples(name = Some(sampleName), runId = Some(qscript.summaryRunId))
.map(_.headOption.map(_.id)),
Duration.Inf)
}
.getOrElse {
Await.result(db.createOrUpdateSample(sampleName, qscript.summaryRunId),
Duration.Inf)
}
t.libId.foreach { libName =>
Await
.result(db.getSamples(name = Some(libName),
runId = Some(qscript.summaryRunId),
sampleId = Some(sampleId))
.map(_.headOption.map(_.id)),
Duration.Inf)
.getOrElse {
Await.result(db.createOrUpdateLibrary(libName, qscript.summaryRunId, sampleId),
Duration.Inf)
}
}
}
case _ => qscript.summaryRunId
}
......
......@@ -210,7 +210,8 @@ object MultiSampleQScriptTest {
)
)
def apply(configs: List[Map[String, Any]], only: List[String] = Nil): QScript with MultiSampleQScript {
def apply(configs: List[Map[String, Any]],
only: List[String] = Nil): QScript with MultiSampleQScript {
def init(): Unit
def getLastLogMessage: String
......
......@@ -171,7 +171,8 @@ object PedigreeQScriptTest {
val trioPed = Map("ped_file" -> resourcePath("/trio.ped"))
def apply(configs: List[Map[String, Any]], only: List[String] = Nil): QScript with PedigreeQscript {
def apply(configs: List[Map[String, Any]],
only: List[String] = Nil): QScript with PedigreeQscript {
def init(): Unit
def biopetScript(): Unit
......
......@@ -33,8 +33,10 @@ class WriteDependenciesTest extends TestNGSuite with Matchers {
case class Qfunc(in: Seq[File], out: Seq[File]) extends QFunction {
override def inputs: Seq[File] = in
override def outputs: Seq[File] = out
override def doneOutputs: Seq[File] = out.map(x => new File(x.getParentFile, s".${x.getName}.done"))
override def failOutputs: Seq[File] = out.map(x => new File(x.getParentFile, s".${x.getName}.fail"))
override def doneOutputs: Seq[File] =
out.map(x => new File(x.getParentFile, s".${x.getName}.done"))
override def failOutputs: Seq[File] =
out.map(x => new File(x.getParentFile, s".${x.getName}.fail"))
jobOutputFile = new File(out.head + ".out")
}
......
......@@ -65,7 +65,8 @@ class VcfFilterTest extends TestNGSuite with Matchers {
@Test def testMinQualScore(): Unit = testCommand(minQualScore = Some(50.0))
@Test def testFilterHetVarToHomVar(): Unit = testCommand(filterHetVarToHomVar = List("dummy"))
@Test def testId(): Unit = testCommand(id = List("rs01", "rs02"))
@Test def testIdFile(): Unit = testCommand(idFile = Some(File.createTempFile("vcfFilter", ".txt")))
@Test def testIdFile(): Unit =
testCommand(idFile = Some(File.createTempFile("vcfFilter", ".txt")))
protected def testCommand(minSampleDepth: Option[Int] = None,
minTotalDepth: Option[Int] = None,
......
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