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
9817ac95
Commit
9817ac95
authored
Feb 21, 2017
by
Peter van 't Hof
Browse files
Fixing some templates
parent
eb4539c3
Changes
14
Hide whitespace changes
Inline
Side-by-side
bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp
View file @
9817ac95
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.utils.summary.
db.
Summary
Db
)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(scala.concurrent.Await)
#import(scala.concurrent.duration.Duration)
#import(nl.lumc.sasc.biopet.pipelines.bammetrics.BammetricsReport)
#import(java.io.File)
<%@ var summary: Summary %>
<%@ var sampleId: Option[
String
] = None %>
<%@ var libId: Option[
String
] = None %>
<%@ var summary: Summary
Db
%>
<%@ var sampleId: Option[
Int
] = None %>
<%@ var libId: Option[
Int
] = None %>
<%@ var sampleLevel: Boolean = false %>
<%@ var rootPath: String %>
<%@ var outputDir: File %>
<%@ var showPlot: Boolean = false %>
<%@ var showTable: Boolean = true %>
<%@ var showIntro: Boolean = true%>
<%@ var runId: Int %>
#{
val samples = sampleId match {
case Some(sample) => {
List(sample.toString)
}
case _ => summary.samples.toList
}
val samples = Await.result(summary.getSamples(runId = Some(runId)), Duration.Inf)
}#
#if (showIntro)
<br/>
...
...
@@ -69,12 +67,12 @@
<th>(%)</th>
</tr></thead>
<tbody>
#for (sample <- samples.
toList.sorted
)
#for (sample <- samples.
sortBy(_.name)
)
#{
val libs = (libId, sampleLevel) match {
case (_, true) => List(
""
)
case (Some(
libId
), _) => List(libId
.toString).sorted
case _ => summary.
l
ibraries(sample).toList
.sorted
val libs
: List[Option[Int]]
= (libId, sampleLevel) match {
case (_, true) => List(
None
)
case (Some(
_
), _) => List(libId
)
case _ =>
Await.result(
summary.
getL
ibraries(sample
Id = Some(sample.id), runId = Some(runId)), Duration.Inf).map(x => Some(x.id)
).toList
}
}#
<tr><td rowspan="${libs.size}"><a href="${rootPath}Samples/${sample}/index.html">${sample}</a></td>
...
...
@@ -82,11 +80,17 @@
#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("bamstats", "flagstats", "All")):_*).getOrElse(0L).asInstanceOf[Long]
val mapped = summary.getValue((prefixPath ::: List("bamstats", "flagstats", "Mapped")):_*).getOrElse(0L).asInstanceOf[Long]
val duplicates = summary.getValue((prefixPath ::: List("bamstats", "flagstats", "Duplicates")):_*).getOrElse(0L).asInstanceOf[Long]
val secondary = summary.getValue((prefixPath ::: List("bamstats", "flagstats", "NotPrimaryAlignment")):_*).getOrElse(0L).asInstanceOf[Long]
val statsPaths = Map(
"All" -> List("flagstats", "All"),
"Mapped" -> List("flagstats", "Mapped"),
"Duplicates" -> List("flagstats", "Duplicates"),
"NotPrimaryAlignment" -> List("flagstats", "NotPrimaryAlignment")
)
val results = summary.getStatKeys(runId, Right("bammetrics"), Some(Right("bamstats")), sample = Some(Left(sample.id)), library = libId.map(Left(_)), keyValues = statsPaths)
val total = results("All").getOrElse(0L).asInstanceOf[Long]
val mapped = results("Mapped").getOrElse(0L).asInstanceOf[Long]
val duplicates = results("Duplicates").getOrElse(0L).asInstanceOf[Long]
val secondary = results("NotPrimaryAlignment").getOrElse(0L).asInstanceOf[Long]
}#
<td>${total}</td>
<td>${mapped}</td>
...
...
bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/clipping.ssp
View file @
9817ac95
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.utils.summary.
db.
Summary
Db
)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(scala.concurrent.Await)
#import(scala.concurrent.duration.Duration)
#import(nl.lumc.sasc.biopet.pipelines.bammetrics.BammetricsReport)
#import(java.io.File)
#import(org.apache.commons.io.FileUtils)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
<%@ var rootPath: String %>
<%@ var metricsTag: String = "bammetrics" %>
<%@ var summary: SummaryDb %>
<%@ var sampleId: Option[Int] = None %>
<%@ var libId: Option[Int] = None %>
<%@ var sampleLevel: Boolean = false %>
<%@ var rootPath: String %>
<%@ var outputDir: File %>
<%@ var fields: List[String] = List("min", "max", "mean", "median", "modal")%>
<%@ var showPlot: Boolean = false %>
<%@ var showTable: Boolean = true %>
<%@ var showIntro: Boolean = true%>
<%@ var runId: Int %>
<%@ var fields: List[String] = List("min", "max", "mean", "median", "modal")%>
#{
val samples = sampleId match {
case Some(sample) => {
List(sample.toString)
}
case _ => summary.samples.toList
}
val samples = Await.result(summary.getSamples(runId = Some(runId)), Duration.Inf)
}#
#if (showIntro)
...
...
@@ -42,7 +38,7 @@
#end
#if (showPlot)
#{ BammetricsReport.clippingPlot(outputDir, "clipping", summary, !sampleLevel, sampleId = sampleId, libId = libId) }#
#{ BammetricsReport.clippingPlot(outputDir, "clipping", summary, !sampleLevel, sampleId = sampleId, lib
rary
Id = libId) }#
<div class="panel-body">
<img src="clipping.png" class="img-responsive" />
...
...
@@ -71,12 +67,12 @@
#end
</tr></thead>
<tbody>
#for (sample <- samples.
toList.sorted
)
#for (sample <- samples.
sortBy(_.name)
)
#{
val libs = (libId, sampleLevel) match {
case (_, true) => List(
""
)
case (Some(
libId
), _) => List(libId
.toString
)
case _ => summary.
l
ibraries(sample).toList
val libs
: List[Option[Int]]
= (libId, sampleLevel) match {
case (_, true) => List(
None
)
case (Some(
_
), _) => List(libId)
case _ =>
Await.result(
summary.
getL
ibraries(sample
Id = Some(sample.id), runId = Some(runId)), Duration.Inf).map(x => Some(x.id)
).toList
}
}#
<tr><td rowspan="${libs.size}"><a href="${rootPath}Samples/${sample}/index.html">${sample}</a></td>
...
...
@@ -84,14 +80,11 @@
#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 fieldValues = for (field <- fields) yield {
summary.getValue((prefixPath ::: List("bamstats", "clipping", "general", field)):_*).getOrElse("N/A")
}
val statsPaths = fields.map(x => x -> List("clipping", "general", x)).toMap
val results = summary.getStatKeys(runId, Right("bammetrics"), Some(Right("bamstats")), sample = Some(Left(sample.id)), library = libId.map(Left(_)), keyValues = statsPaths)
}#
#for (
value
<- field
Value
s)
<td>${
value
}</td>
#for (
field
<- fields)
<td>${
results(field)
}</td>
#end
</tr>
#end
...
...
bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/mappingQuality.ssp
View file @
9817ac95
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.utils.summary.
db.
Summary
Db
)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(scala.concurrent.Await)
#import(scala.concurrent.duration.Duration)
#import(nl.lumc.sasc.biopet.pipelines.bammetrics.BammetricsReport)
#import(java.io.File)
#import(org.apache.commons.io.FileUtils)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
<%@ var rootPath: String %>
<%@ var metricsTag: String = "bammetrics" %>
<%@ var summary: SummaryDb %>
<%@ var sampleId: Option[Int] = None %>
<%@ var libId: Option[Int] = None %>
<%@ var sampleLevel: Boolean = false %>
<%@ var rootPath: String %>
<%@ var outputDir: File %>
<%@ var fields: List[String] = List("min", "max", "mean", "median", "modal")%>
<%@ var showPlot: Boolean = false %>
<%@ var showTable: Boolean = true %>
<%@ var showIntro: Boolean = true%>
<%@ var runId: Int %>
<%@ var fields: List[String] = List("min", "max", "mean", "median", "modal")%>
#{
val samples = sampleId match {
case Some(sample) => {
List(sample.toString)
}
case _ => summary.samples.toList
}
val samples = Await.result(summary.getSamples(runId = Some(runId)), Duration.Inf)
}#
#if (showIntro)
...
...
@@ -42,7 +39,7 @@
#end
#if (showPlot)
#{ BammetricsReport.mappingQualityPlot(outputDir, "mapping_quality", summary, !sampleLevel, sampleId = sampleId, libId = libId) }#
#{ BammetricsReport.mappingQualityPlot(outputDir, "mapping_quality", summary, !sampleLevel, sampleId = sampleId, lib
rary
Id = libId) }#
<div class="panel-body">
<img src="mapping_quality.png" class="img-responsive" />
...
...
@@ -71,12 +68,12 @@
#end
</tr></thead>
<tbody>
#for (sample <- samples.
toList.sorted
)
#for (sample <- samples.
sortBy(_.name)
)
#{
val libs = (libId, sampleLevel) match {
case (_, true) => List(
""
)
case (Some(
libId
), _) => List(libId
.toString
)
case _ => summary.
l
ibraries(sample).toList
val libs
: List[Option[Int]]
= (libId, sampleLevel) match {
case (_, true) => List(
None
)
case (Some(
_
), _) => List(libId)
case _ =>
Await.result(
summary.
getL
ibraries(sample
Id = Some(sample.id), runId = Some(runId)), Duration.Inf).map(x => Some(x.id)
).toList
}
}#
<tr><td rowspan="${libs.size}"><a href="${rootPath}Samples/${sample}/index.html">${sample}</a></td>
...
...
@@ -84,14 +81,11 @@
#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 fieldValues = for (field <- fields) yield {
summary.getValue((prefixPath ::: List("bamstats", "mapping_quality", "general", field)):_*).getOrElse("N/A")
}
val statsPaths = fields.map(x => x -> List("mapping_quality", "general", x)).toMap
val results = summary.getStatKeys(runId, Right("bammetrics"), Some(Right("bamstats")), sample = Some(Left(sample.id)), library = libId.map(Left(_)), keyValues = statsPaths)
}#
#for (
value
<- field
Value
s)
<td>${
value
}</td>
#for (
field
<- fields)
<td>${
results(field)
}</td>
#end
</tr>
#end
...
...
biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/executables.ssp
View file @
9817ac95
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.utils.summary.
db.
Summary
Db
)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<%@ var summary: Summary %>
#import(scala.concurrent.Await)
#import(scala.concurrent.duration.Duration)
<%@ var summary: SummaryDb %>
<%@ var rootPath: String %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
<%@ var pipeline: String = summary.getValue("meta", "pipeline_name").getOrElse("").toString %>
<%@ var runId: Int %>
#{
val executables =
summary.getValue(sampleId, libId, pipeline, "executables").getOrElse(Map()).asInstanceOf[Map[String, Map[String, Any]]]
val executables =
Await.result(summary.getExecutables(runId = Some(runId)), Duration.Inf)
}#
<table class="table">
...
...
@@ -17,11 +17,11 @@
</tr>
</thead>
<tbody>
#for (
nam
e <- executables.
keySet.toList.sorted
)
#for (
ex
e <- executables.
sortBy(_.toolName)
)
<tr>
<td>${
n
ame}</td>
<td>${
exe.toolN
ame}</td>
#{
val version = exe
cutables(name).get("
version
")
match {
val version = exe
.
version match {
case Some(x) if x != None => x.toString
case _ => "N/A"
}
...
...
biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/librariesList.ssp
View file @
9817ac95
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.utils.summary.
db.
Summary
Db
)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<%@ var summary: Summary %>
#import(scala.concurrent.Await)
#import(scala.concurrent.duration.Duration)
<%@ var summary: SummaryDb %>
<%@ var rootPath: String %>
<%@ var sampleId: Option[String] = None %>
<%@ var sampleId: Option[Int] = None %>
<%@ var runId: Int %>
<table class="table">
<thead><tr><th>Libraries</th></tr></thead>
<tbody>
#for (lib <- summary.
l
ibraries(
sampleId.get).toList.sorted
)
<tr><td><a href="${rootPath}Samples/${
sampleId
}/Libraries/${lib}/index.html">${lib}</a></td></tr>
#for (lib <-
Await.result(
summary.
getL
ibraries(
runId = Some(runId)), Duration.Inf)
)
<tr><td><a href="${rootPath}Samples/${
Await.result(summary.getSampleName(lib.sampleId), Duration.Inf)
}/Libraries/${lib
.name
}/index.html">${lib}</a></td></tr>
#end
</tbody>
</table>
\ No newline at end of file
biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/main.ssp
View file @
9817ac95
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.utils.summary.
db.
Summary
Db
)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<
%@
var
summary:
Summary
%
>
<
%@
var
summary:
Summary
Db
%
>
<
%@
var
indexPage:
ReportPage
%
>
<
%@
var
reportName:
String
%
>
<
%@
var
page:
ReportPage
%
>
...
...
biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/reference.ssp
View file @
9817ac95
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.utils.summary.
db.
Summary
Db
)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<%@ var summary: Summary %>
#import(scala.concurrent.Await)
#import(scala.concurrent.duration.Duration)
<%@ var summary: SummaryDb %>
<%@ var rootPath: String %>
<%@ var pipeline: String %>
<%@ var runId: Int %>
#{
val contigs = summary.getValue(pipeline, "settings", "reference", "contigs").getOrElse(Map.empty).asInstanceOf[Map[String, Map[String, Any]]]
val settings = summary.getSettingKeys(runId, Right(pipeline),
keyValues = Map(
"contigs" -> List("reference", "contigs"),
"species" -> List("reference", "species"),
"name" -> List("reference", "name")
))
val contigs = settings.getOrElse("contigs", Some(Map.empty)).get.asInstanceOf[Map[String, Map[String, Any]]]
val referenceFile = Await.result(summary.getFile(runId, pipeline, None, None, None, key = "referenceFasta"), Duration.Inf)
}#
<table class="table">
<tbody>
<tr><th>Species</th><td>${s
ummary.getValue(pipeline, "settings", "reference",
"species")}</td></tr>
<tr><th>Name</th><td>${s
ummary.getValue(pipeline, "settings", "reference",
"name")}</td></tr>
<tr><th>File</th><td>${
summary.getValue(pipeline, "files", "pipeline", "referenceFasta", "
path
"
)}</td></tr>
<tr><th>MD5</th><td>${
summary.getValue(pipeline, "files", "pipeline", "referenceFasta", "
md5
"
)}</td></tr>
<tr><th>Species</th><td>${s
ettings.get(
"species")}</td></tr>
<tr><th>Name</th><td>${s
ettings.get(
"name")}</td></tr>
<tr><th>File</th><td>${
referenceFile.map(_.
path)}</td></tr>
<tr><th>MD5</th><td>${
referenceFile.map(_.
md5)}</td></tr>
</tbody>
</table>
...
...
biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/samplesList.ssp
View file @
9817ac95
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.utils.summary.
db.
Summary
Db
)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<%@ var summary: Summary %>
#import(scala.concurrent.Await)
#import(scala.concurrent.duration.Duration)
<%@ var summary: SummaryDb %>
<%@ var rootPath: String %>
<%@ var runId: Int %>
<table class="table sortable-theme-bootstrap" data-sortable>
<thead><tr><th data-sorted="true" data-sorted-direction="ascending">Sample</th></tr></thead>
<tbody>
#for (sample <- summary.
s
amples
.toList.sorted
)
<tr><td><a href="${rootPath}Samples/${sample}/index.html">${sample}</a></td></tr>
#for (sample <-
Await.result(
summary.
getS
amples
(runId = Some(runId)), Duration.Inf)
)
<tr><td><a href="${rootPath}Samples/${sample
.name
}/index.html">${sample
.name
}</a></td></tr>
#end
</tbody>
</table>
\ No newline at end of file
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/db/SummaryDb.scala
View file @
9817ac95
...
...
@@ -407,9 +407,9 @@ class SummaryDb(val db: Database) extends Closeable {
}
def
getFile
(
runId
:
Int
,
pipelineName
:
String
,
moduleName
:
Option
[
String
],
sampleName
:
Option
[
String
],
libraryName
:
Option
[
String
],
key
:
String
)
:
Future
[
Option
[
File
]]
=
{
libraryName
:
Option
[
String
],
key
:
String
)
:
Future
[
Option
[
Schema.
File
]]
=
{
db
.
run
(
filesFilter
(
runId
=
Some
(
runId
),
pipelineName
=
Some
(
pipelineName
),
moduleName
=
Some
(
moduleName
),
sampleName
=
Some
(
sampleName
),
libraryName
=
Some
(
libraryName
),
key
=
Some
(
key
)).
map
(
_
.
path
).
result
).
map
(
_
.
headOption
.
map
(
new
File
(
_
))
)
sampleName
=
Some
(
sampleName
),
libraryName
=
Some
(
libraryName
),
key
=
Some
(
key
)).
result
).
map
(
_
.
headOption
)
}
/** Creates a file. This method will raise expection if it already exist */
...
...
mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/mappingFront.ssp
View file @
9817ac95
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.utils.summary.
db.
Summary
Db
)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<%@ var summary: Summary %>
#import(scala.concurrent.Await)
#import(scala.concurrent.duration.Duration)
<%@ var summary: SummaryDb %>
<%@ var rootPath: String %>
<%@ var sampleId: Option[String] %>
<%@ var libId: Option[String] %>
<%@ var pipeline: String %>
<%@ var runId: Int %>
<%@ var sampleId: Option[Int] %>
<%@ var libId: Option[Int] %>
#{
val run = Await.result(summary.getRuns(runId = Some(runId)), Duration.Inf).head
val settings = summary.getSettingKeys(runId, Right(pipeline),
keyValues = Map(
"contigs" -> List("reference", "contigs"),
"species" -> List("reference", "species"),
"name" -> List("reference", "name")
))
}#
<table class="table">
<tbody>
<tr><th>Pipeline</th><td>Mapping</td></tr>
<tr><th>Version</th><td>${summary.getValue("meta", "pipeline_version")}</td></tr>
<tr><th>Last commit hash</th><td>${summary.getValue("meta", "last_commit_hash")}</td></tr>
<tr><th>Output directory</th><td>${summary.getValue("meta", "output_dir")}</td></tr>
<tr><th>Sample ID</th><td>${sampleId}</td></tr>
<tr><th>Library ID</th><td>${libId}</td></tr>
<tr><th>Pipeline</th><td>${pipeline}</td></tr>
<tr><th>Version</th><td>${run.version}</td></tr>
<tr><th>Last commit hash</th><td>${run.commitHash}</td></tr>
<tr><th>Output directory</th><td>${run.outputDir}</td></tr>
<tr><th>Reference</th><td>${settings.get("species")} - ${settings.get("name")}</td></tr>
<tr><th>Sample</th><td>${sampleId}</td></tr>
<tr><th>Library</th><td>${libId}</td></tr>
</tbody>
</table>
<br/>
...
...
mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/multisampleMappingFront.ssp
View file @
9817ac95
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.utils.summary.
db.
Summary
Db
)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<%@ var summary: Summary %>
#import(scala.concurrent.Await)
#import(scala.concurrent.duration.Duration)
<%@ var summary: SummaryDb %>
<%@ var rootPath: String %>
<%@ var pipeline: String %>
<%@ var runId: Int %>
#{
val run = Await.result(summary.getRuns(runId = Some(runId)), Duration.Inf).head
val samples = Await.result(summary.getSamples(runId = Some(runId)), Duration.Inf)
val settings = summary.getSettingKeys(runId, Right(pipeline),
keyValues = Map(
"contigs" -> List("reference", "contigs"),
"species" -> List("reference", "species"),
"name" -> List("reference", "name")
))
}#
<table class="table">
<tbody>
<tr><th>Pipeline</th><td>${pipeline}</td></tr>
<tr><th>Version</th><td>${
summary.getValue("meta", "pipeline_
version
")
}</td></tr>
<tr><th>Last commit hash</th><td>${
summary.getValue("meta", "last_
commit
_h
ash
")
}</td></tr>
<tr><th>Output directory</th><td>${
summary.getValue("meta", "output_dir")
}</td></tr>
<tr><th>Reference</th><td>${s
ummary.getValue(pipeline, "settings", "reference", "species")} - ${summary.getValue(pipeline, "settings", "reference",
"name")}</td></tr>
<tr><th>Number of samples</th><td>${
summary.
samples.size}</td></tr>
<tr><th>Version</th><td>${
run.
version}</td></tr>
<tr><th>Last commit hash</th><td>${
run.
commit
H
ash}</td></tr>
<tr><th>Output directory</th><td>${
run.outputDir
}</td></tr>
<tr><th>Reference</th><td>${s
ettings.get("species")} - ${settings.get(
"name")}</td></tr>
<tr><th>Number of samples</th><td>${samples.size}</td></tr>
</tbody>
</table>
<br/>
...
...
mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp
deleted
100644 → 0
View file @
eb4539c3
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(nl.lumc.sasc.biopet.pipelines.bammetrics.BammetricsReport)
#import(java.io.File)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
<%@ var sampleLevel: Boolean = true %>
<%@ var rootPath: String %>
<%@ var outputDir: File %>
<%@ var pipelineName: String = "mapping" %>
<%@ var fileTag: String = "output_bamfile" %>
#{
val samples = sampleId match {
case Some(sample) => {
List(sample.toString)
}
case _ => summary.samples.toList
}
val pipelineOutputDir = summary.getValue("meta", "output_dir").getOrElse("").toString
def removeDir(value: Option[Any]): Option[Any] = {
value.collect { case a =>
if (a.toString.startsWith(pipelineOutputDir) && pipelineOutputDir.nonEmpty) "./" + a.toString.stripPrefix(pipelineOutputDir + File.separator)
else a
}
}
}#
<div class="panel-body">
<!-- Table -->
<table class="table">
<thead><tr>
<th>Sample</th>
#if (!sampleLevel) <th>Library</th> #end
<th>Path</th>
<th>MD5</th>
</tr></thead>
<tbody>
#for (sample <- samples.toList.sorted)
#{
val libs = (libId, sampleLevel) match {
case (_, true) => List("")
case (Some(libId), _) => List(libId.toString).sorted
case _ => summary.libraries(sample).toList.sorted
}
}#
<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
<td>${removeDir(summary.getValue(Some(sample), (if (sampleLevel) None else Some(libId)), pipelineName, "files", "pipeline", fileTag, "path"))}</td>
<td>${summary.getValue(Some(sample), (if (sampleLevel) None else Some(libId)), pipelineName, "files", "pipeline", fileTag, "md5")}</td>
</tr>
#end
#end
</tbody>
</table>
</div>
mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingReport.scala
View file @
9817ac95
...
...
@@ -55,11 +55,7 @@ object MappingReport extends ReportBuilder {
bamMetricsPage
.
map
(
_
.
subPages
).
getOrElse
(
Nil
)
:::
List
(
"Versions"
->
ReportPage
(
List
(),
List
(
"Executables"
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/executables.ssp"
)),
Map
()),
"Files"
->
ReportPage
(
List
(),
(
if
(
skipFlexiprep
)
Nil
else
List
(
"Input fastq files"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepInputfiles.ssp"
),
"After QC fastq files"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepOutputfiles.ssp"
)))
:::
List
(
"Bam files per lib"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp"
,
Map
(
"sampleLevel"
->
false
))
),
Map
())
"Files"
->
ReportPage
(
List
(),
Nil
,
Map
())
)
:::
(
if
(
krakenExecuted
)
List
(
"Gears - Metagenomics"
->
ReportPage
(
List
(),
List
(
"Sunburst analysis"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/gears/gearsSunburst.ssp"
...
...
mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala
View file @
9817ac95
...
...
@@ -115,13 +115,7 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
def
filesPage
:
ReportPage
=
{
val
flexiprepExecuted
=
Await
.
result
(
summary
.
getStatsSize
(
runId
,
Right
(
"flexiprep"
),
Some
(
None
),
mustHaveLibrary
=
true
),
Duration
.
Inf
)
>=
1
ReportPage
(
List
(),
(
if
(
flexiprepExecuted
)
List
(
"Input fastq files"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepInputfiles.ssp"
),
"After QC fastq files"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepOutputfiles.ssp"
))
else
Nil
)
:::
List
(
"Bam files per lib"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp"
,
Map
(
"sampleLevel"
->
false
)),
"Preprocessed bam files"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp"
,
Map
(
"pipelineName"
->
pipelineName
,
"fileTag"
->
"output_bam_preprocess"
))),
Map
())
ReportPage
(
List
(),
Nil
,
Map
())
}
/** Single sample page */
...
...
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