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
1bed81c6
Commit
1bed81c6
authored
Jun 16, 2015
by
Peter van 't Hof
Browse files
Changed output of stats for coverage stats
parent
48b70e4b
Changes
4
Hide whitespace changes
Inline
Side-by-side
public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala
View file @
1bed81c6
...
...
@@ -156,6 +156,8 @@ class BamMetrics(val root: Configurable) extends QScript with SummaryQScript wit
//FIXME:should use piping
add
(
BedtoolsCoverage
(
this
,
inputBam
,
intervals
.
bed
,
coverageFile
,
depth
=
true
),
true
)
val
covStats
=
CoverageStats
(
this
,
coverageFile
,
targetDir
)
covStats
.
title
=
Some
(
"Coverage for "
+
targetName
)
covStats
.
subTitle
=
Some
(
" "
)
add
(
covStats
)
addSummarizable
(
covStats
,
"cov_stats"
)
}
...
...
public/biopet-framework/src/main/resources/nl/lumc/sasc/biopet/scripts/bedtools_cov_stats.py
View file @
1bed81c6
...
...
@@ -318,14 +318,4 @@ if __name__ == '__main__':
title
=
title
,
out_img
=
args
.
plot
)
stats
=
{
'coverage'
:
{
k
:
v
.
get_quick_stats
()
for
k
,
v
in
coverages
.
items
()}}
if
args
.
plot
is
not
None
:
files
=
{
'plot_coverage'
:
{
'path'
:
os
.
path
.
abspath
(
args
.
plot
),
'checksum_sha1'
:
None
,
}
}
else
:
files
=
{}
json
.
dump
({
'stats'
:
stats
,
'files'
:
files
},
sys
.
stdout
,
sort_keys
=
True
,
indent
=
4
,
separators
=
(
','
,
': '
))
\ No newline at end of file
json
.
dump
(
stats
,
sys
.
stdout
,
sort_keys
=
True
,
indent
=
4
,
separators
=
(
','
,
': '
))
\ No newline at end of file
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/scripts/CoverageStats.scala
View file @
1bed81c6
...
...
@@ -18,6 +18,7 @@ package nl.lumc.sasc.biopet.scripts
import
nl.lumc.sasc.biopet.core.config.Configurable
import
nl.lumc.sasc.biopet.core.summary.Summarizable
import
nl.lumc.sasc.biopet.extensions.PythonCommandLineFunction
import
nl.lumc.sasc.biopet.utils.ConfigUtils
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
java.io.File
...
...
@@ -33,14 +34,23 @@ class CoverageStats(val root: Configurable) extends PythonCommandLineFunction wi
@Output
(
doc
=
"plot File (png)"
)
var
plot
:
File
=
_
var
title
:
Option
[
String
]
=
None
var
subTitle
:
Option
[
String
]
=
None
override
val
defaultCoreMemory
=
9.0
def
cmdLine
=
getPythonCommand
+
required
(
input
)
+
required
(
"--plot"
,
plot
)
+
" > "
+
required
(
output
)
required
(
input
)
+
required
(
"--plot"
,
plot
)
+
optional
(
"--title"
,
title
)
+
optional
(
"--subtitle"
,
subTitle
)
+
" > "
+
required
(
output
)
def
summaryFiles
:
Map
[
String
,
File
]
=
Map
(
"output"
->
output
,
"plot"
->
plot
)
def
summaryStats
:
Map
[
String
,
Any
]
=
Map
()
def
summaryStats
:
Map
[
String
,
Any
]
=
{
ConfigUtils
.
fileToConfigMap
(
output
)
}
}
object
CoverageStats
{
...
...
public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala
View file @
1bed81c6
...
...
@@ -24,12 +24,12 @@ object ShivaReport extends MultisampleReportBuilder {
val
regions
=
regionsPage
ReportPage
(
Map
(
"Samples"
->
generateSamplesPage
(
pageArgs
))
++
(
if
(
regions
.
isDefined
)
Map
(
regions
.
get
)
else
Map
())
++
Map
(
"Files"
->
filesPage
,
"Versions"
->
ReportPage
(
Map
(),
List
((
"Executables"
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/executables.ssp"
))),
Map
())
),
(
if
(
regions
.
isDefined
)
Map
(
regions
.
get
)
else
Map
())
++
Map
(
"Files"
->
filesPage
,
"Versions"
->
ReportPage
(
Map
(),
List
((
"Executables"
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/executables.ssp"
))),
Map
())
),
List
(
"Report"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/shiva/shivaFront.ssp"
),
"Variantcalling"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp"
,
...
...
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