Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
f8558f74
Commit
f8558f74
authored
Apr 10, 2017
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated some comments
parent
2129bb4f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
37 deletions
+35
-37
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala
...c/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala
+13
-16
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/MultisampleReportBuilder.scala
...mc/sasc/biopet/core/report/MultisampleReportBuilder.scala
+16
-16
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala
...scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala
+4
-2
flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala
...umc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala
+2
-3
No files found.
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala
View file @
f8558f74
...
...
@@ -44,27 +44,24 @@ object BammetricsReport extends ReportBuilder {
def
pipelineName
=
"bammetrics"
/** Root page for single BamMetrcis report */
def
indexPage
:
Future
[
ReportPage
]
=
Future
{
val
bamMetricsPage
=
Await
.
result
(
this
.
bamMetricsPage
(
summary
,
sampleId
,
libId
),
Duration
.
Inf
)
ReportPage
(
bamMetricsPage
.
subPages
:::
List
(
"Versions"
->
Future
(
ReportPage
(
List
(),
List
(
"Executables"
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/executables.ssp"
)),
Map
())),
"Files"
->
filesPage
(
sampleId
,
libId
)
),
List
(
"Report"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/bamMetricsFront.ssp"
)
)
:::
bamMetricsPage
.
sections
,
Map
()
)
}
def
indexPage
:
Future
[
ReportPage
]
=
bamMetricsPage
(
summary
,
sampleId
,
libId
).
map
{
bamMetricsPage
=>
ReportPage
(
bamMetricsPage
.
subPages
:::
List
(
"Versions"
->
Future
(
ReportPage
(
List
(),
List
(
"Executables"
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/executables.ssp"
)),
Map
())),
"Files"
->
filesPage
(
sampleId
,
libId
)
),
List
(
"Report"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/bamMetricsFront.ssp"
)
)
:::
bamMetricsPage
.
sections
,
Map
()
)
}
/** Generates a page with alignment stats */
def
bamMetricsPage
(
summary
:
SummaryDb
,
sampleId
:
Option
[
Int
],
libId
:
Option
[
Int
],
metricsTag
:
String
=
"bammetrics"
)
:
Future
[
ReportPage
]
=
Future
{
//val pipelineId: Int = summary.getPipelineId(runId, metricsTag).map(_.get)
val
wgsExecuted
=
summary
.
getStatsSize
(
runId
,
metricsTag
,
"wgs"
,
sample
=
sampleId
.
map
(
SampleId
),
library
=
libId
.
map
(
LibraryId
))
>=
1
val
rnaExecuted
=
summary
.
getStatsSize
(
runId
,
metricsTag
,
"rna"
,
sample
=
sampleId
.
map
(
SampleId
),
library
=
libId
.
map
(
LibraryId
))
>=
1
...
...
@@ -86,7 +83,7 @@ object BammetricsReport extends ReportBuilder {
ReportPage
(
if
(
targets
.
isEmpty
)
List
()
else
List
(
"Targets"
->
Future
(
ReportPage
(
else
List
(
"Targets"
->
Future
.
successful
(
ReportPage
(
List
(),
targets
.
map
(
t
=>
t
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/covstatsPlot.ssp"
,
Map
(
"target"
->
Some
(
t
)))),
Map
()))),
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/MultisampleReportBuilder.scala
View file @
f8558f74
...
...
@@ -41,28 +41,28 @@ trait MultisampleReportBuilder extends ReportBuilder {
}
/** Generate the samples page including a single sample page for each sample in the summary */
def
generateSamplesPage
(
args
:
Map
[
String
,
Any
])
:
Future
[
ReportPage
]
=
Future
{
val
samples
=
Await
.
result
(
summary
.
getSamples
(
runId
=
Some
(
runId
)),
Duration
.
Inf
)
val
samplePages
=
samples
.
map
(
_
.
id
)
.
map
(
sampleId
=>
sampleId
->
samplePage
(
sampleId
,
args
++
Map
(
"sampleId"
->
Some
(
sampleId
)))
.
map
(
x
=>
x
.
copy
(
subPages
=
x
.
subPages
:::
"Files"
->
filesPage
(
sampleId
,
None
)
::
Nil
)))
.
toList
ReportPage
(
samplePages
.
map
(
x
=>
samples
.
find
(
_
.
id
==
x
.
_1
).
get
.
name
->
x
.
_2
),
samplesSections
,
args
)
}
def
generateSamplesPage
(
args
:
Map
[
String
,
Any
])
:
Future
[
ReportPage
]
=
summary
.
getSamples
(
runId
=
Some
(
runId
)).
map
{
samples
=>
val
samplePages
=
samples
.
map
(
_
.
id
)
.
map
(
sampleId
=>
sampleId
->
samplePage
(
sampleId
,
args
++
Map
(
"sampleId"
->
Some
(
sampleId
)))
.
map
(
x
=>
x
.
copy
(
subPages
=
x
.
subPages
:::
"Files"
->
filesPage
(
sampleId
,
None
)
::
Nil
)))
.
toList
ReportPage
(
samplePages
.
map
(
x
=>
samples
.
find
(
_
.
id
==
x
.
_1
).
get
.
name
->
x
.
_2
),
samplesSections
,
args
)
}
/** Generate the libraries page for a single sample with a subpage for eacht library */
def
generateLibraryPage
(
args
:
Map
[
String
,
Any
])
:
Future
[
ReportPage
]
=
Future
{
def
generateLibraryPage
(
args
:
Map
[
String
,
Any
])
:
Future
[
ReportPage
]
=
{
val
sampleId
=
args
(
"sampleId"
)
match
{
case
Some
(
x
:
Int
)
=>
x
case
None
=>
throw
new
IllegalStateException
(
"Sample not found"
)
}
val
libraries
=
Await
.
result
(
summary
.
getLibraries
(
runId
=
Some
(
runId
),
sampleId
=
Some
(
sampleId
)),
Duration
.
Inf
)
val
libPages
=
libraries
.
map
(
_
.
id
)
.
map
(
libId
=>
libId
->
libraryPage
(
sampleId
,
libId
,
args
++
Map
(
"libId"
->
Some
(
libId
)))
.
map
(
x
=>
x
.
copy
(
subPages
=
x
.
subPages
:::
"Files"
->
filesPage
(
sampleId
,
libId
)
::
Nil
)))
.
toList
ReportPage
(
libPages
.
map
(
x
=>
libraries
.
find
(
_
.
id
==
x
.
_1
).
get
.
name
->
x
.
_2
),
librariesSections
,
args
)
summary
.
getLibraries
(
runId
=
Some
(
runId
),
sampleId
=
Some
(
sampleId
)).
map
{
libraries
=>
val
libPages
=
libraries
.
map
(
_
.
id
)
.
map
(
libId
=>
libId
->
libraryPage
(
sampleId
,
libId
,
args
++
Map
(
"libId"
->
Some
(
libId
))
)
.
map
(
x
=>
x
.
copy
(
subPages
=
x
.
subPages
:::
"Files"
->
filesPage
(
sampleId
,
libId
)
::
Nil
)))
.
toList
ReportPage
(
libPages
.
map
(
x
=>
libraries
.
find
(
_
.
id
==
x
.
_1
).
get
.
name
->
x
.
_2
),
librariesSections
,
args
)
}
}
}
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala
View file @
f8558f74
...
...
@@ -313,12 +313,14 @@ trait ReportBuilder extends ToolCommand {
case
(
moduleId
,
files
)
=>
val
moduleName
:
Future
[
String
]
=
moduleId
match
{
case
Some
(
id
)
=>
summary
.
getModuleName
(
pipelineId
,
id
).
map
(
_
.
getOrElse
(
"Pipeline"
))
case
_
=>
Future
(
"Pipeline"
)
case
_
=>
Future
.
successful
(
"Pipeline"
)
}
moduleName
.
map
(
_
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/files.ssp"
,
Map
(
"files"
->
files
)))
}
val
moduleSectionsSorted
=
moduleSections
.
find
(
_
.
_1
==
"Pipeline"
)
++
moduleSections
.
filter
(
_
.
_1
!=
"Pipeline"
)
summary
.
getPipelineName
(
pipelineId
=
pipelineId
).
map
(
_
.
get
->
Future
(
ReportPage
(
Nil
,
Await
.
result
(
Future
.
sequence
(
moduleSectionsSorted
),
Duration
.
Inf
).
toList
,
Map
())))
summary
.
getPipelineName
(
pipelineId
=
pipelineId
)
.
map
(
_
.
get
->
Future
.
sequence
(
moduleSectionsSorted
)
.
map
(
sections
=>
ReportPage
(
Nil
,
sections
.
toList
,
Map
())))
})
val
pipelineFiles
=
summary
.
getPipelineId
(
runId
,
pipelineName
)
...
...
flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala
View file @
f8558f74
...
...
@@ -42,11 +42,10 @@ object FlexiprepReport extends ReportBuilder {
override
def
pageArgs
=
Map
(
"multisample"
->
false
)
/** Index page for a flexiprep report */
def
indexPage
:
Future
[
ReportPage
]
=
Future
{
val
flexiprepPage
=
this
.
flexiprepPage
def
indexPage
:
Future
[
ReportPage
]
=
this
.
flexiprepPage
.
map
{
flexiprepPage
=>
ReportPage
(
Nil
,
List
(
"Report"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFront.ssp"
)
)
:::
Await
.
result
(
flexiprepPage
,
Duration
.
Inf
)
.
sections
,
)
:::
flexiprepPage
.
sections
,
Map
()
)
}
...
...
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