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

adding checkAllelesVcfInBamTest stub and adding bgzipped and tabixed VCF files...

adding checkAllelesVcfInBamTest stub and adding bgzipped and tabixed VCF files for tools that need indexed files
parent fabd42e8
......@@ -81,7 +81,7 @@ object CheckAllelesVcfInBam extends ToolCommand {
val commandArgs: Args = argsParser.parse(args, Args()) getOrElse sys.exit(1)
if (commandArgs.bamFiles.size != commandArgs.samples.size)
logger.warn("Number of samples is different from number of bam files: those left over will be removed")
logger.warn("Number of samples is different from number of bam files: additional samples or bam files will not be used")
val samReaderFactory = SamReaderFactory.makeDefault
val bamReaders: Map[String, SamReader] = Map(commandArgs.samples zip commandArgs.bamFiles.map(x => samReaderFactory.open(x)): _*)
val bamHeaders = bamReaders.map(x => (x._1, x._2.getFileHeader))
......
This diff is collapsed.
package nl.lumc.sasc.biopet.tools
import java.nio.file.Paths
import org.scalatest.Matchers
import org.scalatest.mock.MockitoSugar
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.Test
import scala.util.Random
/**
* Created by ahbbollen on 10-4-15.
*/
class CheckAllelesVcfInBamTest extends TestNGSuite with MockitoSugar with Matchers {
import CheckAllelesVcfInBam._
private def resourcePath(p: String): String = {
Paths.get(getClass.getResource(p).toURI).toString
}
val vcf = resourcePath("/chrQ.vcf")
val bam = resourcePath("/single01.bam")
val rand = new Random()
@Test def testOutputTypeVcf() = {
val tmp_path = "/tmp/CheckAllesVcfInBam_" + rand.nextString(10) + ".vcf"
val arguments = Array("-I", vcf, "-b", bam, "-s", "sample01", "-o", tmp_path)
main(arguments)
}
@Test def testOutputTypeVcfGz() = {
val tmp_path = "/tmp/CheckAllesVcfInBam_" + rand.nextString(10) + ".vcf.gz"
val arguments = Array("-I", vcf, "-b", bam, "-s", "sample01", "-o", tmp_path)
main(arguments)
}
@Test def testOutputTypeBcf() = {
val tmp_path = "/tmp/CheckAllesVcfInBam_" + rand.nextString(10) + ".bcf"
val arguments = Array("-I", vcf, "-b", bam, "-s", "sample01", "-o", tmp_path)
main(arguments)
}
}
......@@ -19,24 +19,24 @@ class VcfWithVcfTest extends TestNGSuite with MockitoSugar with Matchers {
Paths.get(getClass.getResource(p).toURI).toString
}
val vepped_path = resourcePath("/VEP_oneline.vcf")
val unvepped_path = resourcePath("/unvepped.vcf")
val vepped_path = resourcePath("/VEP_oneline.vcf.gz")
val unvepped_path = resourcePath("/unvepped.vcf.gz")
val rand = new Random()
@Test def testOutputTypeVcf() = {
val tmp_path = "/tmp_VcfWithVcf_" + rand.nextString(10) + ".vcf"
val tmp_path = "/tmp/VcfWithVcf_" + rand.nextString(10) + ".vcf"
val arguments = Array("-I", unvepped_path, "-S", vepped_path, "-O", tmp_path, "-f", "CSQ")
main(arguments)
}
@Test def testOutputTypeVcfGz() = {
val tmp_path = "/tmp_VcfWithVcf_" + rand.nextString(10) + ".vcf.gz"
val tmp_path = "/tmp/VcfWithVcf_" + rand.nextString(10) + ".vcf.gz"
val arguments = Array("-I", unvepped_path, "-S", vepped_path, "-O", tmp_path, "-f", "CSQ")
main(arguments)
}
@Test def testOutputTypeBcf() = {
val tmp_path = "/tmp_VcfWithVcf_" + rand.nextString(10) + ".bcf"
val tmp_path = "/tmp/VcfWithVcf_" + rand.nextString(10) + ".bcf"
val arguments = Array("-I", unvepped_path, "-S", vepped_path, "-O", tmp_path, "-f", "CSQ")
main(arguments)
}
......
Markdown is supported
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