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
e1fe4046
Commit
e1fe4046
authored
Jul 20, 2016
by
Peter van 't Hof
Browse files
Merge branch 'fix-hc-gvcf' into 'develop'
fix for #372 Fixes #372 See merge request !436
parents
37b7f677
a564d05b
Changes
2
Hide whitespace changes
Inline
Side-by-side
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCallerGvcf.scala
View file @
e1fe4046
...
...
@@ -42,13 +42,13 @@ class HaplotypeCallerGvcf(val root: Configurable) extends Variantcaller {
)
def
biopetScript
()
{
val
gv
cfFiles
=
for
((
sample
,
inputBam
)
<-
inputBams
)
yield
{
gV
cfFiles
=
for
((
sample
,
inputBam
)
<-
inputBams
)
yield
{
val
hc
=
gatk
.
HaplotypeCaller
(
this
,
List
(
inputBam
),
new
File
(
outputDir
,
sample
+
".gvcf.vcf.gz"
))
add
(
hc
)
sample
->
hc
.
out
}
val
genotypeGVCFs
=
gatk
.
GenotypeGVCFs
(
this
,
g
v
cfFiles
.
values
.
toList
,
outputFile
)
val
genotypeGVCFs
=
gatk
.
GenotypeGVCFs
(
this
,
g
V
cfFiles
.
values
.
toList
,
outputFile
)
add
(
genotypeGVCFs
)
}
}
shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaploTypeCallerGvcfTest.scala
0 → 100644
View file @
e1fe4046
package
nl.lumc.sasc.biopet.pipelines.shiva.variantcallers
import
java.io.File
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
/**
* Created by Sander Bollen on 13-7-16.
*/
class
HaploTypeCallerGvcfTest
extends
TestNGSuite
with
Matchers
{
@Test
def
testGvcfFiles
=
{
val
samples
=
List
(
"sample01"
,
"sample02"
,
"sample03"
)
val
hc
=
new
HaplotypeCallerGvcf
(
null
)
hc
.
inputBams
=
createInputMap
(
samples
)
hc
.
biopetScript
()
hc
.
getGvcfs
.
size
shouldBe
3
hc
.
getGvcfs
.
keys
.
toList
.
sorted
shouldEqual
samples
.
sorted
}
def
createInputMap
(
samples
:
List
[
String
])
:
Map
[
String
,
File
]
=
{
samples
map
{
x
=>
val
file
=
File
.
createTempFile
(
x
,
".bam"
)
file
.
deleteOnExit
()
x
->
file
}
toMap
}
}
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