Commit e8b95688 authored by Sander Bollen's avatar Sander Bollen
Browse files

fix for #372

parent b4dac971
......@@ -42,13 +42,13 @@ class HaplotypeCallerGvcf(val root: Configurable) extends Variantcaller {
)
def biopetScript() {
val gvcfFiles = for ((sample, inputBam) <- inputBams) yield {
gVcfFiles = 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, gvcfFiles.values.toList, outputFile)
val genotypeGVCFs = gatk.GenotypeGVCFs(this, gVcfFiles.values.toList, outputFile)
add(genotypeGVCFs)
}
}
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 shouldEqual samples
}
def createInputMap(samples: List[String]): Map[String, File] = {
samples map { x =>
val file = File.createTempFile(x, ".bam")
file.deleteOnExit()
x -> file
} toMap
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment