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
7e973ac3
Commit
7e973ac3
authored
Feb 23, 2016
by
Wai Yi Leung
Browse files
Change tests to accept pindel
Add testcode to accept merged VCFs
parent
c82bbe9f
Changes
6
Hide whitespace changes
Inline
Side-by-side
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Pysvtools.scala
View file @
7e973ac3
...
...
@@ -19,7 +19,7 @@ class Pysvtools(val root: Configurable) extends BiopetCommandLineFunction {
var
flanking
:
Option
[
Int
]
=
config
(
"flanking"
)
var
exclusionRegions
:
List
[
File
]
=
config
(
"exclusion_regions"
)
var
translocationsOnly
:
Boolean
=
config
(
"translocations_only"
)
var
translocationsOnly
:
Boolean
=
config
(
"translocations_only"
,
default
=
false
)
@Output
(
doc
=
"Unzipped file"
,
required
=
true
)
var
output
:
File
=
_
...
...
public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/BamUtilsTest.scala
View file @
7e973ac3
...
...
@@ -3,11 +3,11 @@ package nl.lumc.sasc.biopet.utils
import
java.io.File
import
htsjdk.samtools._
import
org.mockito.Mockito.
{
inOrder
=>
inOrd
}
import
org.mockito.Mockito.
{
inOrder
=>
inOrd
}
import
org.scalatest.Matchers
import
org.scalatest.mock.MockitoSugar
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.
{
BeforeClass
,
Test
}
import
org.testng.annotations.
{
BeforeClass
,
Test
}
/**
* Created by wyleung on 22-2-16.
...
...
public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCalling.scala
View file @
7e973ac3
...
...
@@ -18,9 +18,7 @@ package nl.lumc.sasc.biopet.pipelines.shiva
import
nl.lumc.sasc.biopet.core.summary.SummaryQScript
import
nl.lumc.sasc.biopet.core.
{
PipelineCommand
,
Reference
,
SampleLibraryTag
}
import
nl.lumc.sasc.biopet.extensions.Pysvtools
import
nl.lumc.sasc.biopet.pipelines.shiva.svcallers.
{
Breakdancer
,
Clever
,
Delly
,
SvCaller
}
import
nl.lumc.sasc.biopet.pipelines.shiva.svcallers._
import
nl.lumc.sasc.biopet.utils.
{
BamUtils
,
Logging
}
import
nl.lumc.sasc.biopet.pipelines.shiva.svcallers.
{
Breakdancer
,
Clever
,
Delly
,
SvCaller
,
_
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.utils.
{
BamUtils
,
Logging
}
import
org.broadinstitute.gatk.queue.QScript
...
...
@@ -68,12 +66,12 @@ class ShivaSvCalling(val root: Configurable) extends QScript with SummaryQScript
// merge VCF by sample
for
((
sample
,
bamFile
)
<-
inputBams
)
{
var
sampleV
cfs
:
List
[
File
]
=
List
()
var
sampleV
CFS
:
List
[
Option
[
File
]
]
=
List
.
empty
callers
.
foreach
{
caller
=>
sampleV
cfs
:
+
=
caller
.
outputVCF
(
sample
)
.
get
sampleV
CFS
:
:
=
caller
.
outputVCF
(
sample
)
}
val
mergeSVcalls
=
new
Pysvtools
(
this
)
mergeSVcalls
.
input
=
sampleV
cfs
mergeSVcalls
.
input
=
sampleV
CFS
.
flatten
mergeSVcalls
.
output
=
new
File
(
outputDir
,
sample
+
".merged.vcf"
)
add
(
mergeSVcalls
)
// outputFiles += (sample -> mergeSVcalls.output)
...
...
public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Pindel.scala
View file @
7e973ac3
...
...
@@ -57,6 +57,8 @@ class Pindel(val root: Configurable) extends SvCaller {
pindelVcf
.
rDate
=
todayformat
.
format
(
today
)
// officially, we should enter the date of the genome here
pindelVcf
.
outputVCF
=
new
File
(
pindelDir
,
s
"${sample}.pindel.vcf"
)
add
(
pindelVcf
)
addVCF
(
sample
,
pindelVcf
.
outputVCF
)
}
}
...
...
public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/SvCaller.scala
View file @
7e973ac3
...
...
@@ -13,16 +13,19 @@ trait SvCaller extends QScript with BiopetQScript with Reference {
var
namePrefix
:
String
=
_
var
inputBams
:
Map
[
String
,
File
]
=
_
var
inputBams
:
Map
[
String
,
File
]
=
Map
.
empty
def
outputVCF
(
sample
:
String
)
:
Option
[
File
]
=
{
outputVcfs
.
get
(
sample
)
outputVCFs
.
get
(
sample
)
match
{
case
Some
(
file
)
=>
Some
(
file
)
case
_
=>
None
}
}
protected
var
outputV
cf
s
:
Map
[
String
,
File
]
=
_
protected
var
outputV
CF
s
:
Map
[
String
,
File
]
=
Map
.
empty
protected
def
addVCF
(
sampleId
:
String
,
outputVCF
:
File
)
=
{
outputV
cf
s
+=
(
sampleId
->
outputVCF
)
outputV
CF
s
+=
(
sampleId
->
outputVCF
)
}
def
init
()
=
{}
...
...
public/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCallingTest.scala
View file @
7e973ac3
...
...
@@ -221,6 +221,10 @@ object ShivaSvCallingTest {
"pindelvcf"
->
Map
(
"exe"
->
"test"
),
"clever"
->
Map
(
"exe"
->
"test"
),
"delly"
->
Map
(
"exe"
->
"test"
),
"varscan_jar"
->
"test"
"varscan_jar"
->
"test"
,
"pysvtools"
->
Map
(
"exe"
->
"test"
,
"exclusion_regions"
->
"test"
,
"translocations_only"
->
false
)
)
}
\ No newline at end of file
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