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
0460d525
Commit
0460d525
authored
Feb 24, 2017
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style fixes
parent
f6ea9831
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
68 deletions
+67
-68
biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/summary/db/SummaryDbTest.scala
.../nl/lumc/sasc/biopet/utils/summary/db/SummaryDbTest.scala
+8
-9
flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp
.../sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp
+24
-24
flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp
.../sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp
+33
-33
flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala
...umc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala
+2
-2
No files found.
biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/summary/db/SummaryDbTest.scala
View file @
0460d525
...
...
@@ -63,7 +63,7 @@ class SummaryDbTest extends TestNGSuite with Matchers {
db
.
createTables
()
Await
.
result
(
db
.
createOrUpdateStat
(
0
,
0
,
Some
(
0
),
Some
(
0
),
Some
(
0
),
"""
"""
|{
|"content": "test",
|"content2": {
...
...
@@ -71,9 +71,9 @@ class SummaryDbTest extends TestNGSuite with Matchers {
|}
| }"""
.
stripMargin
),
Duration
.
Inf
)
db
.
getStatKeys
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
keyValues
=
Map
())
shouldBe
Map
()
db
.
getStatKeys
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
keyValues
=
Map
(
"content"
->
List
(
"content"
)))
shouldBe
Map
(
"content"
->
Some
(
"test"
))
db
.
getStatKeys
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
keyValues
=
Map
(
"content"
->
List
(
"content2"
,
"key"
)))
shouldBe
Map
(
"content"
->
Some
(
"value"
))
db
.
getStatKeys
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
keyValues
=
Map
())
shouldBe
Map
()
db
.
getStatKeys
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
keyValues
=
Map
(
"content"
->
List
(
"content"
)))
shouldBe
Map
(
"content"
->
Some
(
"test"
))
db
.
getStatKeys
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
Some
(
Left
(
0
)),
keyValues
=
Map
(
"content"
->
List
(
"content2"
,
"key"
)))
shouldBe
Map
(
"content"
->
Some
(
"value"
))
db
.
close
()
}
...
...
@@ -97,8 +97,8 @@ class SummaryDbTest extends TestNGSuite with Matchers {
|}
| }"""
.
stripMargin
),
Duration
.
Inf
)
db
.
getStatsForSamples
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
keyValues
=
Map
())
shouldBe
Map
(
0
->
Map
())
db
.
getStatsForSamples
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
keyValues
=
Map
(
"content"
->
List
(
"content"
)))
shouldBe
Map
(
0
->
Map
(
"content"
->
Some
(
"test"
)))
db
.
getStatsForSamples
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
keyValues
=
Map
())
shouldBe
Map
(
0
->
Map
())
db
.
getStatsForSamples
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
keyValues
=
Map
(
"content"
->
List
(
"content"
)))
shouldBe
Map
(
0
->
Map
(
"content"
->
Some
(
"test"
)))
db
.
close
()
}
...
...
@@ -122,13 +122,12 @@ class SummaryDbTest extends TestNGSuite with Matchers {
|}
| }"""
.
stripMargin
),
Duration
.
Inf
)
db
.
getStatsForLibraries
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
keyValues
=
Map
())
shouldBe
Map
((
0
,
0
)
->
Map
())
db
.
getStatsForLibraries
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
keyValues
=
Map
(
"content"
->
List
(
"content"
)))
shouldBe
Map
((
0
,
0
)
->
Map
(
"content"
->
Some
(
"test"
)))
db
.
getStatsForLibraries
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
keyValues
=
Map
())
shouldBe
Map
((
0
,
0
)
->
Map
())
db
.
getStatsForLibraries
(
0
,
Left
(
0
),
Some
(
Left
(
0
)),
keyValues
=
Map
(
"content"
->
List
(
"content"
)))
shouldBe
Map
((
0
,
0
)
->
Map
(
"content"
->
Some
(
"test"
)))
db
.
close
()
}
@Test
def
testExecutable
:
Unit
=
{
val
dbFile
=
File
.
createTempFile
(
"summary."
,
".db"
)
...
...
flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp
View file @
0460d525
...
...
@@ -124,31 +124,31 @@
#end
</td>
#for (lib <- libraries.filter(_.sampleId == sample.id))
#{ val paired = settings.filter(_._1._1 == sample.id).filter(_._1._2 == lib.id).head._2("paired") == Some(true) }#
<td #if (paired == true) rowspan="2" #end>
#if (multisample)
<a href="${rootPath}Samples/${sample.name}/Libraries/${lib.name}/index.html">${lib.name}</a>
#else
${lib.name}
#end
</td>
#{ val reads = if (paired == true) List("R1", "R2") else List("R1") }#
#for (read <- reads)
#if (read == "R2") </tr><tr> #end
#{
val statsPaths = Map("num_total" -> List("bases", "num_total"))
val seqstatStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("seqstat_" + read)), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = statsPaths)
val seqstatQcStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("seqstat_" + read + "_qc")), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = statsPaths)
#{ val paired = settings.filter(_._1._1 == sample.id).filter(_._1._2 == lib.id).head._2("paired") == Some(true) }#
<td #if (paired == true) rowspan="2" #end>
#if (multisample)
<a href="${rootPath}Samples/${sample.name}/Libraries/${lib.name}/index.html">${lib.name}</a>
#else
${lib.name}
#end
</td>
#{ val reads = if (paired == true) List("R1", "R2") else List("R1") }#
#for (read <- reads)
#if (read == "R2") </tr><tr> #end
#{
val statsPaths = Map("num_total" -> List("bases", "num_total"))
val seqstatStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("seqstat_" + read)), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = statsPaths)
val seqstatQcStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("seqstat_" + read + "_qc")), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = statsPaths)
val beforeTotal = seqstatStats("num_total").getOrElse(0).toString.toLong
val afterTotal = seqstatQcStats("num_total").getOrElse(0).toString.toLong
}#
<td>${read}</td>
<td>${beforeTotal}</td>
<td>${beforeTotal - afterTotal}</td>
<td>${(beforeTotal - afterTotal).toDouble / beforeTotal * 100}%</td>
<td>${afterTotal}</td>
#end
val beforeTotal = seqstatStats("num_total").getOrElse(0).toString.toLong
val afterTotal = seqstatQcStats("num_total").getOrElse(0).toString.toLong
}#
<td>${read}</td>
<td>${beforeTotal}</td>
<td>${beforeTotal - afterTotal}</td>
<td>${(beforeTotal - afterTotal).toDouble / beforeTotal * 100}%</td>
<td>${afterTotal}</td>
#end
</tr>
#end
#end
...
...
flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp
View file @
0460d525
...
...
@@ -129,42 +129,42 @@
#end
</td>
#for (lib <- libraries.filter(_.sampleId == sample.id))
#{ val paired = settings.filter(_._1._1 == sample.id).filter(_._1._2 == lib.id).head._2("paired") == Some(true) }#
<td #if (paired == true) rowspan="2" #end>
#if (multisample)
<a href="${rootPath}Samples/${sample.name}/Libraries/${lib.name}/index.html">${lib.name}</a>
#else
${lib.name}
#end
</td>
#{ val reads = if (paired == true) List("R1", "R2") else List("R1") }#
#for (read <- reads)
#if (read == "R2") </tr><tr> #end
#{
val seqstatPaths = Map("num_total" -> List("reads", "num_total"))
val seqstatStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("seqstat_" + read)), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = seqstatPaths)
val seqstatQcStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("seqstat_" + read + "_qc")), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = seqstatPaths)
#{ val paired = settings.filter(_._1._1 == sample.id).filter(_._1._2 == lib.id).head._2("paired") == Some(true) }#
<td #if (paired == true) rowspan="2" #end>
#if (multisample)
<a href="${rootPath}Samples/${sample.name}/Libraries/${lib.name}/index.html">${lib.name}</a>
#else
${lib.name}
#end
</td>
#{ val reads = if (paired == true) List("R1", "R2") else List("R1") }#
#for (read <- reads)
#if (read == "R2") </tr><tr> #end
#{
val seqstatPaths = Map("num_total" -> List("reads", "num_total"))
val seqstatStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("seqstat_" + read)), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = seqstatPaths)
val seqstatQcStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("seqstat_" + read + "_qc")), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = seqstatPaths)
val clippingPaths = Map("num_reads_discarded_too_short" -> List("num_reads_discarded_too_short"),
"num_reads_discarded_too_long" -> List("num_reads_discarded_too_long"))
val clippingStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("clipping_" + read)), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = clippingPaths)
val clippingPaths = Map("num_reads_discarded_too_short" -> List("num_reads_discarded_too_short"),
"num_reads_discarded_too_long" -> List("num_reads_discarded_too_long"))
val clippingStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("clipping_" + read)), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = clippingPaths)
val trimmingPaths = Map("num_reads_discarded" -> List("num_reads_discarded_" + read))
val trimmingStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("trimming")), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = trimmingPaths)
val trimmingPaths = Map("num_reads_discarded" -> List("num_reads_discarded_" + read))
val trimmingStats = summary.getStatKeys(runId, Right("flexiprep"), Some(Right("trimming")), sample = Some(Left(sample.id)), library = Some(Left(lib.id)), keyValues = trimmingPaths)
val beforeTotal = seqstatStats("num_total").getOrElse(0).toString.toLong
val afterTotal = seqstatQcStats("num_total").getOrElse(0).toString.toLong
val clippingDiscardedToShort = clippingStats("num_reads_discarded_too_short").getOrElse(0).toString.toLong
val clippingDiscardedToLong = clippingStats("num_reads_discarded_too_long").getOrElse(0).toString.toLong
val trimmingDiscarded = trimmingStats("num_reads_discarded").getOrElse(0).toString.toLong
}#
<td>${read}</td>
<td>${beforeTotal}</td>
<td>${clippingDiscardedToShort + clippingDiscardedToLong}</td>
<td>${trimmingDiscarded}</td>
#if (paired == true) <td>${beforeTotal - clippingDiscardedToShort - clippingDiscardedToLong - trimmingDiscarded - afterTotal}</td> #end
<td>${afterTotal}</td>
#end
val beforeTotal = seqstatStats("num_total").getOrElse(0).toString.toLong
val afterTotal = seqstatQcStats("num_total").getOrElse(0).toString.toLong
val clippingDiscardedToShort = clippingStats("num_reads_discarded_too_short").getOrElse(0).toString.toLong
val clippingDiscardedToLong = clippingStats("num_reads_discarded_too_long").getOrElse(0).toString.toLong
val trimmingDiscarded = trimmingStats("num_reads_discarded").getOrElse(0).toString.toLong
}#
<td>${read}</td>
<td>${beforeTotal}</td>
<td>${clippingDiscardedToShort + clippingDiscardedToLong}</td>
<td>${trimmingDiscarded}</td>
#if (paired == true) <td>${beforeTotal - clippingDiscardedToShort - clippingDiscardedToLong - trimmingDiscarded - afterTotal}</td> #end
<td>${afterTotal}</td>
#end
</tr>
#end
#end
...
...
flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala
View file @
0460d525
...
...
@@ -14,10 +14,10 @@
*/
package
nl.lumc.sasc.biopet.pipelines.flexiprep
import
java.io.
{
File
,
PrintWriter
}
import
java.io.
{
File
,
PrintWriter
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.core.report.
{
ReportBuilder
,
ReportBuilderExtension
,
ReportPage
,
ReportSection
}
import
nl.lumc.sasc.biopet.core.report.
{
ReportBuilder
,
ReportBuilderExtension
,
ReportPage
,
ReportSection
}
import
nl.lumc.sasc.biopet.utils.rscript.StackedBarPlot
import
nl.lumc.sasc.biopet.utils.summary.db.SummaryDb
...
...
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