Commit a8e368c6 authored by akaljuvee's avatar akaljuvee

-

parent 042a5e0d
...@@ -102,12 +102,8 @@ class ShivaSvCalling(val parent: Configurable) extends QScript with SummaryQScri ...@@ -102,12 +102,8 @@ class ShivaSvCalling(val parent: Configurable) extends QScript with SummaryQScri
addSummarizable(new Summarizable { addSummarizable(new Summarizable {
def summaryFiles = Map("output_vcf" -> mergedResultFile) def summaryFiles = Map("output_vcf" -> mergedResultFile)
def summaryStats = counts def summaryStats = counts
}, "variantsBySizeAndType", Some(sample)) }, "parse_sv_vcf", Some(sample))
} }
addSummarizable(new Summarizable {
def summaryFiles = Map.empty
def summaryStats = ShivaSvCallingReport.histogramBinBoundaries
}, "histBreaksForCounts")
addSummaryJobs() addSummaryJobs()
} }
...@@ -116,7 +112,7 @@ class ShivaSvCalling(val parent: Configurable) extends QScript with SummaryQScri ...@@ -116,7 +112,7 @@ class ShivaSvCalling(val parent: Configurable) extends QScript with SummaryQScri
protected def callersList: List[SvCaller] = List(new Breakdancer(this), new Clever(this), new Delly(this), new Pindel(this)) protected def callersList: List[SvCaller] = List(new Breakdancer(this), new Clever(this), new Delly(this), new Pindel(this))
/** Settings for the summary */ /** Settings for the summary */
def summarySettings = Map("sv_callers" -> configCallers.toList) def summarySettings = Map("sv_callers" -> configCallers.toList, "hist_bin_boundaries" -> ShivaSvCallingReport.histogramBinBoundaries)
/** Files for the summary */ /** Files for the summary */
def summaryFiles: Map[String, File] = if (inputBams.size > 1) Map("final_mergedvcf" -> outputMergedVCF) else Map.empty def summaryFiles: Map[String, File] = if (inputBams.size > 1) Map("final_mergedvcf" -> outputMergedVCF) else Map.empty
......
...@@ -19,7 +19,7 @@ object ShivaSvCallingReport { ...@@ -19,7 +19,7 @@ object ShivaSvCallingReport {
var delCounts, insCounts, dupCounts, invCounts: Map[String, Array[Long]] = Map() var delCounts, insCounts, dupCounts, invCounts: Map[String, Array[Long]] = Map()
for (sampleName <- sampleNames) { for (sampleName <- sampleNames) {
val sampleCounts: Map[String, Any] = Await.result(summary.getStat(runId, PipelineName("shivasvcalling"), ModuleName("variantsBySizeAndType"), SampleName(sampleName)), Duration.Inf).get val sampleCounts: Map[String, Any] = Await.result(summary.getStat(runId, PipelineName("shivasvcalling"), ModuleName("parse_sv_vcf"), SampleName(sampleName)), Duration.Inf).get
for ((svType, counts) <- sampleCounts.collect({ case (k, v: List[_]) => (k, v.toArray[Any]) })) { for ((svType, counts) <- sampleCounts.collect({ case (k, v: List[_]) => (k, v.toArray[Any]) })) {
val elem: Tuple2[String, Array[Long]] = (sampleName, counts.collect({ case x: Long => x })) val elem: Tuple2[String, Array[Long]] = (sampleName, counts.collect({ case x: Long => x }))
svType match { svType match {
...@@ -42,7 +42,7 @@ object ShivaSvCallingReport { ...@@ -42,7 +42,7 @@ object ShivaSvCallingReport {
def parseSummaryForTranslocations(summary: SummaryDb, runId: Int, sampleNames: Seq[String]): Map[String, Long] = { def parseSummaryForTranslocations(summary: SummaryDb, runId: Int, sampleNames: Seq[String]): Map[String, Long] = {
var traCounts: Map[String, Long] = Map() var traCounts: Map[String, Long] = Map()
for (sampleName <- sampleNames) { for (sampleName <- sampleNames) {
val counts: Map[String, Any] = Await.result(summary.getStat(runId, PipelineName("shivasvcalling"), ModuleName("variantsBySizeAndType"), SampleName(sampleName)), Duration.Inf).get val counts: Map[String, Any] = Await.result(summary.getStat(runId, PipelineName("shivasvcalling"), ModuleName("parse_sv_vcf"), SampleName(sampleName)), Duration.Inf).get
traCounts += (sampleName -> counts.get("TRA").get.asInstanceOf[Long]) traCounts += (sampleName -> counts.get("TRA").get.asInstanceOf[Long])
} }
if (traCounts.exists(elem => elem._2 > 0)) traCounts else Map.empty if (traCounts.exists(elem => elem._2 > 0)) traCounts else Map.empty
......
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