Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Mirrors
biopet.biopet
Commits
abb1f25e
Commit
abb1f25e
authored
Oct 25, 2016
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For for BIOPET-389
parent
e6199e01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala
...nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala
+11
-5
No files found.
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala
View file @
abb1f25e
...
...
@@ -166,11 +166,15 @@ class BamMetrics(val root: Configurable) extends QScript
addSummarizable
(
biopetFlagstatLoose
,
targetName
+
"_biopet_flagstat_loose"
)
add
(
new
BiopetFifoPipe
(
this
,
List
(
biLoose
,
biopetFlagstatLoose
)))
val
sorter
=
new
BedtoolsSort
(
this
)
sorter
.
input
=
intervals
.
bed
sorter
.
output
=
swapExt
(
targetDir
,
intervals
.
bed
,
".bed"
,
".sorted.bed"
)
add
(
sorter
)
val
bedCov
=
BedtoolsCoverage
(
this
,
sorter
.
output
,
inputBam
,
depth
=
true
)
val
sortedBed
=
BamMetrics
.
sortedbedCache
.
getOrElse
(
intervals
.
bed
,
{
val
sorter
=
new
BedtoolsSort
(
this
)
sorter
.
input
=
intervals
.
bed
sorter
.
output
=
swapExt
(
targetDir
,
intervals
.
bed
,
".bed"
,
".sorted.bed"
)
add
(
sorter
)
BamMetrics
.
sortedbedCache
+=
intervals
.
bed
->
sorter
.
output
sorter
.
output
})
val
bedCov
=
BedtoolsCoverage
(
this
,
sortedBed
,
inputBam
,
depth
=
true
)
val
covStats
=
CoverageStats
(
this
,
targetDir
,
inputBam
.
getName
.
stripSuffix
(
".bam"
)
+
".coverage"
)
covStats
.
title
=
Some
(
"Coverage Plot"
)
covStats
.
subTitle
=
Some
(
s
"for file '$targetName.bed'"
)
...
...
@@ -198,4 +202,6 @@ object BamMetrics extends PipelineCommand {
bamMetrics
.
biopetScript
()
bamMetrics
}
private
var
sortedbedCache
:
Map
[
File
,
File
]
=
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