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
54219bcb
Commit
54219bcb
authored
Feb 08, 2016
by
Peter van 't Hof
Browse files
Fix insertsize plots
parent
cd4a8f4c
Changes
3
Hide whitespace changes
Inline
Side-by-side
public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala
View file @
54219bcb
...
...
@@ -61,7 +61,11 @@ object BammetricsReport extends ReportBuilder {
val
wgsExecuted
=
summary
.
getValue
(
sampleId
,
libId
,
metricsTag
,
"stats"
,
"wgs"
).
isDefined
val
rnaExecuted
=
summary
.
getValue
(
sampleId
,
libId
,
metricsTag
,
"stats"
,
"rna"
).
isDefined
val
insertsizeMetrics
=
summary
.
getValue
(
sampleId
,
libId
,
metricsTag
,
"stats"
,
"CollectInsertSizeMetrics"
,
"metrics"
).
isDefined
val
insertsizeMetrics
=
summary
.
getValue
(
sampleId
,
libId
,
metricsTag
,
"stats"
,
"CollectInsertSizeMetrics"
,
"metrics"
)
match
{
case
Some
(
None
)
=>
false
case
Some
(
_
)
=>
true
case
_
=>
false
}
val
targets
=
(
summary
.
getValue
(
sampleId
,
libId
,
metricsTag
,
"settings"
,
"amplicon_name"
),
...
...
@@ -81,7 +85,8 @@ object BammetricsReport extends ReportBuilder {
List
(
"Summary"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"
))
++
(
if
(
insertsizeMetrics
)
List
(
"Insert Size"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp"
,
Map
(
"showPlot"
->
true
))
)
else
Nil
)
++
(
if
(
wgsExecuted
)
List
(
"Whole genome coverage"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/wgsHistogram.ssp"
,
)
else
Nil
)
++
(
if
(
wgsExecuted
)
List
(
"Whole genome coverage"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/wgsHistogram.ssp"
,
Map
(
"showPlot"
->
true
)))
else
Nil
)
++
(
if
(
rnaExecuted
)
List
(
"Rna coverage"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/rnaHistogram.ssp"
,
...
...
public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BaseCounterTest.scala
View file @
54219bcb
...
...
@@ -4,7 +4,7 @@ import java.io.File
import
java.nio.file.Paths
import
com.google.common.io.Files
import
htsjdk.samtools.
{
SAMReadGroupRecord
,
SAMSequenceRecord
,
SAMLineParser
,
SAMFileHeader
}
import
htsjdk.samtools.
{
SAMReadGroupRecord
,
SAMSequenceRecord
,
SAMLineParser
,
SAMFileHeader
}
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
...
...
@@ -13,8 +13,8 @@ import picard.annotation.Gene
import
scala.collection.JavaConversions._
/**
* Created by pjvan_thof on 1/29/16.
*/
* Created by pjvan_thof on 1/29/16.
*/
class
BaseCounterTest
extends
TestNGSuite
with
Matchers
{
import
BaseCounter._
...
...
@@ -55,7 +55,7 @@ class BaseCounterTest extends TestNGSuite with Matchers {
bamRecordBasesOverlap
(
read
,
60
,
70
)
shouldBe
0
}
@Test
@Test
def
testBamRecordBasesOverlap
()
:
Unit
=
{
val
read
=
BaseCounterTest
.
lineParser
.
parseLine
(
"r02\t0\tchrQ\t50\t60\t10M\t*\t0\t0\tTACGTACGTA\tEEFFGGHHII\tRG:Z:001"
)
bamRecordBasesOverlap
(
read
,
40
,
70
)
shouldBe
10
...
...
public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala
View file @
54219bcb
...
...
@@ -28,7 +28,7 @@ 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
insertsizeExecuted
=
summary
.
getSampleValues
(
"bammetrics"
,
"stats"
,
"CollectInsertSizeMetrics"
,
"metrics"
).
values
.
exists
(
_
.
isDefi
ne
d
)
val
insertsizeExecuted
=
summary
.
getSampleValues
(
"bammetrics"
,
"stats"
,
"CollectInsertSizeMetrics"
,
"metrics"
).
values
.
exists
(
_
!=
Some
(
No
ne
)
)
val
flexiprepExecuted
=
summary
.
getLibraryValues
(
"flexiprep"
)
.
exists
{
case
((
sample
,
lib
),
value
)
=>
value
.
isDefined
}
...
...
@@ -47,7 +47,8 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
Map
(
"sampleLevel"
->
true
,
"showPlot"
->
true
,
"showTable"
->
false
)
))
++
(
if
(
insertsizeExecuted
)
List
(
"Insert Size"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp"
,
Map
(
"sampleLevel"
->
true
,
"showPlot"
->
true
,
"showTable"
->
false
)))
else
Nil
)
++
Map
(
"sampleLevel"
->
true
,
"showPlot"
->
true
,
"showTable"
->
false
)))
else
Nil
)
++
(
if
(
wgsExecuted
)
List
(
"Whole genome coverage"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/bammetrics/wgsHistogram.ssp"
,
Map
(
"sampleLevel"
->
true
,
"showPlot"
->
true
,
"showTable"
->
false
)))
else
Nil
)
++
...
...
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