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
2c323f38
Commit
2c323f38
authored
Jul 03, 2015
by
Peter van 't Hof
Browse files
Fix code style warnings
parent
7778c07d
Changes
80
Hide whitespace changes
Inline
Side-by-side
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/AnalyzeCovariates.scala
View file @
2c323f38
...
...
@@ -18,6 +18,6 @@ object AnalyzeCovariates {
ac
.
before
=
before
ac
.
after
=
after
ac
.
plots
=
plots
return
ac
ac
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ApplyRecalibration.scala
View file @
2c323f38
...
...
@@ -12,8 +12,8 @@ import nl.lumc.sasc.biopet.core.config.Configurable
class
ApplyRecalibration
(
val
root
:
Configurable
)
extends
org
.
broadinstitute
.
gatk
.
queue
.
extensions
.
gatk
.
ApplyRecalibration
with
GatkGeneral
{
scatterCount
=
config
(
"scattercount"
,
default
=
0
)
override
def
beforeGraph
{
super
.
beforeGraph
override
def
beforeGraph
()
{
super
.
beforeGraph
()
nt
=
Option
(
getThreads
(
3
))
memoryLimit
=
Option
(
nt
.
getOrElse
(
1
)
*
2
)
...
...
@@ -37,6 +37,6 @@ object ApplyRecalibration {
ar
.
recal_file
=
recal_file
ar
.
tranches_file
=
tranches_file
ar
.
out
=
output
return
ar
ar
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/BaseRecalibrator.scala
View file @
2c323f38
...
...
@@ -20,7 +20,7 @@ object BaseRecalibrator {
val
br
=
new
BaseRecalibrator
(
root
)
br
.
input_file
:+=
input
br
.
out
=
output
br
.
beforeGraph
return
br
br
.
beforeGraph
()
br
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineGVCFs.scala
View file @
2c323f38
...
...
@@ -18,6 +18,6 @@ object CombineGVCFs {
val
cg
=
new
CombineGVCFs
(
root
)
cg
.
variant
=
input
cg
.
o
=
output
return
cg
cg
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineVariants.scala
View file @
2c323f38
...
...
@@ -18,6 +18,6 @@ object CombineVariants {
val
cv
=
new
CombineVariants
(
root
)
cv
.
variant
=
input
cv
.
out
=
output
return
cv
cv
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala
View file @
2c323f38
...
...
@@ -26,10 +26,10 @@ trait GatkGeneral extends CommandLineGATK with BiopetJavaCommandLineFunction wit
override
val
versionExitcode
=
List
(
0
,
1
)
override
def
versionCommand
=
executable
+
" -jar "
+
jarFile
+
" -version"
override
def
getVersion
=
super
.
getVersion
.
collect
{
case
v
ersion
=>
"Gatk "
+
v
ersion
}
override
def
getVersion
=
super
.
getVersion
.
collect
{
case
v
=>
"Gatk "
+
v
}
override
def
beforeGraph
:
Unit
=
{
super
.
beforeGraph
override
def
beforeGraph
()
:
Unit
=
{
super
.
beforeGraph
()
if
(
reference_sequence
==
null
)
reference_sequence
=
referenceFasta
()
}
}
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GenotypeGVCFs.scala
View file @
2c323f38
...
...
@@ -29,6 +29,6 @@ object GenotypeGVCFs {
val
gg
=
new
GenotypeGVCFs
(
root
)
gg
.
variant
=
gvcfFiles
gg
.
out
=
output
return
gg
gg
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/HaplotypeCaller.scala
View file @
2c323f38
...
...
@@ -35,8 +35,8 @@ class HaplotypeCaller(val root: Configurable) extends org.broadinstitute.gatk.qu
stand_emit_conf
=
config
(
"stand_emit_conf"
,
default
=
0
)
}
override
def
beforeGraph
{
super
.
beforeGraph
override
def
beforeGraph
()
{
super
.
beforeGraph
()
if
(
bamOutput
!=
null
&&
nct
.
getOrElse
(
1
)
>
1
)
{
threads
=
1
logger
.
warn
(
"BamOutput is on, nct/threads is forced to set on 1, this option is only for debug"
)
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala
View file @
2c323f38
...
...
@@ -19,6 +19,6 @@ object IndelRealigner {
ir
.
input_file
:+=
input
ir
.
targetIntervals
=
targetIntervals
ir
.
out
=
new
File
(
outputDir
,
input
.
getName
.
stripSuffix
(
".bam"
)
+
".realign.bam"
)
return
ir
ir
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/PrintReads.scala
View file @
2c323f38
...
...
@@ -18,6 +18,6 @@ object PrintReads {
val
br
=
new
PrintReads
(
root
)
br
.
input_file
:+=
input
br
.
out
=
output
return
br
br
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/RealignerTargetCreator.scala
View file @
2c323f38
...
...
@@ -20,6 +20,6 @@ object RealignerTargetCreator {
val
re
=
new
RealignerTargetCreator
(
root
)
re
.
input_file
:+=
input
re
.
out
=
new
File
(
outputDir
,
input
.
getName
.
stripSuffix
(
".bam"
)
+
".realign.intervals"
)
re
turn
re
re
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/SelectVariants.scala
View file @
2c323f38
...
...
@@ -18,6 +18,6 @@ object SelectVariants {
val
sv
=
new
SelectVariants
(
root
)
sv
.
variant
=
input
sv
.
out
=
output
return
sv
sv
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/UnifiedGenotyper.scala
View file @
2c323f38
...
...
@@ -26,8 +26,8 @@ class UnifiedGenotyper(val root: Configurable) extends org.broadinstitute.gatk.q
}
}
override
def
beforeGraph
{
super
.
beforeGraph
override
def
beforeGraph
()
{
super
.
beforeGraph
()
genotype_likelihoods_model
=
org
.
broadinstitute
.
gatk
.
tools
.
walkers
.
genotyper
.
GenotypeLikelihoodsCalculationModel
.
Model
.
BOTH
nct
=
Some
(
getThreads
(
1
))
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantAnnotator.scala
View file @
2c323f38
...
...
@@ -20,6 +20,6 @@ object VariantAnnotator {
va
.
variant
=
input
va
.
input_file
=
bamFiles
va
.
out
=
output
return
va
va
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantEval.scala
View file @
2c323f38
...
...
@@ -10,8 +10,8 @@ import java.io.File
import
nl.lumc.sasc.biopet.core.config.Configurable
class
VariantEval
(
val
root
:
Configurable
)
extends
org
.
broadinstitute
.
gatk
.
queue
.
extensions
.
gatk
.
VariantEval
with
GatkGeneral
{
override
def
beforeGraph
{
super
.
beforeGraph
override
def
beforeGraph
()
{
super
.
beforeGraph
()
}
}
...
...
@@ -22,8 +22,8 @@ object VariantEval {
vareval
.
eval
=
Seq
(
sample
)
vareval
.
comp
=
Seq
(
compareWith
)
vareval
.
out
=
output
vareval
.
beforeGraph
return
vareval
vareval
.
beforeGraph
()
vareval
}
def
apply
(
root
:
Configurable
,
sample
:
File
,
compareWith
:
File
,
...
...
@@ -36,8 +36,8 @@ object VariantEval {
vareval
.
ST
=
ST
vareval
.
noEV
=
true
vareval
.
EV
=
EV
vareval
.
beforeGraph
return
vareval
vareval
.
beforeGraph
()
vareval
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantRecalibrator.scala
View file @
2c323f38
...
...
@@ -39,6 +39,6 @@ object VariantRecalibrator {
vr
.
input
:+=
input
vr
.
recal_file
=
recal_file
vr
.
tranches_file
=
tranches_file
return
vr
vr
}
}
\ No newline at end of file
protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/Basty.scala
View file @
2c323f38
...
...
@@ -11,6 +11,8 @@ import nl.lumc.sasc.biopet.pipelines.basty.BastyTrait
import
org.broadinstitute.gatk.queue.QScript
/**
* Basty pipeline including GATK steps
*
* Created by pjvan_thof on 3/4/15.
*/
class
Basty
(
val
root
:
Configurable
)
extends
QScript
with
BastyTrait
{
...
...
protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkBenchmarkGenotyping.scala
View file @
2c323f38
...
...
@@ -38,7 +38,7 @@ class GatkBenchmarkGenotyping(val root: Configurable) extends QScript with Biope
var
gvcfPool
:
List
[
File
]
=
Nil
addGenotypingPipeline
(
gvcfPool
)
while
(
todoGvcfs
.
size
>
0
)
{
while
(
todoGvcfs
.
nonEmpty
)
{
val
index
=
Random
.
nextInt
(
todoGvcfs
.
size
)
gvcfPool
::=
todoGvcfs
(
index
)
addGenotypingPipeline
(
gvcfPool
)
...
...
@@ -51,8 +51,8 @@ class GatkBenchmarkGenotyping(val root: Configurable) extends QScript with Biope
gatkGenotyping
.
inputGvcfs
=
sampleGvcf
::
gvcfPool
gatkGenotyping
.
samples
:+=
sampleName
gatkGenotyping
.
outputDir
=
new
File
(
outputDir
,
"samples_"
+
gvcfPool
.
size
)
gatkGenotyping
.
init
gatkGenotyping
.
biopetScript
gatkGenotyping
.
init
()
gatkGenotyping
.
biopetScript
()
addAll
(
gatkGenotyping
.
functions
)
}
}
...
...
protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkGenotyping.scala
View file @
2c323f38
...
...
@@ -38,7 +38,7 @@ class GatkGenotyping(val root: Configurable) extends QScript with BiopetQScript
def
biopetScript
()
{
addGenotypeGVCFs
(
inputGvcfs
,
outputFile
)
if
(
!
samples
.
is
Empty
)
{
if
(
samples
.
non
Empty
)
{
if
(
samples
.
size
>
1
)
addSelectVariants
(
outputFile
,
samples
,
new
File
(
outputDir
,
"samples/"
),
"all"
)
for
(
sample
<-
samples
)
addSelectVariants
(
outputFile
,
List
(
sample
),
new
File
(
outputDir
,
"samples/"
),
sample
)
}
...
...
@@ -47,7 +47,7 @@ class GatkGenotyping(val root: Configurable) extends QScript with BiopetQScript
def
addGenotypeGVCFs
(
gvcfFiles
:
List
[
File
],
outputFile
:
File
)
:
File
=
{
val
genotypeGVCFs
=
GenotypeGVCFs
(
this
,
gvcfFiles
,
outputFile
)
add
(
genotypeGVCFs
)
return
genotypeGVCFs
.
out
genotypeGVCFs
.
out
}
def
addSelectVariants
(
inputFile
:
File
,
samples
:
List
[
String
],
outputDir
:
File
,
name
:
String
)
{
...
...
protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkPipeline.scala
View file @
2c323f38
...
...
@@ -78,8 +78,8 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
val
bamFile
:
Option
[
File
]
=
if
(
config
.
contains
(
"R1"
))
{
mapping
.
input_R1
=
config
(
"R1"
)
mapping
.
input_R2
=
config
(
"R2"
)
mapping
.
init
mapping
.
biopetScript
mapping
.
init
()
mapping
.
biopetScript
()
addAll
(
mapping
.
functions
)
// Add functions of mapping to curent function pool
Some
(
mapping
.
finalBamFile
)
}
else
if
(
config
.
contains
(
"bam"
))
{
...
...
@@ -93,8 +93,8 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
qscript
.
add
(
samToFastq
)
mapping
.
input_R1
=
samToFastq
.
fastqR1
mapping
.
input_R2
=
Some
(
samToFastq
.
fastqR2
)
mapping
.
init
mapping
.
biopetScript
mapping
.
init
()
mapping
.
biopetScript
()
addAll
(
mapping
.
functions
)
// Add functions of mapping to curent function pool
Some
(
mapping
.
finalBamFile
)
}
else
{
...
...
@@ -106,7 +106,7 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
if
(
readGroup
.
getLibrary
!=
libId
)
logger
.
warn
(
"Library ID readgroup in bam file is not the same"
)
if
(
readGroup
.
getSample
!=
sampleId
||
readGroup
.
getLibrary
!=
libId
)
readGroupOke
=
false
}
inputSam
.
close
inputSam
.
close
()
if
(!
readGroupOke
)
{
if
(
config
(
"correct_readgroups"
,
default
=
false
))
{
...
...
@@ -133,8 +133,8 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
if
(
bamFile
.
isDefined
)
{
gatkVariantcalling
.
inputBams
=
List
(
bamFile
.
get
)
gatkVariantcalling
.
variantcalling
=
config
(
"library_variantcalling"
,
default
=
false
)
gatkVariantcalling
.
init
gatkVariantcalling
.
biopetScript
gatkVariantcalling
.
init
()
gatkVariantcalling
.
biopetScript
()
addAll
(
gatkVariantcalling
.
functions
)
}
...
...
@@ -155,8 +155,8 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
gatkVariantcalling
.
useHaplotypecaller
=
false
gatkVariantcalling
.
useUnifiedGenotyper
=
false
}
gatkVariantcalling
.
init
gatkVariantcalling
.
biopetScript
gatkVariantcalling
.
init
()
gatkVariantcalling
.
biopetScript
()
addAll
(
gatkVariantcalling
.
functions
)
gatkVariantcalling
.
inputBams
.
foreach
(
x
=>
addAll
(
Bam2Wig
(
qscript
,
x
).
functions
))
...
...
@@ -174,7 +174,7 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
def
biopetScript
()
:
Unit
=
{
addSamplesJobs
()
addSummaryJobs
addSummaryJobs
()
}
def
addMultiSampleJobs
()
:
Unit
=
{
...
...
@@ -184,13 +184,13 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
List
(
newFile
)
}
else
externalGvcfs
++
samples
.
map
(
_
.
_2
.
gatkVariantcalling
.
scriptOutput
.
gvcfFile
)
if
(!
skipGenotyping
&&
gvcfFiles
.
size
>
0
)
{
if
(!
skipGenotyping
&&
gvcfFiles
.
nonEmpty
)
{
if
(
jointGenotyping
)
{
val
gatkGenotyping
=
new
GatkGenotyping
(
this
)
gatkGenotyping
.
inputGvcfs
=
gvcfFiles
gatkGenotyping
.
outputDir
=
new
File
(
outputDir
,
"genotyping"
)
gatkGenotyping
.
init
gatkGenotyping
.
biopetScript
gatkGenotyping
.
init
()
gatkGenotyping
.
biopetScript
()
addAll
(
gatkGenotyping
.
functions
)
var
vcfFile
=
gatkGenotyping
.
outputFile
}
...
...
@@ -216,8 +216,8 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
multisampleVariantcalling
.
inputBams
=
allBamfiles
.
toList
multisampleVariantcalling
.
outputDir
=
new
File
(
outputDir
,
"variantcalling"
)
multisampleVariantcalling
.
outputName
=
"multisample"
multisampleVariantcalling
.
init
multisampleVariantcalling
.
biopetScript
multisampleVariantcalling
.
init
()
multisampleVariantcalling
.
biopetScript
()
addAll
(
multisampleVariantcalling
.
functions
)
if
(
config
(
"inputtype"
,
default
=
"dna"
).
asString
!=
"rna"
&&
config
(
"recalibration"
,
default
=
false
).
asBoolean
)
{
...
...
@@ -225,8 +225,8 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
recalibration
.
inputVcf
=
multisampleVariantcalling
.
scriptOutput
.
finalVcfFile
recalibration
.
bamFiles
=
allBamfiles
recalibration
.
outputDir
=
new
File
(
outputDir
,
"recalibration"
)
recalibration
.
init
recalibration
.
biopetScript
recalibration
.
init
()
recalibration
.
biopetScript
()
}
}
}
...
...
Prev
1
2
3
4
Next
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