Skip to content
Snippets Groups Projects
Commit 20cd7b6d authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added input file checking

parent b7743a6e
No related branches found
No related tags found
No related merge requests found
...@@ -119,5 +119,5 @@ trait BiopetQScript extends Configurable with GatkLogging { ...@@ -119,5 +119,5 @@ trait BiopetQScript extends Configurable with GatkLogging {
} }
object BiopetQScript { object BiopetQScript {
protected case class InputFile(file: File, md5: Option[String] = None) case class InputFile(file: File, md5: Option[String] = None)
} }
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
package nl.lumc.sasc.biopet.pipelines.gears package nl.lumc.sasc.biopet.pipelines.gears
import nl.lumc.sasc.biopet.core.summary.SummaryQScript import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.core.BiopetQScript.InputFile
import nl.lumc.sasc.biopet.core.{ PipelineCommand, SampleLibraryTag } import nl.lumc.sasc.biopet.core.{ PipelineCommand, SampleLibraryTag }
import nl.lumc.sasc.biopet.extensions.kraken.{ Kraken, KrakenReport } import nl.lumc.sasc.biopet.extensions.kraken.{ Kraken, KrakenReport }
import nl.lumc.sasc.biopet.extensions.picard.SamToFastq import nl.lumc.sasc.biopet.extensions.picard.SamToFastq
...@@ -55,6 +56,13 @@ class Gears(val root: Configurable) extends QScript with SummaryQScript with Sam ...@@ -55,6 +56,13 @@ class Gears(val root: Configurable) extends QScript with SummaryQScript with Sam
.getOrElse("noName") .getOrElse("noName")
else outputName = bamFile.map(_.getName.stripSuffix(".bam")).getOrElse("noName") else outputName = bamFile.map(_.getName.stripSuffix(".bam")).getOrElse("noName")
} }
if (fastqR1.isDefined) {
fastqR1.foreach(inputFiles :+= InputFile(_))
fastqR2.foreach(inputFiles :+= InputFile(_))
} else {
inputFiles :+= InputFile(bamFile.get)
}
} }
override def reportClass = { override def reportClass = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment