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
2465f250
Commit
2465f250
authored
Apr 14, 2017
by
Peter van 't Hof
Browse files
Passing gender information to shivavariantcalling
parent
811fe4c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/Shiva.scala
View file @
2465f250
...
...
@@ -60,11 +60,13 @@ class Shiva(val parent: Configurable) extends QScript with MultisampleMappingTra
override
def
namePrefix
=
"multisample"
override
def
configNamespace
:
String
=
"shivavariantcalling"
override
def
configPath
:
List
[
String
]
=
super
.
configPath
:::
"multisample"
::
Nil
genders
=
samples
.
map
{
case
(
sampleName
,
sample
)
=>
sampleName
->
sample
.
gender
}
}
else
new
ShivaVariantcalling
(
qscript
)
{
override
def
configNamespace
=
"shivavariantcalling"
sampleId
=
sample
libId
=
library
genders
=
sample
.
map
(
x
=>
x
->
samples
(
x
).
gender
).
toMap
}
}
...
...
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala
View file @
2465f250
...
...
@@ -14,15 +14,16 @@
*/
package
nl.lumc.sasc.biopet.pipelines.shiva
import
nl.lumc.sasc.biopet.core.
{
PipelineCommand
,
Reference
,
SampleLibraryTag
}
import
nl.lumc.sasc.biopet.core.
{
MultiSampleQScript
,
PipelineCommand
,
Reference
,
SampleLibraryTag
}
import
MultiSampleQScript.Gender
import
nl.lumc.sasc.biopet.core.summary.SummaryQScript
import
nl.lumc.sasc.biopet.extensions.Tabix
import
nl.lumc.sasc.biopet.extensions.gatk.
{
CombineVariants
,
GenotypeConcordance
}
import
nl.lumc.sasc.biopet.extensions.tools.VcfStats
import
nl.lumc.sasc.biopet.extensions.vt.
{
VtDecompose
,
VtNormalize
}
import
nl.lumc.sasc.biopet.extensions.vt.
{
VtDecompose
,
VtNormalize
}
import
nl.lumc.sasc.biopet.pipelines.bammetrics.TargetRegions
import
nl.lumc.sasc.biopet.pipelines.shiva.variantcallers.
{
VarscanCnsSingleSample
,
_
}
import
nl.lumc.sasc.biopet.utils.
{
BamUtils
,
Logging
}
import
nl.lumc.sasc.biopet.utils.
{
BamUtils
,
Logging
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.queue.QScript
import
org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile
...
...
@@ -48,9 +49,21 @@ class ShivaVariantcalling(val parent: Configurable) extends QScript
var
inputBqsrFiles
:
Map
[
String
,
File
]
=
Map
()
var
genders
:
Map
[
String
,
Gender.Value
]
=
_
/** Executed before script */
def
init
()
:
Unit
=
{
if
(
inputBamsArg
.
nonEmpty
)
inputBams
=
BamUtils
.
sampleBamMap
(
inputBamsArg
)
if
(
genders
==
null
)
genders
=
{
val
samples
:
Map
[
String
,
Any
]
=
config
(
"genders"
)
samples
.
map
{
case
(
sampleName
,
gender
)
=>
sampleName
->
(
gender
.
toString
.
toLowerCase
match
{
case
"male"
=>
Gender
.
Male
case
"female"
=>
Gender
.
Female
case
_
=>
Gender
.
Unknown
})
}
}
}
var
referenceVcf
:
Option
[
File
]
=
config
(
"reference_vcf"
)
...
...
@@ -100,6 +113,7 @@ class ShivaVariantcalling(val parent: Configurable) extends QScript
caller
.
inputBqsrFiles
=
inputBqsrFiles
caller
.
namePrefix
=
namePrefix
caller
.
outputDir
=
new
File
(
outputDir
,
caller
.
name
)
caller
.
genders
=
genders
add
(
caller
)
addStats
(
caller
.
outputFile
,
caller
.
name
)
val
normalize
:
Boolean
=
config
(
"execute_vt_normalize"
,
default
=
false
,
namespace
=
caller
.
configNamespace
)
...
...
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Variantcaller.scala
View file @
2465f250
...
...
@@ -14,6 +14,7 @@
*/
package
nl.lumc.sasc.biopet.pipelines.shiva.variantcallers
import
nl.lumc.sasc.biopet.core.MultiSampleQScript.Gender
import
nl.lumc.sasc.biopet.core.
{
BiopetQScript
,
Reference
}
import
org.broadinstitute.gatk.queue.QScript
...
...
@@ -27,6 +28,8 @@ trait Variantcaller extends QScript with BiopetQScript with Reference {
var
namePrefix
:
String
=
_
var
genders
:
Map
[
String
,
Gender.Value
]
=
_
val
mergeVcfResults
:
Boolean
=
config
(
"merge_vcf_results"
,
default
=
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