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
f7dce595
Commit
f7dce595
authored
Mar 13, 2017
by
Peter van 't Hof
Browse files
Added first version of files to report
parent
10385625
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/files.ssp
0 → 100644
View file @
f7dce595
mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala
View file @
f7dce595
...
...
@@ -14,15 +14,16 @@
*/
package
nl.lumc.sasc.biopet.pipelines.mapping
import
nl.lumc.sasc.biopet.core.report.
{
MultisampleReportBuilder
,
ReportBuilderExtension
,
ReportPage
,
ReportSection
}
import
nl.lumc.sasc.biopet.core.report.
{
MultisampleReportBuilder
,
ReportBuilderExtension
,
ReportPage
,
ReportSection
}
import
nl.lumc.sasc.biopet.pipelines.bammetrics.BammetricsReport
import
nl.lumc.sasc.biopet.pipelines.flexiprep.FlexiprepReport
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.utils.summary.db.SummaryDb.Implicts._
import
nl.lumc.sasc.biopet.utils.summary.db.SummaryDb.
{
NoLibrary
,
NoModule
}
import
nl.lumc.sasc.biopet.utils.summary.db.SummaryDb.
_
import
scala.concurrent.Await
import
scala.concurrent.
{
Await
,
Future
}
import
scala.concurrent.duration.Duration
import
scala.concurrent.ExecutionContext.Implicits.global
/**
* Created by pjvanthof on 11/01/16.
...
...
@@ -80,7 +81,7 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
List
(
"Reference"
->
ReportPage
(
List
(),
List
(
"Reference"
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/reference.ssp"
,
Map
(
"pipeline"
->
pipelineName
))
),
Map
()),
"Files"
->
filesPage
(
),
"Files"
->
Await
.
result
(
filesPage
(),
Duration
.
Inf
),
"Versions"
->
ReportPage
(
List
(),
List
(
"Executables"
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/executables.ssp"
)),
Map
())
),
...
...
@@ -114,10 +115,19 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
}
/** Files page, can be used general or at sample level */
def
filesPage
(
sampleId
:
Option
[
Int
]
=
None
,
libraryId
:
Option
[
Int
]
=
None
)
:
ReportPage
=
{
val
flexiprepExecuted
=
Await
.
result
(
summary
.
getStatsSize
(
runId
,
"flexiprep"
,
NoModule
,
mustHaveLibrary
=
true
),
Duration
.
Inf
)
>=
1
ReportPage
(
List
(),
Nil
,
Map
())
def
filesPage
(
sampleId
:
Option
[
Int
]
=
None
,
libraryId
:
Option
[
Int
]
=
None
)
:
Future
[
ReportPage
]
=
{
val
dbFiles
=
summary
.
getFiles
(
runId
,
sample
=
Some
(
sampleId
.
map
(
SampleId
).
getOrElse
(
NoSample
)),
library
=
Some
(
libraryId
.
map
(
LibraryId
).
getOrElse
(
NoLibrary
)))
.
map
(
_
.
groupBy
(
_
.
pipelineId
))
.
map
(
_
.
map
{
case
(
pipelineId
,
files
)
=>
val
moduleSections
=
files
.
groupBy
(
_
.
moduleId
).
map
{
case
(
moduleId
,
files
)
=>
summary
.
getModules
(
moduleId
=
moduleId
,
pipelineId
=
pipelineId
)
.
map
(
_
.
headOption
.
map
(
_
.
name
).
getOrElse
(
"Pipeline"
)
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/files.ssp"
))
}
summary
.
getPipelines
(
pipelineId
=
pipelineId
).
map
(
_
.
head
.
name
->
ReportPage
(
Nil
,
Await
.
result
(
Future
.
sequence
(
moduleSections
),
Duration
.
Inf
).
toList
,
Map
()))
})
dbFiles
.
flatMap
(
Future
.
sequence
(
_
)).
map
(
x
=>
ReportPage
(
x
.
toList
,
Nil
,
Map
()))
}
/** Single sample page */
...
...
@@ -142,7 +152,7 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
"Krona Plot"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp"
)),
Map
()))
else
Nil
)
++
List
(
"Files"
->
filesPage
(
)
List
(
"Files"
->
Await
.
result
(
filesPage
(
sampleId
=
sampleId
),
Duration
.
Inf
)
),
List
(
"Alignment"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"
,
Map
(
"showPlot"
->
true
)),
...
...
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