Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
6c753678
Commit
6c753678
authored
Aug 01, 2017
by
rhpvorderman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rna- and wgs histogram defutured
parent
2adc9bde
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
8 deletions
+76
-8
bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp
...s/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp
+1
-1
bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/rnaHistogram.ssp
...nl/lumc/sasc/biopet/pipelines/bammetrics/rnaHistogram.ssp
+4
-3
bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/wgsHistogram.ssp
...nl/lumc/sasc/biopet/pipelines/bammetrics/wgsHistogram.ssp
+5
-4
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReportPage.scala
...sc/biopet/pipelines/bammetrics/BammetricsReportPage.scala
+66
-0
No files found.
bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp
View file @
6c753678
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
#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 results: Map[String, Option[Any]] = insertSizeTableResults(sample.id, libId)
val results: Map[String, Option[Any]] = insertSizeTableResults(sample.id, libId)
}#
}#
#for (field <- fields)
#for (field <- fields)
<td>${results(field)}</td>
<td>${results(field)}</td>
...
...
bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/rnaHistogram.ssp
View file @
6c753678
...
@@ -20,6 +20,8 @@
...
@@ -20,6 +20,8 @@
<%@ var runId: Int %>
<%@ var runId: Int %>
<%@ var allSamples: Seq[Sample] %>
<%@ var allSamples: Seq[Sample] %>
<%@ var allLibraries: Seq[Library] %>
<%@ var allLibraries: Seq[Library] %>
<%@ var rnaHistogramPlotTables: Option[Array[Map[String, Array[Any]]]] %>
<%@ var rnaHistogramTableResults: Map[(Int, Int), Map[String, Option[Any]]] %>
#{
#{
val samples = sampleId match {
val samples = sampleId match {
case Some(id) => allSamples.filter(_.id == id).toList
case Some(id) => allSamples.filter(_.id == id).toList
...
@@ -39,7 +41,7 @@
...
@@ -39,7 +41,7 @@
#end
#end
#if (showPlot)
#if (showPlot)
#{ BammetricsReport.rnaHistogramPlot(outputDir, "rna",
summary, !sampleLevel, sampleId = sampleId, libraryId = libId
) }#
#{ BammetricsReport.rnaHistogramPlot(outputDir, "rna",
rnaHistogramPlotTables.getOrElse(Array(Map("x" -> Array(""))))
) }#
<div class="panel-body">
<div class="panel-body">
<img src="rna.png" class="img-responsive" />
<img src="rna.png" class="img-responsive" />
...
@@ -79,8 +81,7 @@
...
@@ -79,8 +81,7 @@
#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 results = rnaHistogramTableResults(sample.id, libId)
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>
...
...
bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/wgsHistogram.ssp
View file @
6c753678
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
<%@ var fields: List[String] = List("mean_coverage", "pct_5x", "pct_10x", "pct_15x", "pct_20x", "pct_25x", "pct_30x", "pct_40x", "pct_50x", "pct_60x", "pct_70x", "pct_80x", "pct_90x", "pct_100x")%>
<%@ var fields: List[String] = List("mean_coverage", "pct_5x", "pct_10x", "pct_15x", "pct_20x", "pct_25x", "pct_30x", "pct_40x", "pct_50x", "pct_60x", "pct_70x", "pct_80x", "pct_90x", "pct_100x")%>
<%@ var allSamples: Seq[Sample] %>
<%@ var allSamples: Seq[Sample] %>
<%@ var allLibraries: Seq[Library] %>
<%@ var allLibraries: Seq[Library] %>
<%@ var wgsHistogramPlotTables: Option[Array[Map[String, Array[Any]]]] %>
<%@ var wgsHistogramTableResults: Map[(Int, Int), Map[String, Option[Any]]] %>
#{
#{
val samples = sampleId match {
val samples = sampleId match {
case Some(id) => allSamples.filter(_.id == id).toList
case Some(id) => allSamples.filter(_.id == id).toList
...
@@ -38,7 +40,7 @@
...
@@ -38,7 +40,7 @@
#end
#end
#if (showPlot)
#if (showPlot)
#{ BammetricsReport.wgsHistogramPlot(outputDir, "
wgs", summary, !sampleLevel, sampleId = sampleId, libraryId = libId
) }#
#{ BammetricsReport.wgsHistogramPlot(outputDir, "
rna", wgsHistogramPlotTables.getOrElse(Array(Map("x" -> Array(""))))
) }#
<div class="panel-body">
<div class="panel-body">
<img src="wgs.png" class="img-responsive" />
<img src="wgs.png" class="img-responsive" />
...
@@ -78,9 +80,8 @@
...
@@ -78,9 +80,8 @@
#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 results = wgsHistogramTableResults(sample.id, libId)
val results = summary.getStatKeys(runId, "bammetrics", "wgs", 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>
#end
#end
...
...
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReportPage.scala
View file @
6c753678
...
@@ -144,5 +144,71 @@ object BammetricsReportPage {
...
@@ -144,5 +144,71 @@ object BammetricsReportPage {
"libId"
->
libId
"libId"
->
libId
)
)
}
}
def
rnaHistogramValues
(
summary
:
SummaryDb
,
runId
:
Int
,
allSamples
:
Seq
[
Sample
],
allLibraries
:
Seq
[
Library
],
sampleId
:
Option
[
Int
],
libId
:
Option
[
Int
],
fields
:
List
[
String
]
=
List
(
"PF_ALIGNED_BASES"
,
"MEDIAN_5PRIME_BIAS"
,
"MEDIAN_3PRIME_BIAS"
,
"MEDIAN_5PRIME_TO_3PRIME_BIAS"
),
sampleLevel
:
Boolean
=
false
,
showPlot
:
Boolean
=
false
,
showIntro
:
Boolean
=
true
,
showTable
:
Boolean
=
true
)
:
Map
[
String
,
Any
]
=
{
val
samples
=
sampleId
match
{
case
Some
(
id
)
=>
allSamples
.
filter
(
_
.
id
==
id
).
toList
case
_
=>
allSamples
.
toList
}
val
rnaHistogramPlotTables
:
Option
[
Array
[
Map
[
String
,
Array
[
Any
]]]]
=
if
(
showPlot
)
Some
(
BammetricsReport
.
rnaHistogramPlotTables
(
summary
,
!
sampleLevel
,
sampleId
,
libId
))
else
None
val
statsPaths
=
fields
.
map
(
x
=>
x
->
List
(
"metrics"
,
x
.
toUpperCase
)).
toMap
val
rnaHistogramTableResults
=
summary
.
getStatsForLibraries
(
runId
,
"bammetrics"
,
"rna"
,
sampleId
,
statsPaths
)
Map
(
"rnaHistogramPlotTables"
->
rnaHistogramPlotTables
,
"rnaHistogramTableResults"
->
rnaHistogramTableResults
,
"showIntro"
->
showIntro
,
"showTable"
->
showTable
,
"showPlot"
->
showPlot
,
"sampleId"
->
sampleId
,
"libId"
->
libId
)
}
def
wgsHistogramValues
(
summary
:
SummaryDb
,
runId
:
Int
,
allSamples
:
Seq
[
Sample
],
allLibraries
:
Seq
[
Library
],
sampleId
:
Option
[
Int
],
libId
:
Option
[
Int
],
fields
:
List
[
String
]
=
List
(
"mean_coverage"
,
"pct_5x"
,
"pct_10x"
,
"pct_15x"
,
"pct_20x"
,
"pct_25x"
,
"pct_30x"
,
"pct_40x"
,
"pct_50x"
,
"pct_60x"
,
"pct_70x"
,
"pct_80x"
,
"pct_90x"
,
"pct_100x"
),
sampleLevel
:
Boolean
=
false
,
showPlot
:
Boolean
=
false
,
showIntro
:
Boolean
=
true
,
showTable
:
Boolean
=
true
)
:
Map
[
String
,
Any
]
=
{
val
samples
=
sampleId
match
{
case
Some
(
id
)
=>
allSamples
.
filter
(
_
.
id
==
id
).
toList
case
_
=>
allSamples
.
toList
}
val
wgsHistogramPlotTables
:
Option
[
Array
[
Map
[
String
,
Array
[
Any
]]]]
=
if
(
showPlot
)
Some
(
BammetricsReport
.
wgsHistogramPlotTables
(
summary
,
!
sampleLevel
,
sampleId
,
libId
))
else
None
val
statsPaths
=
fields
.
map
(
x
=>
x
->
List
(
"metrics"
,
x
.
toUpperCase
)).
toMap
val
wgsHistogramTableResults
=
summary
.
getStatsForLibraries
(
runId
,
"bammetrics"
,
"wgs"
,
sampleId
,
statsPaths
)
Map
(
"wgsHistogramPlotTables"
->
wgsHistogramPlotTables
,
"wgsHistogramTableResults"
->
wgsHistogramTableResults
,
"showIntro"
->
showIntro
,
"showTable"
->
showTable
,
"showPlot"
->
showPlot
,
"sampleId"
->
sampleId
,
"libId"
->
libId
)
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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