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
2865ff53
Commit
2865ff53
authored
Nov 17, 2014
by
Peter van 't Hof
Browse files
Added option to disable raw caller
parent
109ff2b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkPipeline.scala
View file @
2865ff53
...
...
@@ -89,17 +89,20 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
)
yield
file
val
allRawVcfFiles
=
for
((
sampleID
,
sampleOutput
)
<-
samplesOutput
)
yield
sampleOutput
.
variantcalling
.
rawFilterVcfFile
val
cvRaw
=
CombineVariants
(
this
,
allRawVcfFiles
.
toList
,
outputDir
+
"variantcalling/multisample.raw.vcf.gz"
)
add
(
cvRaw
)
val
gatkVariantcalling
=
new
GatkVariantcalling
(
this
)
{
override
protected
lazy
val
configName
=
"gatkvariantcalling"
override
def
configPath
:
List
[
String
]
=
"multisample"
::
super
.
configPath
}
if
(
gatkVariantcalling
.
useMpileup
)
{
val
cvRaw
=
CombineVariants
(
this
,
allRawVcfFiles
.
toList
,
outputDir
+
"variantcalling/multisample.raw.vcf.gz"
)
add
(
cvRaw
)
gatkVariantcalling
.
rawVcfInput
=
cvRaw
.
out
}
gatkVariantcalling
.
preProcesBams
=
Some
(
false
)
gatkVariantcalling
.
doublePreProces
=
Some
(
false
)
gatkVariantcalling
.
inputBams
=
allBamfiles
.
toList
gatkVariantcalling
.
rawVcfInput
=
cvRaw
.
out
gatkVariantcalling
.
outputDir
=
outputDir
+
"variantcalling"
gatkVariantcalling
.
outputName
=
"multisample"
gatkVariantcalling
.
init
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkVariantcalling.scala
View file @
2865ff53
...
...
@@ -41,6 +41,7 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
var
useHaplotypecaller
:
Option
[
Boolean
]
=
config
(
"use_haplotypecaller"
,
default
=
true
)
var
useUnifiedGenotyper
:
Option
[
Boolean
]
=
config
(
"use_unifiedgenotyper"
,
default
=
false
)
var
useAllelesOption
:
Option
[
Boolean
]
=
config
(
"use_alleles_option"
,
default
=
false
)
var
useMpileup
:
Option
[
Boolean
]
=
config
(
"use_mpileup"
,
default
=
true
)
def
init
()
{
if
(
outputName
==
null
&&
sampleID
!=
null
)
outputName
=
sampleID
...
...
@@ -113,27 +114,30 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
}
// Generate raw vcf
if
(
sampleID
!=
null
&&
scriptOutput
.
bamFiles
.
size
==
1
)
{
val
m2v
=
new
MpileupToVcf
(
this
)
m2v
.
inputBam
=
scriptOutput
.
bamFiles
.
head
m2v
.
sample
=
sampleID
m2v
.
output
=
outputDir
+
outputName
+
".raw.vcf"
add
(
m2v
)
scriptOutput
.
rawVcfFile
=
m2v
.
output
val
vcfFilter
=
new
VcfFilter
(
this
)
vcfFilter
.
defaults
++=
Map
(
"min_sample_depth"
->
8
,
"min_alternate_depth"
->
2
,
"min_samples_pass"
->
1
,
"filter_ref_calls"
->
true
)
vcfFilter
.
inputVcf
=
m2v
.
output
vcfFilter
.
outputVcf
=
this
.
swapExt
(
outputDir
,
m2v
.
output
,
".vcf"
,
".filter.vcf.gz"
)
add
(
vcfFilter
)
scriptOutput
.
rawFilterVcfFile
=
vcfFilter
.
outputVcf
}
else
if
(
rawVcfInput
!=
null
)
scriptOutput
.
rawFilterVcfFile
=
rawVcfInput
if
(
scriptOutput
.
rawFilterVcfFile
==
null
)
throw
new
IllegalStateException
(
"Files can't be empty"
)
mergBuffer
+=
(
"9.raw"
->
scriptOutput
.
rawFilterVcfFile
)
if
(
useMpileup
)
{
if
(
sampleID
!=
null
&&
scriptOutput
.
bamFiles
.
size
==
1
)
{
val
m2v
=
new
MpileupToVcf
(
this
)
m2v
.
inputBam
=
scriptOutput
.
bamFiles
.
head
m2v
.
sample
=
sampleID
m2v
.
output
=
outputDir
+
outputName
+
".raw.vcf"
add
(
m2v
)
scriptOutput
.
rawVcfFile
=
m2v
.
output
val
vcfFilter
=
new
VcfFilter
(
this
)
vcfFilter
.
defaults
++=
Map
(
"min_sample_depth"
->
8
,
"min_alternate_depth"
->
2
,
"min_samples_pass"
->
1
,
"filter_ref_calls"
->
true
)
vcfFilter
.
inputVcf
=
m2v
.
output
vcfFilter
.
outputVcf
=
this
.
swapExt
(
outputDir
,
m2v
.
output
,
".vcf"
,
".filter.vcf.gz"
)
add
(
vcfFilter
)
scriptOutput
.
rawFilterVcfFile
=
vcfFilter
.
outputVcf
}
else
if
(
rawVcfInput
!=
null
)
scriptOutput
.
rawFilterVcfFile
=
rawVcfInput
if
(
scriptOutput
.
rawFilterVcfFile
==
null
)
throw
new
IllegalStateException
(
"Files can't be empty"
)
mergBuffer
+=
(
"9.raw"
->
scriptOutput
.
rawFilterVcfFile
)
}
// Allele mode
if
(
useAllelesOption
.
get
)
{
val
mergeAlleles
=
MergeAlleles
(
this
,
mergeList
.
toList
,
outputDir
+
"raw.allele__temp_only.vcf.gz"
)
add
(
mergeAlleles
,
isIntermediate
=
true
)
...
...
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