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
800ad479
Commit
800ad479
authored
Jan 25, 2016
by
Peter van 't Hof
Browse files
Skipped flexiprep stats when flexiprep is not executed
parent
b2156b2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala
View file @
800ad479
...
...
@@ -28,6 +28,9 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
val
wgsExecuted
=
summary
.
getSampleValues
(
"bammetrics"
,
"stats"
,
"wgs"
).
values
.
exists
(
_
.
isDefined
)
val
rnaExecuted
=
summary
.
getSampleValues
(
"bammetrics"
,
"stats"
,
"rna"
).
values
.
exists
(
_
.
isDefined
)
val
flexiprepExecuted
=
summary
.
getLibraryValues
(
"flexiprep"
)
.
filter
(
_
.
_2
.
isDefined
)
.
nonEmpty
ReportPage
(
List
(
"Samples"
->
generateSamplesPage
(
pageArgs
))
++
...
...
@@ -51,25 +54,38 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
(
if
(
rnaExecuted
)
List
(
"Rna coverage"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/rnaHistogram.ssp"
,
Map
(
"sampleLevel"
->
true
,
"showPlot"
->
true
,
"showTable"
->
false
)))
else
Nil
)
++
List
(
"QC reads"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"
,
(
if
(
flexiprepExecuted
)
List
(
"QC reads"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"
,
Map
(
"showPlot"
->
true
,
"showTable"
->
false
)),
"QC bases"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp"
,
Map
(
"showPlot"
->
true
,
"showTable"
->
false
))
),
)
else
Nil
),
pageArgs
)
}
/** Files page, can be used general or at sample level */
def
filesPage
:
ReportPage
=
ReportPage
(
List
(),
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"
),
"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
())
def
filesPage
:
ReportPage
=
{
val
flexiprepExecuted
=
summary
.
getLibraryValues
(
"flexiprep"
)
.
filter
(
_
.
_2
.
isDefined
)
.
nonEmpty
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
())
}
/** Single sample page */
def
samplePage
(
sampleId
:
String
,
args
:
Map
[
String
,
Any
])
:
ReportPage
=
{
val
flexiprepExecuted
=
summary
.
getLibraryValues
(
"flexiprep"
)
.
filter
(
_
.
_1
.
_1
==
sampleId
)
.
filter
(
_
.
_2
.
isDefined
)
.
nonEmpty
ReportPage
(
List
(
"Libraries"
->
generateLibraryPage
(
args
),
"Alignment"
->
BammetricsReport
.
bamMetricsPage
(
summary
,
Some
(
sampleId
),
None
),
...
...
@@ -78,9 +94,10 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
"Alignment"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"
,
if
(
summary
.
libraries
(
sampleId
).
size
>
1
)
Map
(
"showPlot"
->
true
)
else
Map
()),
"Preprocessing"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"
,
Map
(
"sampleLevel"
->
true
)))
++
List
(
"QC reads"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"
),
(
if
(
flexiprepExecuted
)
List
(
"QC reads"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"
),
"QC bases"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp"
)
),
args
)
)
else
Nil
),
args
)
}
/** Library page */
...
...
@@ -88,11 +105,11 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
val
flexiprepExecuted
=
summary
.
getValue
(
Some
(
sampleId
),
Some
(
libId
),
"flexiprep"
).
isDefined
ReportPage
(
(
"Alignment"
->
BammetricsReport
.
bamMetricsPage
(
summary
,
Some
(
sampleId
),
Some
(
libId
)))
::
(
if
(
flexiprepExecuted
)
List
(
"QC"
->
FlexiprepReport
.
flexiprepPage
)
else
Nil
),
List
(
"Alignment
"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/
bammetrics/alignment
Summary.ssp"
),
"QC read
s"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprep
Read
Summary.ssp"
)
,
"QC bases"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp"
)
),
args
)
(
if
(
flexiprepExecuted
)
List
(
"QC"
->
FlexiprepReport
.
flexiprepPage
)
else
Nil
),
"Alignment"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"
)
::
(
if
(
flexiprepExecuted
)
List
(
"QC reads
"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/
flexiprep/flexiprepRead
Summary.ssp"
),
"QC base
s"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprep
Base
Summary.ssp"
)
)
else
Nil
),
args
)
}
}
\ No newline at end of file
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