Commit 505e9ae6 authored by rhpvorderman's avatar rhpvorderman

Defutured wgsHistogramPlot

parent fc410e94
...@@ -341,16 +341,15 @@ object BammetricsReport extends ReportBuilder { ...@@ -341,16 +341,15 @@ object BammetricsReport extends ReportBuilder {
"insert_size" -> List("histogram", "insert_size"), "insert_size" -> List("histogram", "insert_size"),
"count" -> List("histogram", "All_Reads.fr_count") "count" -> List("histogram", "All_Reads.fr_count")
) )
val plotTables = summaryForPlot(summary, summaryForPlot(summary,
statsPaths, statsPaths,
"insert_size" :: Nil, "insert_size" :: Nil,
"count" :: Nil, "count" :: Nil,
"bammetrics", "bammetrics",
"CollectInsertSizeMetrics", "CollectInsertSizeMetrics",
libraryLevel, libraryLevel,
sampleId, sampleId,
libraryId) libraryId)
plotTables
} }
/** /**
...@@ -381,16 +380,15 @@ object BammetricsReport extends ReportBuilder { ...@@ -381,16 +380,15 @@ object BammetricsReport extends ReportBuilder {
"mapping_quality" -> List("mapping_quality", "histogram", "values"), "mapping_quality" -> List("mapping_quality", "histogram", "values"),
"count" -> List("mapping_quality", "histogram", "counts") "count" -> List("mapping_quality", "histogram", "counts")
) )
val plotTables = summaryForPlot(summary, summaryForPlot(summary,
statsPaths, statsPaths,
"mapping_quality" :: Nil, "mapping_quality" :: Nil,
"count" :: Nil, "count" :: Nil,
"bammetrics", "bammetrics",
"bamstats", "bamstats",
libraryLevel, libraryLevel,
sampleId, sampleId,
libraryId) libraryId)
plotTables
} }
def mappingQualityPlot(outputDir: File, def mappingQualityPlot(outputDir: File,
...@@ -405,37 +403,57 @@ object BammetricsReport extends ReportBuilder { ...@@ -405,37 +403,57 @@ object BammetricsReport extends ReportBuilder {
"Reads", "Reads",
"Mapping Quality") "Mapping Quality")
} }
def clippingPlotTables(summary: SummaryDb, def clippingPlotTables(summary: SummaryDb,
libraryLevel: Boolean = false, libraryLevel: Boolean = false,
sampleId: Option[Int] = None, sampleId: Option[Int] = None,
libraryId: Option[Int] = None): Array[Map[String, Array[Any]]] = {} libraryId: Option[Int] = None): Array[Map[String, Array[Any]]] = {
def clippingPlot(outputDir: File,
prefix: String,
clippingPlotTables: Array[Map[String, Array[Any]]],
libraryLevel: Boolean = false,
sampleId: Option[Int] = None,
libraryId: Option[Int] = None): Unit = {
val statsPaths = Map( val statsPaths = Map(
"clipping" -> List("clipping", "histogram", "values"), "clipping" -> List("clipping", "histogram", "values"),
"count" -> List("clipping", "histogram", "counts") "count" -> List("clipping", "histogram", "counts")
) )
summaryForPlot(summary,
statsPaths,
"clipping" :: Nil,
"count" :: Nil,
"bammetrics",
"bamstats",
libraryLevel,
sampleId,
libraryId)
writePlotFromSummary( }
outputDir, def clippingPlot(outputDir: File,
prefix, prefix: String,
summary, clippingPlotTables: Array[Map[String, Array[Any]]]): Unit = {
libraryLevel, writePlotFromSummary(outputDir,
sampleId, prefix,
libraryId, clippingPlotTables,
statsPaths, "clipping" :: Nil,
"clipping" :: Nil, "count" :: Nil,
"count" :: Nil, "Clipping",
"bammetrics", "Reads",
"bamstats", "Clipping")
"Clipping", }
"Reads",
"Clipping" def wgsHistogramPlotTables(summary: SummaryDb,
libraryLevel: Boolean = false,
sampleId: Option[Int] = None,
libraryId: Option[Int] = None): Array[Map[String, Array[Any]]] = {
val statsPaths = Map(
"coverage" -> List("histogram", "coverage"),
"count" -> List("histogram", "count"),
"high_quality_coverage_count" -> List("histogram", "high_quality_coverage_count")
) )
summaryForPlot(summary,
statsPaths,
"coverage" :: Nil,
"count" :: "high_quality_coverage_count" :: Nil,
"bammetrics",
"wgs",
libraryLevel,
sampleId,
libraryId)
} }
/** /**
...@@ -449,32 +467,15 @@ object BammetricsReport extends ReportBuilder { ...@@ -449,32 +467,15 @@ object BammetricsReport extends ReportBuilder {
*/ */
def wgsHistogramPlot(outputDir: File, def wgsHistogramPlot(outputDir: File,
prefix: String, prefix: String,
tables: Array[Map[String, Array[Any]]], wgsHistogramPlotTables: Array[Map[String, Array[Any]]]): Unit = {
libraryLevel: Boolean = false, writePlotFromSummary(outputDir,
sampleId: Option[Int] = None, prefix,
libraryId: Option[Int] = None): Unit = { wgsHistogramPlotTables,
val statsPaths = Map( "coverage" :: Nil,
"coverage" -> List("histogram", "coverage"), "count" :: "high_quality_coverage_count" :: Nil,
"count" -> List("histogram", "count"), "Coverage",
"high_quality_coverage_count" -> List("histogram", "high_quality_coverage_count") "Bases",
) "Whole genome coverage")
writePlotFromSummary(
outputDir,
prefix,
summary,
libraryLevel,
sampleId,
libraryId,
statsPaths,
"coverage" :: Nil,
"count" :: "high_quality_coverage_count" :: Nil,
"bammetrics",
"wgs",
"Coverage",
"Bases",
"Whole genome coverage"
)
} }
/** /**
......
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