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
73e27f7d
Commit
73e27f7d
authored
Nov 29, 2015
by
Peter van 't Hof
Browse files
Fixed haplotypecaller index files
parent
3f7a6044
Changes
6
Hide whitespace changes
Inline
Side-by-side
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GenotypeGVCFs.scala
View file @
73e27f7d
...
...
@@ -8,8 +8,13 @@ package nl.lumc.sasc.biopet.extensions.gatk.broad
import
java.io.File
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.Output
class
GenotypeGVCFs
(
val
root
:
Configurable
)
extends
org
.
broadinstitute
.
gatk
.
queue
.
extensions
.
gatk
.
GenotypeGVCFs
with
GatkGeneral
{
@Output
(
required
=
false
)
protected
var
vcfIndex
:
File
=
_
annotation
++=
config
(
"annotation"
,
default
=
Seq
(),
freeVar
=
false
).
asStringList
if
(
config
.
contains
(
"dbsnp"
))
dbsnp
=
config
(
"dbsnp"
)
...
...
@@ -22,6 +27,11 @@ class GenotypeGVCFs(val root: Configurable) extends org.broadinstitute.gatk.queu
stand_call_conf
=
config
(
"stand_call_conf"
,
default
=
30
)
stand_emit_conf
=
config
(
"stand_emit_conf"
,
default
=
0
)
}
override
def
freezeFieldValues
()
:
Unit
=
{
super
.
freezeFieldValues
()
if
(
out
.
getName
.
endsWith
(
".vcf.gz"
))
vcfIndex
=
new
File
(
out
.
getAbsolutePath
+
".tbi"
)
}
}
object
GenotypeGVCFs
{
...
...
@@ -29,6 +39,7 @@ object GenotypeGVCFs {
val
gg
=
new
GenotypeGVCFs
(
root
)
gg
.
variant
=
gvcfFiles
gg
.
out
=
output
if
(
gg
.
out
.
getName
.
endsWith
(
".vcf.gz"
))
gg
.
vcfIndex
=
new
File
(
gg
.
out
.
getAbsolutePath
+
".tbi"
)
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 @
73e27f7d
...
...
@@ -5,11 +5,17 @@
*/
package
nl.lumc.sasc.biopet.extensions.gatk.broad
import
java.io.File
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.Output
import
org.broadinstitute.gatk.utils.variant.GATKVCFIndexType
class
HaplotypeCaller
(
val
root
:
Configurable
)
extends
org
.
broadinstitute
.
gatk
.
queue
.
extensions
.
gatk
.
HaplotypeCaller
with
GatkGeneral
{
@Output
(
required
=
false
)
protected
var
vcfIndex
:
File
=
_
override
val
defaultThreads
=
1
min_mapping_quality_score
=
config
(
"minMappingQualityScore"
,
default
=
20
)
...
...
@@ -40,6 +46,7 @@ class HaplotypeCaller(val root: Configurable) extends org.broadinstitute.gatk.qu
override
def
freezeFieldValues
()
{
super
.
freezeFieldValues
()
if
(
out
.
getName
.
endsWith
(
".vcf.gz"
))
vcfIndex
=
new
File
(
out
.
getAbsolutePath
+
".tbi"
)
if
(
bamOutput
!=
null
&&
nct
.
getOrElse
(
1
)
>
1
)
{
logger
.
warn
(
"BamOutput is on, nct/threads is forced to set on 1, this option is only for debug"
)
nCoresRequest
=
Some
(
1
)
...
...
@@ -47,10 +54,22 @@ class HaplotypeCaller(val root: Configurable) extends org.broadinstitute.gatk.qu
nct
=
Some
(
getThreads
)
memoryLimit
=
Option
(
memoryLimit
.
getOrElse
(
2.0
)
*
nct
.
getOrElse
(
1
))
}
}
object
HaplotypeCaller
{
def
apply
(
root
:
Configurable
,
inputFiles
:
List
[
File
],
outputFile
:
File
)
:
HaplotypeCaller
=
{
val
hc
=
new
HaplotypeCaller
(
root
)
hc
.
input_file
=
inputFiles
hc
.
out
=
outputFile
if
(
hc
.
out
.
getName
.
endsWith
(
".vcf.gz"
))
hc
.
vcfIndex
=
new
File
(
hc
.
out
.
getAbsolutePath
+
".tbi"
)
hc
}
def
useGvcf
()
{
emitRefConfidence
=
org
.
broadinstitute
.
gatk
.
tools
.
walkers
.
haplotypecaller
.
ReferenceConfidenceMode
.
GVCF
variant_index_type
=
GATKVCFIndexType
.
LINEAR
variant_index_parameter
=
config
(
"variant_index_parameter"
,
default
=
128000
)
def
gvcf
(
root
:
Configurable
,
inputFile
:
File
,
outputFile
:
File
)
:
HaplotypeCaller
=
{
val
hc
=
apply
(
root
,
List
(
inputFile
),
outputFile
)
hc
.
emitRefConfidence
=
org
.
broadinstitute
.
gatk
.
tools
.
walkers
.
haplotypecaller
.
ReferenceConfidenceMode
.
GVCF
hc
.
variant_index_type
=
GATKVCFIndexType
.
LINEAR
hc
.
variant_index_parameter
=
Some
(
hc
.
config
(
"variant_index_parameter"
,
default
=
128000
).
asInt
)
hc
}
}
}
\ No newline at end of file
protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkVariantcalling.scala
View file @
73e27f7d
...
...
@@ -111,7 +111,7 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
if
(
sampleID
!=
null
&&
(
useHaplotypecaller
||
config
(
"joint_genotyping"
,
default
=
false
).
asBoolean
))
{
val
hcGvcf
=
new
HaplotypeCaller
(
this
)
hcGvcf
.
useGvcf
()
//
hcGvcf.useGvcf()
hcGvcf
.
input_file
=
scriptOutput
.
bamFiles
hcGvcf
.
out
=
new
File
(
outputDir
,
outputName
+
".hc.discovery.gvcf.vcf.gz"
)
add
(
hcGvcf
)
...
...
protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCaller.scala
View file @
73e27f7d
...
...
@@ -2,6 +2,7 @@ package nl.lumc.sasc.biopet.pipelines.gatk.variantcallers
import
nl.lumc.sasc.biopet.pipelines.shiva.variantcallers.Variantcaller
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.extensions.gatk.broad
/** Default mode for the haplotypecaller */
class
HaplotypeCaller
(
val
root
:
Configurable
)
extends
Variantcaller
{
...
...
@@ -9,9 +10,7 @@ class HaplotypeCaller(val root: Configurable) extends Variantcaller {
protected
def
defaultPrio
=
1
def
biopetScript
()
{
val
hc
=
new
nl
.
lumc
.
sasc
.
biopet
.
extensions
.
gatk
.
broad
.
HaplotypeCaller
(
this
)
hc
.
input_file
=
inputBams
.
values
.
toList
hc
.
out
=
outputFile
val
hc
=
broad
.
HaplotypeCaller
(
this
,
inputBams
.
values
.
toList
,
outputFile
)
add
(
hc
)
}
}
...
...
protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCallerAllele.scala
View file @
73e27f7d
...
...
@@ -2,6 +2,7 @@ package nl.lumc.sasc.biopet.pipelines.gatk.variantcallers
import
nl.lumc.sasc.biopet.pipelines.shiva.variantcallers.Variantcaller
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.extensions.gatk.broad
/** Allele mode for Haplotypecaller */
class
HaplotypeCallerAllele
(
val
root
:
Configurable
)
extends
Variantcaller
{
...
...
@@ -9,9 +10,7 @@ class HaplotypeCallerAllele(val root: Configurable) extends Variantcaller {
protected
def
defaultPrio
=
5
def
biopetScript
()
{
val
hc
=
new
nl
.
lumc
.
sasc
.
biopet
.
extensions
.
gatk
.
broad
.
HaplotypeCaller
(
this
)
hc
.
input_file
=
inputBams
.
values
.
toList
hc
.
out
=
outputFile
val
hc
=
broad
.
HaplotypeCaller
(
this
,
inputBams
.
values
.
toList
,
outputFile
)
hc
.
alleles
=
config
(
"input_alleles"
)
hc
.
genotyping_mode
=
org
.
broadinstitute
.
gatk
.
tools
.
walkers
.
genotyper
.
GenotypingOutputMode
.
GENOTYPE_GIVEN_ALLELES
add
(
hc
)
...
...
protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCallerGvcf.scala
View file @
73e27f7d
package
nl.lumc.sasc.biopet.pipelines.gatk.variantcallers
import
nl.lumc.sasc.biopet.extensions.gatk.broad.GenotypeGVCFs
import
nl.lumc.sasc.biopet.pipelines.shiva.variantcallers.Variantcaller
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.extensions.gatk.broad
/** Gvcf mode for haplotypecaller */
class
HaplotypeCallerGvcf
(
val
root
:
Configurable
)
extends
Variantcaller
{
...
...
@@ -11,15 +11,12 @@ class HaplotypeCallerGvcf(val root: Configurable) extends Variantcaller {
def
biopetScript
()
{
val
gvcfFiles
=
for
((
sample
,
inputBam
)
<-
inputBams
)
yield
{
val
hc
=
new
nl
.
lumc
.
sasc
.
biopet
.
extensions
.
gatk
.
broad
.
HaplotypeCaller
(
this
)
hc
.
input_file
=
List
(
inputBam
)
hc
.
out
=
new
File
(
outputDir
,
sample
+
".gvcf.vcf.gz"
)
hc
.
useGvcf
()
val
hc
=
broad
.
HaplotypeCaller
.
gvcf
(
this
,
inputBam
,
new
File
(
outputDir
,
sample
+
".gvcf.vcf.gz"
))
add
(
hc
)
hc
.
out
}
val
genotypeGVCFs
=
GenotypeGVCFs
(
this
,
gvcfFiles
.
toList
,
outputFile
)
val
genotypeGVCFs
=
broad
.
GenotypeGVCFs
(
this
,
gvcfFiles
.
toList
,
outputFile
)
add
(
genotypeGVCFs
)
}
}
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