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

Fixing insertsize stats

parent ca9d7529
...@@ -94,16 +94,15 @@ class CollectMultipleMetrics(val parent: Configurable) extends Picard with Summa ...@@ -94,16 +94,15 @@ class CollectMultipleMetrics(val parent: Configurable) extends Picard with Summa
} }
program program
.filterNot(_ == Programs.CollectInsertSizeMetrics.toString && !new File(outputName + ".insert_size_metrics").exists())
.foreach { p => .foreach { p =>
p match { p match {
case _ if p == Programs.CollectAlignmentSummaryMetrics.toString => case _ if p == Programs.CollectAlignmentSummaryMetrics.toString =>
qscript.addSummarizable(summarizable(() => Picard.getMetrics(new File(outputName + ".alignment_summary_metrics"), groupBy = Some("CATEGORY"))), p, forceSingle = true) qscript.addSummarizable(summarizable(() => Picard.getMetrics(new File(outputName + ".alignment_summary_metrics"), groupBy = Some("CATEGORY"))), p, forceSingle = true)
case _ if p == Programs.CollectInsertSizeMetrics.toString => case _ if p == Programs.CollectInsertSizeMetrics.toString =>
qscript.addSummarizable(summarizable(() => Map( qscript.addSummarizable(summarizable(() => if (!new File(outputName + ".insert_size_metrics").exists()) Map(
"metrics" -> Picard.getMetrics(new File(outputName + ".insert_size_metrics")), "metrics" -> Picard.getMetrics(new File(outputName + ".insert_size_metrics")),
"histogram" -> Picard.getHistogram(new File(outputName + ".insert_size_metrics")) "histogram" -> Picard.getHistogram(new File(outputName + ".insert_size_metrics"))
)), p, forceSingle = true) ) else Map()), p, forceSingle = true)
case _ if p == Programs.QualityScoreDistribution.toString => case _ if p == Programs.QualityScoreDistribution.toString =>
qscript.addSummarizable(summarizable(() => Picard.getHistogram(new File(outputName + ".quality_distribution_metrics"))), p, forceSingle = true) qscript.addSummarizable(summarizable(() => Picard.getHistogram(new File(outputName + ".quality_distribution_metrics"))), p, forceSingle = true)
case _ if p == Programs.MeanQualityByCycle.toString => case _ if p == Programs.MeanQualityByCycle.toString =>
...@@ -117,7 +116,7 @@ class CollectMultipleMetrics(val parent: Configurable) extends Picard with Summa ...@@ -117,7 +116,7 @@ class CollectMultipleMetrics(val parent: Configurable) extends Picard with Summa
def summaryStats = Map() def summaryStats = Map()
def summaryFiles = { def summaryFiles: Map[String, File] = {
program.map { program.map {
case p if p == Programs.CollectInsertSizeMetrics.toString => case p if p == Programs.CollectInsertSizeMetrics.toString =>
Map( Map(
......
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