Adding contracts and unit tests for HaplotypeCaller GenotypingEngine

This commit is contained in:
Ryan Poplin 2012-03-15 11:55:48 -04:00
parent c1f454fbe6
commit 0fa5a7af05
1 changed files with 10 additions and 0 deletions

View File

@ -236,6 +236,16 @@ public class VariantContextUnitTest extends BaseTest {
Assert.assertEquals(vc.getSampleNames().size(), 0);
}
@Test
public void testMatchingAlleles() {
List<Allele> alleles = Arrays.asList(ATCref, del);
VariantContext vc = new VariantContextBuilder("test", delLoc, delLocStart, delLocStop, alleles).referenceBaseForIndel((byte)'A').make();
VariantContext vc2 = new VariantContextBuilder("test2", delLoc, delLocStart+12, delLocStop+12, alleles).referenceBaseForIndel((byte)'A').make();
Assert.assertTrue(vc.hasSameAllelesAs(vc2));
Assert.assertTrue(vc.hasSameAlternateAllelesAs(vc2));
}
@Test
public void testCreatingInsertionVariantContext() {
List<Allele> alleles = Arrays.asList(delRef, ATC);