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
7469830b
Commit
7469830b
authored
Apr 10, 2015
by
Peter van 't Hof
Browse files
Added dummy sections for alignment
parent
6a754e68
Changes
13
Hide whitespace changes
Inline
Side-by-side
public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp
0 → 100644
View file @
7469830b
#import(nl.lumc.sasc.biopet.core.summary.Summary)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
<%@ var sampleLevel: Boolean = false %>
<%@ var rootPath: String %>
#{
val samples = sampleId match {
case Some(sample) => List(sample.toString)
case _ => summary.samples.toList
}
}#
<table>
<thead><tr>
<th>Sample</th>
#if (!sampleLevel) <th>Library</th> #end
<th>Total</th>
<th>Mapped</th>
<th>(%)</th>
<th>Duplicates</th>
<th>(%)</th>
<th>Insert size</th>
</tr></thead>
<tbody>
#for (sample <- samples.toList.sorted)
#{
val libs = (libId, sampleLevel) match {
case (_, true) => List("")
case (Some(libId), _) => List(libId.toString)
case _ => summary.libraries(sample).toList
}
}#
<tr><td rowspan="${libs.size}"><a href="${rootPath}Samples/${sample}/index.html">${sample}</a></td>
#for (libId <- libs)
#if (libs.head != libId) <tr> #end
#if (!sampleLevel) <td><a href="${rootPath}Samples/${sample}/Libraries/${libId}/index.html">${libId}</a></td> #end
#{
val prefixPath = List("samples", sample) ::: (if (libId.isEmpty) Nil else List("libraries", libId)) ::: List("bammetrics", "stats")
val total = summary.getValue((prefixPath ::: List("biopet_flagstat", "All")):_*).getOrElse(0L).asInstanceOf[Long]
val mapped = summary.getValue((prefixPath ::: List("biopet_flagstat", "Mapped")):_*).getOrElse(0L).asInstanceOf[Long]
val duplicates = summary.getValue((prefixPath ::: List("biopet_flagstat", "Duplicates")):_*).getOrElse(0L).asInstanceOf[Long]
val insertsizeMean = summary.getValue((prefixPath ::: List("insert_size_metrics", "mean_insert_size")):_*)
}#
<td>${total}</td>
<td>${mapped}</td>
<td>${mapped.toDouble / total * 100}%</td>
<td>${duplicates}</td>
<td>${duplicates.toDouble / total * 100}%</td>
<td>${insertsizeMean}</td>
</tr>
#end
#end
</tbody>
</table>
\ No newline at end of file
public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bamMetricsFront.ssp
0 → 100644
View file @
7469830b
#{ //TODO: Need content }#
Todo
\ No newline at end of file
public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/flagstat.ssp
0 → 100644
View file @
7469830b
#{ //TODO: Need content }#
Todo
\ No newline at end of file
public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/gcBias.ssp
0 → 100644
View file @
7469830b
#{ //TODO: Need content }#
Todo
\ No newline at end of file
public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp
0 → 100644
View file @
7469830b
#{ //TODO: Need content }#
Todo
\ No newline at end of file
public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala
0 → 100644
View file @
7469830b
package
nl.lumc.sasc.biopet.pipelines.bammetrics
import
nl.lumc.sasc.biopet.core.report.
{
ReportBuilder
,
ReportPage
,
ReportSection
}
/**
* Created by pjvan_thof on 3/30/15.
*/
object
BammetricsReport
extends
ReportBuilder
{
val
reportName
=
"Bam Metrics"
def
indexPage
=
ReportPage
(
Map
(
"Bam Metrics"
->
bamMetricsPage
),
List
(
"Report"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/bamMetricsFront.ssp"
)
),
Map
()
)
def
bamMetricsPage
=
ReportPage
(
Map
(),
List
(
"Summary"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"
),
"Flagstat"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/flagstat.ssp"
),
"Insert Size"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp"
),
"GC Bias"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/gcBias.ssp"
)
),
Map
()
)
// FIXME: Not yet finished
}
public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp
View file @
7469830b
...
...
@@ -3,6 +3,7 @@
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
<%@ var rootPath: String %>
#{
val samples = sampleId match {
case Some(sample) => List(sample.toString)
...
...
@@ -31,11 +32,11 @@
libs.count(summary.getLibraryValue(sample, _, "flexiprep", "settings", "paired").getOrElse(false) == true)
}
}#
<tr><td rowspan="${sampleRowspan}">
${sample}
</td>
<tr><td rowspan="${sampleRowspan}">
<a href="${rootPath}Samples/${sample}/index.html">${sample}</a>
</td>
#for (libId <- libs)
#if (libs.head != libId) <tr> #end
#{ val paired = summary.getLibraryValue(sample, libId, "flexiprep", "settings", "paired").getOrElse(false) }#
<td #if (paired == true) rowspan="2" #end>
${libId}
</td>
<td #if (paired == true) rowspan="2" #end>
<a href="${rootPath}Samples/${sample}/Libraries/${libId}/index.html">${libId}</a>
</td>
#{ val reads = if (paired == true) List("R1", "R2") else List("R1") }#
#for (read <- reads)
#if (read == "R2") </tr><tr> #end
...
...
public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFront.ssp
0 → 100644
View file @
7469830b
#{ //TODO: Need content }#
Todo
\ No newline at end of file
public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp
View file @
7469830b
...
...
@@ -3,6 +3,7 @@
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
<%@ var rootPath: String %>
#{
val samples = sampleId match {
case Some(sample) => List(sample.toString)
...
...
@@ -30,11 +31,11 @@
libs.count(summary.getLibraryValue(sample, _, "flexiprep", "settings", "paired").getOrElse(false) == true)
}
}#
<tr><td rowspan="${sampleRowspan}">
${sample}
</td>
<tr><td rowspan="${sampleRowspan}">
<a href="${rootPath}Samples/${sample}/index.html">${sample}</a>
</td>
#for (libId <- libs)
#if (libs.head != libId) <tr> #end
#{ val paired = summary.getLibraryValue(sample, libId, "flexiprep", "settings", "paired").getOrElse(false) }#
<td #if (paired == true) rowspan="2" #end>
${libId}
</td>
<td #if (paired == true) rowspan="2" #end>
<a href="${rootPath}Samples/${sample}/Libraries/${libId}/index.html">${libId}</a>
</td>
#{ val reads = if (paired == true) List("R1", "R2") else List("R1") }#
#for (read <- reads)
#if (read == "R2") </tr><tr> #end
...
...
public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala
View file @
7469830b
...
...
@@ -8,20 +8,30 @@ import nl.lumc.sasc.biopet.core.report.{ ReportSection, ReportPage, ReportBuilde
object
FlexiprepReport
extends
ReportBuilder
{
val
reportName
=
"Flexiprep"
def
indexPage
=
{
ReportPage
(
Map
(),
List
(
"Read Summary"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"
),
"Base Summary"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp"
),
fastqcPlotSection
(
"Base quality"
,
"plot_per_base_quality"
),
fastqcPlotSection
(
"Sequence quality"
,
"plot_per_sequence_quality"
),
fastqcPlotSection
(
"Base GC content"
,
"plot_per_base_gc_content"
),
fastqcPlotSection
(
"Sequence GC content"
,
"plot_per_sequence_gc_content"
),
fastqcPlotSection
(
"Base seqeunce content"
,
"plot_per_base_sequence_content"
),
fastqcPlotSection
(
"Duplication"
,
"plot_duplication_levels"
),
fastqcPlotSection
(
"Kmers"
,
"plot_kmer_profiles"
),
fastqcPlotSection
(
"Length distribution"
,
"plot_sequence_length_distribution"
)
),
Map
())
}
def
indexPage
=
ReportPage
(
Map
(
"QC"
->
flexiprepPage
),
List
(
"Report"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFront.ssp"
)
),
Map
()
)
def
flexiprepPage
=
ReportPage
(
Map
(),
List
(
"Read Summary"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"
),
"Base Summary"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp"
),
fastqcPlotSection
(
"Base quality"
,
"plot_per_base_quality"
),
fastqcPlotSection
(
"Sequence quality"
,
"plot_per_sequence_quality"
),
fastqcPlotSection
(
"Base GC content"
,
"plot_per_base_gc_content"
),
fastqcPlotSection
(
"Sequence GC content"
,
"plot_per_sequence_gc_content"
),
fastqcPlotSection
(
"Base seqeunce content"
,
"plot_per_base_sequence_content"
),
fastqcPlotSection
(
"Duplication"
,
"plot_duplication_levels"
),
fastqcPlotSection
(
"Kmers"
,
"plot_kmer_profiles"
),
fastqcPlotSection
(
"Length distribution"
,
"plot_sequence_length_distribution"
)
),
Map
()
)
protected
def
fastqcPlotSection
(
name
:
String
,
tag
:
String
)
=
{
name
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastaqcPlot.ssp"
,
Map
(
"plot"
->
tag
))
...
...
public/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp
View file @
7469830b
...
...
@@ -2,6 +2,7 @@
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var rootPath: String %>
#{
val fields = List("Hom", "HomVar", "HomRef", "NoCall", "Variant", "NonInformative", "Total")
val samples = sampleId match {
...
...
@@ -16,7 +17,7 @@
</tr></thead>
<tbody>
#for (sample <- samples.toList.sorted)
<tr><td>
${sample}
</td>
<tr><td>
<a href="${rootPath}Samples/${sample}/index.html">${sample}</a>
</td>
#for (field <- fields)
<td>${summary.getSampleValue(sample, "shivavariantcalling", "stats", "multisample-vcfstats-final", "genotype", field)}</td>
#end
...
...
public/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/shivaFront.ssp
View file @
7469830b
...
...
@@ -6,6 +6,8 @@
<table>
<tbody>
<tr><th>Pipeline</th><td>Shiva</td></tr>
<tr><th><a href="${rootPath}/Samples/index.html">Samples</a></th><td>${summary.samples.size}</td></tr>
</tbody>
</table>
\ No newline at end of file
</table>
#{//TODO: Add settings}#
Todo: settings
\ No newline at end of file
public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala
View file @
7469830b
package
nl.lumc.sasc.biopet.pipelines.shiva
import
nl.lumc.sasc.biopet.core.report.
{
ReportSection
,
MultisampleReportBuilder
,
ReportPage
}
import
nl.lumc.sasc.biopet.pipelines.bammetrics.BammetricsReport
import
nl.lumc.sasc.biopet.pipelines.flexiprep.FlexiprepReport
/**
...
...
@@ -9,20 +10,31 @@ import nl.lumc.sasc.biopet.pipelines.flexiprep.FlexiprepReport
object
ShivaReport
extends
MultisampleReportBuilder
{
def
indexPage
=
ReportPage
(
Map
(
"General"
->
ReportPage
(
Map
(),
List
(
/*
"General" -> ReportPage(Map(), List(
"Variantcalling" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp"),
"Alignment" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp", Map("sampleLevel" -> true)),
"QC reads" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"),
"QC bases" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp")
),
Map
()),
), Map()),
*/
"Samples"
->
generateSamplesPage
(
pageArgs
)
),
List
(
"Report"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/shiva/shivaFront.ssp"
)),
List
(
"Report"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/shiva/shivaFront.ssp"
),
"Variantcalling"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp"
),
"Alignment"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"
,
Map
(
"sampleLevel"
->
true
)),
"QC reads"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"
),
"QC bases"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp"
)
),
pageArgs
)
def
samplePage
(
sampleId
:
String
,
args
:
Map
[
String
,
Any
])
=
{
ReportPage
(
Map
(
"Libraries"
->
generateLibraryPage
(
args
)),
List
(
"Libraries"
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/librariesList.ssp"
),
ReportPage
(
Map
(
"Libraries"
->
generateLibraryPage
(
args
),
"Alignment"
->
BammetricsReport
.
bamMetricsPage
),
List
(
"Alignment"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"
),
"Preprocessing"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"
,
Map
(
"sampleLevel"
->
true
)),
"Variantcalling"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp"
),
"QC reads"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"
),
"QC bases"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp"
)
...
...
@@ -30,13 +42,17 @@ object ShivaReport extends MultisampleReportBuilder {
}
def
libraryPage
(
libId
:
String
,
args
:
Map
[
String
,
Any
])
=
{
ReportPage
(
Map
(
"QC"
->
FlexiprepReport
.
indexPage
),
List
(
ReportPage
(
Map
(
"Alignment"
->
BammetricsReport
.
bamMetricsPage
,
"QC"
->
FlexiprepReport
.
flexiprepPage
),
List
(
"Alignment"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"
),
"QC reads"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"
),
"QC bases"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp"
)
),
args
)
}
def
reportName
=
"
Title Tes
t"
def
reportName
=
"
Shiva Repor
t"
// FIXME: Not yet finished
}
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