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
559881ed
Commit
559881ed
authored
Jan 15, 2016
by
Sander van der Zeeuw
Browse files
add varscan to shiva variantcallers
parent
9e62862f
Changes
4
Hide whitespace changes
Inline
Side-by-side
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/Mpileup2cns.scala
→
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/
Varscan
Mpileup2cns.scala
View file @
559881ed
...
...
@@ -20,7 +20,7 @@ import java.io.File
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
class
Mpileup2cns
(
val
root
:
Configurable
)
extends
Varscan
{
class
Varscan
Mpileup2cns
(
val
root
:
Configurable
)
extends
Varscan
{
@Input
(
doc
=
"Input mpileup file"
,
required
=
false
)
// if not defined, input is stdin
var
input
:
Option
[
File
]
=
None
...
...
@@ -47,22 +47,17 @@ class Mpileup2cns(val root: Configurable) extends Varscan {
variants
.
foreach
{
case
v
=>
require
(
validValues
.
contains
(
v
),
"variants value must be either 0 or 1"
)
}
}
override
def
cmdLine
=
{
val
baseCommand
=
super
.
cmdLine
+
required
(
"mpileup2cns"
)
+
required
(
""
,
input
)
+
required
(
"--min-coverage"
,
minCoverage
)
+
required
(
"--min-reads2"
,
minReads2
)
+
required
(
"--min-avg-qual"
,
minAvgQual
)
+
required
(
"--min-var-freq"
,
minVarFreq
)
+
required
(
"--min-freq-for-hom"
,
minFreqForHom
)
+
required
(
"--p-value"
,
pValue
)
+
required
(
"--strand-filter"
,
strandFilter
)
+
required
(
"--output-vcf"
,
outputVcf
)
+
required
(
"--vcf-sample-list"
,
vcfSampleList
)
+
required
(
"--variants"
,
variants
)
if
(
output
.
isDefined
)
baseCommand
+
" > "
+
required
(
output
)
else
baseCommand
}
override
def
cmdLine
=
super
.
cmdLine
+
required
(
"mpileup2cns"
)
+
required
(
input
)
+
optional
(
"--min-coverage"
,
minCoverage
)
+
optional
(
"--min-reads2"
,
minReads2
)
+
optional
(
"--min-avg-qual"
,
minAvgQual
)
+
optional
(
"--min-var-freq"
,
minVarFreq
)
+
optional
(
"--min-freq-for-hom"
,
minFreqForHom
)
+
optional
(
"--p-value"
,
pValue
)
+
optional
(
"--strand-filter"
,
strandFilter
)
+
optional
(
"--output-vcf"
,
outputVcf
)
+
optional
(
"--vcf-sample-list"
,
vcfSampleList
)
+
optional
(
"--variants"
,
variants
)
+
(
if
(
outputAsStsout
)
""
else
" > "
+
required
(
output
))
}
public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/extensions/CustomVarScan.scala
View file @
559881ed
...
...
@@ -21,7 +21,7 @@ import nl.lumc.sasc.biopet.core.{ Reference, BiopetCommandLineFunction }
import
nl.lumc.sasc.biopet.core.extensions.PythonCommandLineFunction
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.extensions.samtools.SamtoolsMpileup
import
nl.lumc.sasc.biopet.extensions.varscan.Mpileup2cns
import
nl.lumc.sasc.biopet.extensions.varscan.
Varscan
Mpileup2cns
import
nl.lumc.sasc.biopet.extensions.
{
Bgzip
,
Tabix
}
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
...
...
@@ -65,7 +65,7 @@ class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction wi
override
def
cmdLine
:
String
=
required
(
executable
)
+
required
(
"-vP"
)
+
required
(
"""\t\t"""
)
}
private
val
varscan
=
new
Mpileup2cns
(
wrapper
.
root
)
{
private
val
varscan
=
new
Varscan
Mpileup2cns
(
wrapper
.
root
)
{
override
def
configName
=
wrapper
.
configName
strandFilter
=
Option
(
0
)
outputVcf
=
Option
(
1
)
...
...
public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTrait.scala
View file @
559881ed
...
...
@@ -156,7 +156,12 @@ trait ShivaVariantcallingTrait extends SummaryQScript
}
/** Will generate all available variantcallers */
protected
def
callersList
:
List
[
Variantcaller
]
=
List
(
new
Freebayes
(
this
),
new
RawVcf
(
this
),
new
Bcftools
(
this
),
new
BcftoolsSingleSample
(
this
))
protected
def
callersList
:
List
[
Variantcaller
]
=
List
(
new
Freebayes
(
this
),
new
RawVcf
(
this
),
new
Bcftools
(
this
),
new
BcftoolsSingleSample
(
this
),
new
VarscanCnsSingleSample
(
this
))
/** Location of summary file */
def
summaryFile
=
new
File
(
outputDir
,
"ShivaVariantcalling.summary.json"
)
...
...
public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/VarscanCnsSingleSample.scala
0 → 100644
View file @
559881ed
package
nl.lumc.sasc.biopet.pipelines.shiva.variantcallers
import
java.io.PrintWriter
import
nl.lumc.sasc.biopet.extensions.gatk.CombineVariants
import
nl.lumc.sasc.biopet.extensions.
{
Ln
,
Tabix
,
Bgzip
}
import
nl.lumc.sasc.biopet.extensions.samtools.SamtoolsMpileup
import
nl.lumc.sasc.biopet.extensions.varscan.VarscanMpileup2cns
import
nl.lumc.sasc.biopet.utils.config.Configurable
/**
* Created by sajvanderzeeuw on 15-1-16.
*/
class
VarscanCnsSingleSample
(
val
root
:
Configurable
)
extends
Variantcaller
{
val
name
=
"varscan_cns_singlesample"
protected
def
defaultPrio
=
25
override
def
defaults
=
Map
(
"samtoolsmpileup"
->
Map
(
"disable_baq"
->
true
,
"depth"
->
1000000
),
"mpileup2cns"
->
Map
(
"strand_filter"
->
0
)
)
override
def
fixedValues
=
Map
(
"samtoolsmpileup"
->
Map
(
"output_mapping_quality"
->
true
),
"mpileup2cns"
->
Map
(
"output_vcf"
->
1
)
)
def
biopetScript
:
Unit
=
{
val
sampleVcfs
=
for
((
sample
,
inputBam
)
<-
inputBams
.
toList
)
yield
{
val
mpileup
=
new
SamtoolsMpileup
(
this
)
mpileup
.
input
=
List
(
inputBam
)
val
sampleVcf
=
new
File
(
outputDir
,
s
"${name}_$sample.vcf.gz"
)
val
sampleFile
=
new
File
(
outputDir
,
s
"$sample.name.txt"
)
sampleFile
.
deleteOnExit
()
val
writer
=
new
PrintWriter
(
sampleFile
)
writer
.
println
(
sample
)
writer
.
close
()
val
varscan
=
new
VarscanMpileup2cns
(
this
)
varscan
.
vcfSampleList
=
Some
(
sampleVcf
)
add
(
mpileup
|
varscan
|
new
Bgzip
(
this
)
>
sampleVcf
)
add
(
Tabix
(
this
,
sampleVcf
))
sampleVcf
}
if
(
sampleVcfs
.
size
>
1
)
{
val
cv
=
new
CombineVariants
(
this
)
cv
.
inputFiles
=
sampleVcfs
cv
.
outputFile
=
outputFile
cv
.
setKey
=
"null"
cv
.
excludeNonVariants
=
true
add
(
cv
)
}
else
add
(
Ln
.
apply
(
this
,
sampleVcfs
.
head
,
outputFile
))
add
(
Tabix
(
this
,
outputFile
))
}
}
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