Commit 70d48352 authored by pjvan_thof's avatar pjvan_thof

Fixed rna coverage plot

parent c4dca161
#import(nl.lumc.sasc.biopet.utils.summary.db.Schema._) #import(nl.lumc.sasc.biopet.utils.summary.db.Schema.Sample)
#import(nl.lumc.sasc.biopet.utils.summary.db.Schema.Library)
#import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb) #import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb)
#import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb._) #import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb._)
#import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb.Implicts._) #import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb.Implicts._)
...@@ -72,14 +73,14 @@ ...@@ -72,14 +73,14 @@
case _ => allLibraries.filter(_.sampleId == sample.id).map(x => Some(x.id)).toList case _ => allLibraries.filter(_.sampleId == sample.id).map(x => Some(x.id)).toList
} }
}# }#
<tr><td rowspan="${libs.size}"><a href="${rootPath}Samples/${sample}/index.html">${sample}</a></td> <tr><td rowspan="${libs.size}"><a href="${rootPath}Samples/${sample.name}/index.html">${sample.name}</a></td>
#for (libId <- libs) #for (libId <- libs)
#{ val libName = libId.map(l => allLibraries.find(_.id == l).get.name) }# #{ val libName = libId.map(l => allLibraries.find(_.id == l).get.name) }#
#if (libs.head != libId) <tr> #end #if (libs.head != libId) <tr> #end
#if (!sampleLevel) <td><a href="${rootPath}Samples/${sample.name}/Libraries/${libName}/index.html">${libName}</a></td> #end #if (!sampleLevel) <td><a href="${rootPath}Samples/${sample.name}/Libraries/${libName}/index.html">${libName}</a></td> #end
#{ #{
val statsPaths = fields.map(x => x -> List("metrics", x.toUpperCase)).toMap val statsPaths = fields.map(x => x -> List("metrics", x.toUpperCase)).toMap
val results = summary.getStatKeys(runId, "bammetrics", "wgs", sample = sample.id, library = libId.map(LibraryId).getOrElse(NoLibrary), keyValues = statsPaths) val results = summary.getStatKeys(runId, "bammetrics", "rna", sample = sample.id, library = libId.map(LibraryId).getOrElse(NoLibrary), keyValues = statsPaths)
}# }#
#for (field <- fields) #for (field <- fields)
<td>${results(field)}</td> <td>${results(field)}</td>
......
#import(nl.lumc.sasc.biopet.utils.summary.db.Schema._) #import(nl.lumc.sasc.biopet.utils.summary.db.Schema.Sample)
#import(nl.lumc.sasc.biopet.utils.summary.db.Schema.Library)
#import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb) #import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb)
#import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb._) #import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb._)
#import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb.Implicts._) #import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb.Implicts._)
......
...@@ -306,12 +306,12 @@ object BammetricsReport extends ReportBuilder { ...@@ -306,12 +306,12 @@ object BammetricsReport extends ReportBuilder {
sampleId: Option[Int] = None, sampleId: Option[Int] = None,
libraryId: Option[Int] = None): Unit = { libraryId: Option[Int] = None): Unit = {
val statsPaths = Map( val statsPaths = Map(
"position" -> List("rna", "histogram", "normalized_position"), "position" -> List("histogram", "normalized_position"),
"count" -> List("rna", "histogram", "All_Reads.normalized_coverage") "count" -> List("histogram", "All_Reads.normalized_coverage")
) )
writePlotFromSummary(outputDir, prefix, summary, libraryLevel, sampleId, libraryId, statsPaths, writePlotFromSummary(outputDir, prefix, summary, libraryLevel, sampleId, libraryId, statsPaths,
"coverage", "count", "bammetrics", "rna", "position", "count", "bammetrics", "rna",
"Relative position", "Coverage", "Rna coverage") "Relative position", "Coverage", "Rna coverage")
} }
......
...@@ -251,6 +251,9 @@ trait SummaryDb extends Closeable { ...@@ -251,6 +251,9 @@ trait SummaryDb extends Closeable {
library: LibraryQuery = NoLibrary, library: LibraryQuery = NoLibrary,
keyValues: Map[String, List[String]]): Map[String, Option[Any]] = { keyValues: Map[String, List[String]]): Map[String, Option[Any]] = {
val stats = Await.result(getStat(runId, pipeline, module, sample, library), Duration.Inf) val stats = Await.result(getStat(runId, pipeline, module, sample, library), Duration.Inf)
if (module == ModuleName("rna")) {
""
}
keyValues.map { keyValues.map {
case (key, path) => case (key, path) =>
stats match { stats match {
......
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