Package org.broadinstitute.gatk.engine.walkers.diffengine

Examples of org.broadinstitute.gatk.engine.walkers.diffengine.DiffElement


    @Test(enabled = true, dataProvider = "nodedata")
    public void testNodeAccessors(NodeTest test) {
        Assert.assertNotNull(test.node.getElements());

        for ( String name : test.allNames ) {
            DiffElement elt = test.node.getElement(name);
            Assert.assertNotNull(elt, "Failed to find field " + elt + " in " + test.node);
            Assert.assertEquals(elt.getName(), name);
            Assert.assertEquals(elt.getValue().isAtomic(), test.fields.contains(name), "Failed atomic/compound expectation: " + test.node);
        }
    }
View Full Code Here


    }

    @Test(enabled = true, dataProvider = "fromstringdata")
    public void parseFromString(FromStringTest test) {
        logger.warn("Testing from string: " + test.string);
        DiffElement elt = DiffNode.fromString(test.string);
        Assert.assertEquals(elt.toOneLineString(), test.expected.toOneLineString());
    }
View Full Code Here

            Assert.assertEquals(e.getValue(), engine.getReader(e.getKey()));
        }
    }

    private static void testLeaf(DiffNode rec, String field, Object expected) {
        DiffElement value = rec.getElement(field);
        Assert.assertNotNull(value, "Expected to see leaf named " + field + " in rec " + rec);
        Assert.assertEquals(value.getValue().getValue(), expected, "Expected to see leaf named " + field + " to have value " + expected + " in rec " + rec + " but got instead " + value.getValue().getValue());
    }
View Full Code Here

        logger.warn("testVCF1");
        DiffableReader vcfReader = engine.getReader("VCF");
        Assert.assertTrue(vcfReader.canRead(vcfFile));
        Assert.assertFalse(vcfReader.canRead(bamFile));

        DiffElement diff = vcfReader.readFromFile(vcfFile, -1);
        Assert.assertNotNull(diff);

        Assert.assertEquals(diff.getName(), vcfFile.getName());
        Assert.assertSame(diff.getParent(), DiffElement.ROOT);

        DiffNode node = diff.getValueAsNode();
        Assert.assertEquals(node.getElements().size(), 11);

        // chr1    2646    rs62635284      G       A       0.15    PASS    AC=2;AF=1.00;AN=2       GT:AD:DP:GL:GQ  1/1:53,75:3:-12.40,-0.90,-0.00:9.03
        DiffNode rec1 = node.getElement("chr1:2646").getValueAsNode();
        testLeaf(rec1, "CHROM", "chr1");
View Full Code Here

        logger.warn("testBAM");
        DiffableReader bamReader = engine.getReader("BAM");
        Assert.assertTrue(bamReader.canRead(bamFile));
        Assert.assertFalse(bamReader.canRead(vcfFile));

        DiffElement diff = bamReader.readFromFile(bamFile, -1);
        Assert.assertNotNull(diff);

        Assert.assertEquals(diff.getName(), bamFile.getName());
        Assert.assertSame(diff.getParent(), DiffElement.ROOT);

        DiffNode node = diff.getValueAsNode();
        Assert.assertEquals(node.getElements().size(), 33);

        // 30PPJAAXX090125:1:42:512:1817#0 99      chr1    200     0       76M     =
        // 255     -130    ACCCTAACCCTAACCCTAACCCTAACCATAACCCTAAGACTAACCCTAAACCTAACCCTCATAATCGAAATACAAC
        // BBBBC@C?AABCBB<63>=B@>+B9-9+)2B8,+@327B5A>90((>-+''3?(/'''A)(''19('7.,**%)3:
 
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.engine.walkers.diffengine.DiffElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.