Fixing the VariantContextUtilsUnitTest

This commit is contained in:
Eric Banks 2012-09-22 23:24:55 -04:00
parent 344083051b
commit 74bb4e2739
1 changed files with 20 additions and 20 deletions

View File

@ -598,8 +598,8 @@ public class VariantContextUtilsUnitTest extends BaseTest {
private RepeatDetectorTest(boolean isTrueRepeat, String ref, String refAlleleString, String ... altAlleleStrings) { private RepeatDetectorTest(boolean isTrueRepeat, String ref, String refAlleleString, String ... altAlleleStrings) {
super(RepeatDetectorTest.class); super(RepeatDetectorTest.class);
this.ref = "N" + ref; // add a dummy base for the event here
this.isTrueRepeat = isTrueRepeat; this.isTrueRepeat = isTrueRepeat;
this.ref = ref;
List<Allele> alleles = new LinkedList<Allele>(); List<Allele> alleles = new LinkedList<Allele>();
final Allele refAllele = Allele.create(refAlleleString, true); final Allele refAllele = Allele.create(refAlleleString, true);
@ -609,7 +609,7 @@ public class VariantContextUtilsUnitTest extends BaseTest {
alleles.add(alt); alleles.add(alt);
} }
VariantContextBuilder builder = new VariantContextBuilder("test", "chr1", 1, 1 + refAllele.length(), alleles); VariantContextBuilder builder = new VariantContextBuilder("test", "chr1", 1, refAllele.length(), alleles);
this.vc = builder.make(); this.vc = builder.make();
} }
@ -620,31 +620,31 @@ public class VariantContextUtilsUnitTest extends BaseTest {
@DataProvider(name = "RepeatDetectorTest") @DataProvider(name = "RepeatDetectorTest")
public Object[][] makeRepeatDetectorTest() { public Object[][] makeRepeatDetectorTest() {
new RepeatDetectorTest(true, "AAC", "-", "A"); new RepeatDetectorTest(true, "NAAC", "N", "NA");
new RepeatDetectorTest(true, "AAC", "A", "-"); new RepeatDetectorTest(true, "NAAC", "NA", "N");
new RepeatDetectorTest(false, "AAC", "AA", "-"); new RepeatDetectorTest(false, "NAAC", "NAA", "N");
new RepeatDetectorTest(false, "AAC", "-", "C"); new RepeatDetectorTest(false, "NAAC", "N", "NC");
new RepeatDetectorTest(false, "AAC", "A", "C"); new RepeatDetectorTest(false, "AAC", "A", "C");
// running out of ref bases => false // running out of ref bases => false
new RepeatDetectorTest(false, "AAC", "-", "CAGTA"); new RepeatDetectorTest(false, "NAAC", "N", "NCAGTA");
// complex repeats // complex repeats
new RepeatDetectorTest(true, "ATATATC", "-", "AT"); new RepeatDetectorTest(true, "NATATATC", "N", "NAT");
new RepeatDetectorTest(true, "ATATATC", "-", "ATA"); new RepeatDetectorTest(true, "NATATATC", "N", "NATA");
new RepeatDetectorTest(true, "ATATATC", "-", "ATAT"); new RepeatDetectorTest(true, "NATATATC", "N", "NATAT");
new RepeatDetectorTest(true, "ATATATC", "AT", "-"); new RepeatDetectorTest(true, "NATATATC", "NAT", "N");
new RepeatDetectorTest(false, "ATATATC", "ATA", "-"); new RepeatDetectorTest(false, "NATATATC", "NATA", "N");
new RepeatDetectorTest(false, "ATATATC", "ATAT", "-"); new RepeatDetectorTest(false, "NATATATC", "NATAT", "N");
// multi-allelic // multi-allelic
new RepeatDetectorTest(true, "ATATATC", "-", "AT", "ATAT"); new RepeatDetectorTest(true, "NATATATC", "N", "NAT", "NATAT");
new RepeatDetectorTest(true, "ATATATC", "-", "AT", "ATA"); new RepeatDetectorTest(true, "NATATATC", "N", "NAT", "NATA");
new RepeatDetectorTest(true, "ATATATC", "AT", "-", "ATAT"); new RepeatDetectorTest(true, "NATATATC", "NAT", "N", "NATAT");
new RepeatDetectorTest(true, "ATATATC", "AT", "-", "ATA"); // two As new RepeatDetectorTest(true, "NATATATC", "NAT", "N", "NATA"); // two As
new RepeatDetectorTest(false, "ATATATC", "AT", "-", "ATC"); // false new RepeatDetectorTest(false, "NATATATC", "NAT", "N", "NATC"); // false
new RepeatDetectorTest(false, "ATATATC", "AT", "-", "CC"); // false new RepeatDetectorTest(false, "NATATATC", "NAT", "N", "NCC"); // false
new RepeatDetectorTest(false, "ATATATC", "AT", "ATAT", "CC"); // false new RepeatDetectorTest(false, "NATATATC", "NAT", "NATAT", "NCC"); // false
return RepeatDetectorTest.getTests(RepeatDetectorTest.class); return RepeatDetectorTest.getTests(RepeatDetectorTest.class);
} }