Search in sources :

Example 1 with VcfXmlAmalgamation

use of com.github.lindenb.jvarkit.tools.vcfamalgation.VcfXmlAmalgamation in project jvarkit by lindenb.

the class TestNg01 method testVcfAmalgation.

@Test
public void testVcfAmalgation() throws IOException {
    final File tmpXml = File.createTempFile("_tmp", ".xml", TEST_RESULTS_DIR);
    PrintWriter pw = new PrintWriter(tmpXml);
    pw.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<config>\n" + "<vcfhead><count>10</count></vcfhead>" + "<vcffilterjdk><filter>ODD</filter><expression>return variant.getStart()%2==0;</expression></vcffilterjdk>" + "<vcftail><count>5</count></vcftail>" + "</config>");
    pw.flush();
    pw.close();
    final File output = new File(TEST_RESULTS_DIR, "jeter.vcf");
    Assert.assertEquals(0, new VcfXmlAmalgamation().instanceMain(new String[] { "-o", output.getPath(), "--xml", tmpXml.getPath(), VCF01 }));
    Assert.assertTrue(output.delete());
    tmpXml.delete();
}
Also used : VcfXmlAmalgamation(com.github.lindenb.jvarkit.tools.vcfamalgation.VcfXmlAmalgamation) File(java.io.File) PrintWriter(java.io.PrintWriter) Test(org.testng.annotations.Test)

Aggregations

VcfXmlAmalgamation (com.github.lindenb.jvarkit.tools.vcfamalgation.VcfXmlAmalgamation)1 File (java.io.File)1 PrintWriter (java.io.PrintWriter)1 Test (org.testng.annotations.Test)1