Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
e6462da9
Commit
e6462da9
authored
Mar 31, 2017
by
akaljuvee
Browse files
showing translocation counts aswell
parent
6f595a73
Changes
3
Hide whitespace changes
Inline
Side-by-side
shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariantsSv.ssp
View file @
e6462da9
...
...
@@ -11,6 +11,7 @@
val sampleNames: List[String] = summary.samples.toList.sorted
val counts: Map[String, Map[String, Array[Long]]] = ShivaSvCallingReport.parseSummaryForSvCounts(summary)
val traCounts: Map[String, Long] = ShivaSvCallingReport.parseSummaryForTranslocations(summary)
var svTypes = List(
SvTypeForReport("DEL", "Deletions", "svSummaryDeletions.tsv", "svSummaryDeletions.png"),
...
...
@@ -31,12 +32,29 @@
<img src="${sv.pngFileName}" />
#end
</div>
#if (traCounts.nonEmpty)
<div class="panel-body">
<h5>Number of translocation events detected:</h5>
<table class="table table-condensed" style="width:auto">
<thead><tr>
#for (sampleName <- sampleNames)
<th>${sampleName}</th>
#end
</tr></thead>
<tbody><tr>
#for (sampleName <- sampleNames)
<td>${traCounts.get(sampleName).get}</td>
#end
</tr></tbody>
</table>
</div>
#end
<div class="panel-footer">
<button type="button" class="btn btn-info" data-toggle="collapse" data-target="#svSummaryTable">
#if (showTable)
<i class="glyphicon glyphicon-eye-close"></i> Hide table
<i class="glyphicon glyphicon-eye-close"></i> Hide table
s
#else
<i class="glyphicon glyphicon-eye-open"></i> Show table
<i class="glyphicon glyphicon-eye-open"></i> Show table
s
#end
</button>
<a href="${tsvAllTypes}"><button type="button" class="btn btn-info"><i class="glyphicon glyphicon-cloud-download"></i> TSV file</button></a>
...
...
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCalling.scala
View file @
e6462da9
...
...
@@ -15,12 +15,12 @@
package
nl.lumc.sasc.biopet.pipelines.shiva
import
htsjdk.variant.vcf.VCFFileReader
import
nl.lumc.sasc.biopet.core.summary.
{
Summarizable
,
SummaryQScript
}
import
nl.lumc.sasc.biopet.core.
{
PipelineCommand
,
Reference
,
SampleLibraryTag
}
import
nl.lumc.sasc.biopet.core.summary.
{
Summarizable
,
SummaryQScript
}
import
nl.lumc.sasc.biopet.core.
{
PipelineCommand
,
Reference
,
SampleLibraryTag
}
import
nl.lumc.sasc.biopet.extensions.Pysvtools
import
nl.lumc.sasc.biopet.pipelines.shiva.svcallers._
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.utils.
{
BamUtils
,
Logging
}
import
nl.lumc.sasc.biopet.utils.
{
BamUtils
,
Logging
}
import
org.broadinstitute.gatk.queue.QScript
/**
...
...
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCallingReport.scala
View file @
e6462da9
...
...
@@ -35,6 +35,15 @@ object ShivaSvCallingReport {
result
}
def
parseSummaryForTranslocations
(
summary
:
Summary
)
:
Map
[
String
,
Long
]
=
{
var
traCounts
:
Map
[
String
,
Long
]
=
Map
()
for
(
sampleName
<-
summary
.
samples
)
{
var
counts
:
Map
[
String
,
Any
]
=
summary
.
getSampleValue
(
sampleName
,
"shivasvcalling"
,
"stats"
,
"variantsBySizeAndType"
).
get
.
asInstanceOf
[
Map
[
String
,
Any
]]
traCounts
+=
(
sampleName
->
counts
.
get
(
"TRA"
).
get
.
asInstanceOf
[
Long
])
}
if
(
traCounts
.
exists
(
elem
=>
elem
.
_2
>
0
))
traCounts
else
Map
.
empty
}
def
writeTsvFiles
(
sampleNames
:
List
[
String
],
counts
:
Map
[
String
,
Map
[
String
,
Array
[
Long
]]],
svTypes
:
List
[
SvTypeForReport
],
outFileAllTypes
:
String
,
outDir
:
File
)
:
Unit
=
{
val
tsvWriter
=
new
PrintWriter
(
new
File
(
outDir
,
outFileAllTypes
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment