Skip to content
GitLab
Menu
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
2b9de137
Commit
2b9de137
authored
Feb 09, 2017
by
Sander Bollen
Committed by
GitHub
Feb 09, 2017
Browse files
Merge branch 'develop' into fix-BIOPET-563
parents
3b413fcd
cdbe8460
Changes
4
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
View file @
2b9de137
...
...
@@ -107,6 +107,7 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
count
+=
1
if
(
count
%
500
==
0
)
logger
.
info
(
s
"Preprocessing done for ${count} jobs out of ${functions.length} total"
)
}
logger
.
info
(
s
"Preprocessing done for ${functions.length} functions"
)
val
logDir
=
new
File
(
outputDir
,
".log"
+
File
.
separator
+
qSettings
.
runName
.
toLowerCase
)
...
...
@@ -121,6 +122,7 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
if
(!
i
.
file
.
isAbsolute
)
Logging
.
addError
(
s
"Input file should be an absolute path: ${i.file}"
)
}
logger
.
info
(
"Set stdout file when not set"
)
functions
.
filter
(
_
.
jobOutputFile
==
null
).
foreach
(
f
=>
{
val
className
=
if
(
f
.
getClass
.
isAnonymousClass
)
f
.
getClass
.
getSuperclass
.
getSimpleName
else
f
.
getClass
.
getSimpleName
BiopetQScript
.
safeOutputs
(
f
)
match
{
...
...
@@ -132,6 +134,7 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
if
(!
skipWriteDependencies
)
WriteDependencies
.
writeDependencies
(
functions
,
new
File
(
logDir
,
"graph"
))
else
logger
.
debug
(
"Write dependencies is skipped"
)
Logging
.
checkErrors
()
logger
.
info
(
"Script complete without errors"
)
...
...
docs/pipelines/shiva.md
View file @
2b9de137
...
...
@@ -196,6 +196,8 @@ variantcallers:
-
haplotypecaller
-
unifiedgenotyper
-
haplotypecaller_gvcf
unifiedgenotyper
:
merge_vcf_results
:
false
# This will do the variantcalling but will not merged into the final vcf file
```
**Additional XHMM CNV calling example**
...
...
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala
View file @
2b9de137
...
...
@@ -84,6 +84,7 @@ class ShivaVariantcalling(val root: Configurable) extends QScript
def
biopetScript
()
:
Unit
=
{
require
(
inputBams
.
nonEmpty
,
"No input bams found"
)
require
(
callers
.
nonEmpty
,
"must select at least 1 variantcaller, choices are: "
+
ShivaVariantcalling
.
callersList
(
this
).
map
(
_
.
name
).
mkString
(
", "
))
if
(!
callers
.
exists
(
_
.
mergeVcfResults
))
Logging
.
addError
(
"must select at least 1 variantcaller where merge_vcf_results is true"
)
addAll
(
dbsnpVcfFile
.
map
(
Shiva
.
makeValidateVcfJobs
(
this
,
_
,
referenceFasta
(),
new
File
(
outputDir
,
".validate"
))).
getOrElse
(
Nil
))
...
...
@@ -91,7 +92,7 @@ class ShivaVariantcalling(val root: Configurable) extends QScript
cv
.
out
=
finalFile
cv
.
setKey
=
Some
(
"VariantCaller"
)
cv
.
genotypemergeoption
=
Some
(
"PRIORITIZE"
)
cv
.
rod_priority_list
=
Some
(
callers
.
map
(
_
.
name
).
mkString
(
","
))
cv
.
rod_priority_list
=
Some
(
callers
.
filter
(
_
.
mergeVcfResults
).
map
(
_
.
name
).
mkString
(
","
))
for
(
caller
<-
callers
)
{
caller
.
inputBams
=
inputBams
caller
.
namePrefix
=
namePrefix
...
...
@@ -112,21 +113,22 @@ class ShivaVariantcalling(val root: Configurable) extends QScript
vtDecompose
.
inputVcf
=
vtNormalize
.
outputVcf
vtDecompose
.
outputVcf
=
swapExt
(
caller
.
outputDir
,
vtNormalize
.
outputVcf
,
".vcf.gz"
,
".decompose.vcf.gz"
)
add
(
vtDecompose
,
Tabix
(
this
,
vtDecompose
.
outputVcf
))
cv
.
variant
:+=
TaggedFile
(
vtDecompose
.
outputVcf
,
caller
.
name
)
if
(
caller
.
mergeVcfResults
)
cv
.
variant
:+=
TaggedFile
(
vtDecompose
.
outputVcf
,
caller
.
name
)
}
else
if
(
normalize
&&
!
decompose
)
{
vtNormalize
.
outputVcf
=
swapExt
(
caller
.
outputDir
,
caller
.
outputFile
,
".vcf.gz"
,
".normalized.vcf.gz"
)
add
(
vtNormalize
,
Tabix
(
this
,
vtNormalize
.
outputVcf
))
cv
.
variant
:+=
TaggedFile
(
vtNormalize
.
outputVcf
,
caller
.
name
)
if
(
caller
.
mergeVcfResults
)
cv
.
variant
:+=
TaggedFile
(
vtNormalize
.
outputVcf
,
caller
.
name
)
}
else
if
(!
normalize
&&
decompose
)
{
vtDecompose
.
inputVcf
=
caller
.
outputFile
vtDecompose
.
outputVcf
=
swapExt
(
caller
.
outputDir
,
caller
.
outputFile
,
".vcf.gz"
,
".decompose.vcf.gz"
)
add
(
vtDecompose
,
Tabix
(
this
,
vtDecompose
.
outputVcf
))
cv
.
variant
:+=
TaggedFile
(
vtDecompose
.
outputVcf
,
caller
.
name
)
}
else
cv
.
variant
:+=
TaggedFile
(
caller
.
outputFile
,
caller
.
name
)
if
(
caller
.
mergeVcfResults
)
cv
.
variant
:+=
TaggedFile
(
vtDecompose
.
outputVcf
,
caller
.
name
)
}
else
if
(
caller
.
mergeVcfResults
)
cv
.
variant
:+=
TaggedFile
(
caller
.
outputFile
,
caller
.
name
)
}
if
(
cv
.
variant
.
nonEmpty
)
{
add
(
cv
)
addStats
(
finalFile
,
"final"
)
}
add
(
cv
)
addStats
(
finalFile
,
"final"
)
addSummaryJobs
()
}
...
...
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Variantcaller.scala
View file @
2b9de137
...
...
@@ -27,6 +27,8 @@ trait Variantcaller extends QScript with BiopetQScript with Reference {
var
namePrefix
:
String
=
_
val
mergeVcfResults
:
Boolean
=
config
(
"merge_vcf_results"
,
default
=
true
)
/**
* Map of samplename -> (preprocessed) bam file
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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