Skip to content
Snippets Groups Projects
Commit 035f43f7 authored by Sander Bollen's avatar Sander Bollen
Browse files

fix compile error

parent ffaf3ecb
No related branches found
No related tags found
No related merge requests found
......@@ -2,14 +2,14 @@ package nl.lumc.sasc.biopet.extensions.tools
import java.io.File
import nl.lumc.sasc.biopet.core.ToolCommandFuntion
import nl.lumc.sasc.biopet.core.ToolCommandFunction
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Argument, Output, Input }
/**
* Created by ahbbollen on 13-10-15.
*/
class GvcfToBed(val root: Configurable) extends ToolCommandFuntion {
class GvcfToBed(val root: Configurable) extends ToolCommandFunction {
def toolObject = nl.lumc.sasc.biopet.tools.GvcfToBed
@Input(doc = "input vcf")
......
......@@ -79,8 +79,10 @@ object GvcfToBed extends ToolCommand {
* @return
*/
def hasMinGenomeQuality(record: VariantContext, sample: Option[String], minGQ: Int): Boolean = {
sample foreach { x => if (!record.getSampleNamesOrderedByName.contains(x))
throw new IllegalArgumentException("Sample does not exist")}
sample foreach { x =>
if (!record.getSampleNamesOrderedByName.contains(x))
throw new IllegalArgumentException("Sample does not exist")
}
val gt = record.getGenotype(sample.getOrElse(record.getSampleNamesOrderedByName.head))
gt.hasGQ && gt.getGQ >= minGQ
}
......
......@@ -46,7 +46,7 @@ class GvcfToBedTest extends TestNGSuite with Matchers with MockitoSugar {
val reader = new VCFFileReader(vepped, false)
val record = reader.iterator().next()
an [IllegalArgumentException] should be thrownBy hasMinGenomeQuality(record, Some("dummy"), 99)
an[IllegalArgumentException] should be thrownBy hasMinGenomeQuality(record, Some("dummy"), 99)
}
@Test def testCreateBedRecord = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment