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
2467bc10
Commit
2467bc10
authored
Jan 19, 2017
by
Peter van 't Hof
Committed by
GitHub
Jan 19, 2017
Browse files
Merge pull request #8 from biopet/fix-BIOPET-513
Harmonize flagstat keys
parents
8d4df927
8e661da6
Changes
1
Hide whitespace changes
Inline
Side-by-side
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala
View file @
2467bc10
...
...
@@ -150,6 +150,10 @@ class BamMetrics(val root: Configurable) extends QScript
}
// Create stats and coverage plot for each bed/interval file
val
allIntervalNames
=
(
roiIntervals
++
ampIntervals
).
map
(
_
.
bed
.
getName
)
if
(
allIntervalNames
.
size
!=
allIntervalNames
.
toSet
.
size
)
{
logger
.
warn
(
"There are multiple region files with the same name. Metric values might get overwritten"
)
}
for
(
intervals
<-
roiIntervals
++
ampIntervals
)
{
val
targetName
=
intervals
.
bed
.
getName
.
stripSuffix
(
".bed"
)
val
targetDir
=
new
File
(
outputDir
,
targetName
)
...
...
@@ -158,14 +162,14 @@ class BamMetrics(val root: Configurable) extends QScript
output
=
new
File
(
targetDir
,
inputBam
.
getName
.
stripSuffix
(
".bam"
)
+
".overlap.strict.sam"
),
minOverlap
=
config
(
"strict_intersect_overlap"
,
default
=
1.0
))
val
biopetFlagstatStrict
=
BiopetFlagstat
(
this
,
biStrict
.
output
,
targetDir
)
addSummarizable
(
biopetFlagstatStrict
,
targetName
+
"_
biopet_
flagstat_strict"
)
addSummarizable
(
biopetFlagstatStrict
,
targetName
+
"_flagstat
s
_strict"
)
add
(
new
BiopetFifoPipe
(
this
,
List
(
biStrict
,
biopetFlagstatStrict
)))
val
biLoose
=
BedtoolsIntersect
(
this
,
inputBam
,
intervals
.
bed
,
output
=
new
File
(
targetDir
,
inputBam
.
getName
.
stripSuffix
(
".bam"
)
+
".overlap.loose.sam"
),
minOverlap
=
config
(
"loose_intersect_overlap"
,
default
=
0.01
))
val
biopetFlagstatLoose
=
BiopetFlagstat
(
this
,
biLoose
.
output
,
targetDir
)
addSummarizable
(
biopetFlagstatLoose
,
targetName
+
"_
biopet_
flagstat_loose"
)
addSummarizable
(
biopetFlagstatLoose
,
targetName
+
"_flagstat
s
_loose"
)
add
(
new
BiopetFifoPipe
(
this
,
List
(
biLoose
,
biopetFlagstatLoose
)))
val
sortedBed
=
BamMetrics
.
sortedbedCache
.
getOrElse
(
intervals
.
bed
,
{
...
...
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