Commit 819bada6 authored by Peter van 't Hof's avatar Peter van 't Hof

Added output files to bamstats

parent 8654affb
...@@ -3,10 +3,10 @@ package nl.lumc.sasc.biopet.extensions.tools ...@@ -3,10 +3,10 @@ package nl.lumc.sasc.biopet.extensions.tools
import java.io.File import java.io.File
import nl.lumc.sasc.biopet.core.summary.Summarizable import nl.lumc.sasc.biopet.core.summary.Summarizable
import nl.lumc.sasc.biopet.core.{ Reference, ToolCommandFunction } import nl.lumc.sasc.biopet.core.{Reference, ToolCommandFunction}
import nl.lumc.sasc.biopet.utils.ConfigUtils import nl.lumc.sasc.biopet.utils.ConfigUtils
import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.Input import org.broadinstitute.gatk.utils.commandline.{Input, Output}
/** /**
* Created by pjvanthof on 18/11/2016. * Created by pjvanthof on 18/11/2016.
...@@ -36,6 +36,9 @@ class BamStats(val root: Configurable) extends ToolCommandFunction with Referenc ...@@ -36,6 +36,9 @@ class BamStats(val root: Configurable) extends ToolCommandFunction with Referenc
} }
} }
@Output
private var outputFiles: List[File] = Nil
def bamstatsSummary: File = new File(outputDir, "bamstats.summary.json") def bamstatsSummary: File = new File(outputDir, "bamstats.summary.json")
def flagstatSummaryFile(contig: Option[String] = None): File = getOutputFile("flagstats.summary.json", contig) def flagstatSummaryFile(contig: Option[String] = None): File = getOutputFile("flagstats.summary.json", contig)
def mappingQualityFile(contig: Option[String] = None): File = getOutputFile("mapping_quality.tsv", contig) def mappingQualityFile(contig: Option[String] = None): File = getOutputFile("mapping_quality.tsv", contig)
...@@ -44,6 +47,10 @@ class BamStats(val root: Configurable) extends ToolCommandFunction with Referenc ...@@ -44,6 +47,10 @@ class BamStats(val root: Configurable) extends ToolCommandFunction with Referenc
override def beforeGraph() { override def beforeGraph() {
super.beforeGraph() super.beforeGraph()
deps :+= new File(bamFile.getAbsolutePath.replaceAll(".bam$", ".bai")) deps :+= new File(bamFile.getAbsolutePath.replaceAll(".bam$", ".bai"))
outputFiles :+= bamstatsSummary
outputFiles :+= flagstatSummaryFile()
outputFiles :+= mappingQualityFile()
outputFiles :+= clipingFile()
jobOutputFile = new File(outputDir, ".bamstats.out") jobOutputFile = new File(outputDir, ".bamstats.out")
if (reference == null) reference = referenceFasta() if (reference == null) reference = referenceFasta()
} }
......
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