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
ef064a1b
Commit
ef064a1b
authored
Oct 30, 2015
by
Peter van 't Hof
Browse files
Fixed warning
parent
e6c8bfa8
Changes
1
Hide whitespace changes
Inline
Side-by-side
protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/Shiva.scala
View file @
ef064a1b
...
...
@@ -44,24 +44,24 @@ class Shiva(val root: Configurable) extends QScript with ShivaTrait {
class
Library
(
libId
:
String
)
extends
super
.
Library
(
libId
)
{
lazy
val
useIndelRealigner
:
Boolean
=
config
(
"use_indel_realigner"
,
default
=
true
)
lazy
val
useBaseRecalibration
:
Boolean
=
config
(
"use_base_recalibration"
,
default
=
true
)
lazy
val
useBaseRecalibration
:
Boolean
=
{
val
c
:
Boolean
=
config
(
"use_base_recalibration"
,
default
=
true
)
val
br
=
new
BaseRecalibrator
(
qscript
)
if
(
c
&&
br
.
knownSites
.
isEmpty
)
logger
.
warn
(
"No Known site found, skipping base recalibration, file: "
+
inputBam
)
c
&&
br
.
knownSites
.
nonEmpty
}
override
def
summarySettings
=
super
.
summarySettings
+
(
"use_indel_realigner"
->
useIndelRealigner
)
+
(
"use_base_recalibration"
->
useBaseRecalibration
)
/** Return true when baserecalibration is executed */
protected
def
doneBaseRecalibrator
:
Boolean
=
{
val
br
=
new
BaseRecalibrator
(
qscript
)
useBaseRecalibration
&&
br
.
knownSites
.
nonEmpty
}
/** This will adds preprocess steps, gatk indel realignment and base recalibration is included here */
override
def
preProcess
(
input
:
File
)
:
Option
[
File
]
=
{
if
(!
useIndelRealigner
&&
!
don
eBaseRecalibrat
or
)
None
if
(!
useIndelRealigner
&&
!
us
eBaseRecalibrat
ion
)
None
else
{
val
indelRealignFile
=
useIndelRealigner
match
{
case
true
=>
addIndelRealign
(
input
,
libDir
,
don
eBaseRecalibrat
or
||
libraries
.
size
>
1
)
case
true
=>
addIndelRealign
(
input
,
libDir
,
us
eBaseRecalibrat
ion
||
libraries
.
size
>
1
)
case
false
=>
input
}
...
...
@@ -107,10 +107,7 @@ class Shiva(val root: Configurable) extends QScript with ShivaTrait {
def
addBaseRecalibrator
(
inputBam
:
File
,
dir
:
File
,
isIntermediate
:
Boolean
)
:
File
=
{
val
baseRecalibrator
=
BaseRecalibrator
(
this
,
inputBam
,
swapExt
(
dir
,
inputBam
,
".bam"
,
".baserecal"
))
if
(
baseRecalibrator
.
knownSites
.
isEmpty
)
{
logger
.
warn
(
"No Known site found, skipping base recalibration, file: "
+
inputBam
)
return
inputBam
}
if
(
baseRecalibrator
.
knownSites
.
isEmpty
)
return
inputBam
add
(
baseRecalibrator
)
if
(
config
(
"use_analyze_covariates"
,
default
=
false
).
asBoolean
)
{
...
...
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