Update integration tests to reflect new FT header line standard and new DiagnoseTargets field names
This commit is contained in:
parent
64d7e93209
commit
064cc56335
|
|
@ -36,18 +36,19 @@ public class DiagnoseTargetsIntegrationTest extends WalkerTest {
|
||||||
final String L = validationDataLocation + "DT-itest.interval_list";
|
final String L = validationDataLocation + "DT-itest.interval_list";
|
||||||
|
|
||||||
private void DTTest(String testName, String args, String md5) {
|
private void DTTest(String testName, String args, String md5) {
|
||||||
String base = String.format("-T DiagnoseTargets -R %s -L %s", REF, L) + " -o %s ";
|
String base = String.format("-T DiagnoseTargets --no_cmdline_in_header -R %s -L %s", REF, L) + " -o %s ";
|
||||||
WalkerTestSpec spec = new WalkerTestSpec(base + args, Arrays.asList(md5));
|
WalkerTestSpec spec = new WalkerTestSpec(base + args, Arrays.asList(md5));
|
||||||
|
spec.disableShadowBCF();
|
||||||
executeTest(testName, spec);
|
executeTest(testName, spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(enabled = true)
|
@Test(enabled = true)
|
||||||
public void testSingleSample() {
|
public void testSingleSample() {
|
||||||
DTTest("testSingleSample ", "-I " + singleSample + " -max 75", "2df47009571fe83ead779c94be97fe96");
|
DTTest("testSingleSample ", "-I " + singleSample + " -max 75", "ef71a569a48697c89e642cdda7bfb766");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(enabled = true)
|
@Test(enabled = true)
|
||||||
public void testMultiSample() {
|
public void testMultiSample() {
|
||||||
DTTest("testMultiSample ", "-I " + multiSample, "6f0c070b9671e1d007ce6374c3183014");
|
DTTest("testMultiSample ", "-I " + multiSample, "1e6e15156e01e736274898fdac77d911");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest {
|
||||||
public void testGenotypeFilters1() {
|
public void testGenotypeFilters1() {
|
||||||
WalkerTestSpec spec1 = new WalkerTestSpec(
|
WalkerTestSpec spec1 = new WalkerTestSpec(
|
||||||
baseTestString() + " -G_filter 'GQ == 0.60' -G_filterName foo --variant " + privateTestDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
|
baseTestString() + " -G_filter 'GQ == 0.60' -G_filterName foo --variant " + privateTestDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
|
||||||
Arrays.asList("060e9e7b6faf8b2f7b3291594eb6b39c"));
|
Arrays.asList("c5ed9dd3975b3602293bb484b4fda5f4"));
|
||||||
executeTest("test genotype filter #1", spec1);
|
executeTest("test genotype filter #1", spec1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -88,7 +88,7 @@ public class VariantFiltrationIntegrationTest extends WalkerTest {
|
||||||
public void testGenotypeFilters2() {
|
public void testGenotypeFilters2() {
|
||||||
WalkerTestSpec spec2 = new WalkerTestSpec(
|
WalkerTestSpec spec2 = new WalkerTestSpec(
|
||||||
baseTestString() + " -G_filter 'isHomVar == 1' -G_filterName foo --variant " + privateTestDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
|
baseTestString() + " -G_filter 'isHomVar == 1' -G_filterName foo --variant " + privateTestDir + "vcfexample2.vcf -L 1:10,020,000-10,021,000", 1,
|
||||||
Arrays.asList("00f90028a8c0d56772c47f039816b585"));
|
Arrays.asList("979ccdf484259117aa31305701075602"));
|
||||||
executeTest("test genotype filter #2", spec2);
|
executeTest("test genotype filter #2", spec2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,6 @@ import org.testng.annotations.DataProvider;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class VariantRecalibrationWalkersIntegrationTest extends WalkerTest {
|
public class VariantRecalibrationWalkersIntegrationTest extends WalkerTest {
|
||||||
static HashMap<String, String> clusterFiles = new HashMap<String, String>();
|
|
||||||
static HashMap<String, String> tranchesFiles = new HashMap<String, String>();
|
|
||||||
static HashMap<String, String> inputVCFFiles = new HashMap<String, String>();
|
|
||||||
|
|
||||||
private static class VRTest {
|
private static class VRTest {
|
||||||
String inVCF;
|
String inVCF;
|
||||||
String tranchesMD5;
|
String tranchesMD5;
|
||||||
|
|
@ -77,7 +73,7 @@ public class VariantRecalibrationWalkersIntegrationTest extends WalkerTest {
|
||||||
VRTest indel = new VRTest("combined.phase1.chr20.raw.indels.sites.vcf",
|
VRTest indel = new VRTest("combined.phase1.chr20.raw.indels.sites.vcf",
|
||||||
"da4458d05f6396f5c4ab96f274e5ccdc", // tranches
|
"da4458d05f6396f5c4ab96f274e5ccdc", // tranches
|
||||||
"a04a9001f62eff43d363f4d63769f3ee", // recal file
|
"a04a9001f62eff43d363f4d63769f3ee", // recal file
|
||||||
"05e88052e0798f1c1e83f0a8938bce56"); // cut VCF
|
"b9936d2432d3c85b2d8b5b7aa17d0950"); // cut VCF
|
||||||
|
|
||||||
@DataProvider(name = "VRIndelTest")
|
@DataProvider(name = "VRIndelTest")
|
||||||
public Object[][] createData2() {
|
public Object[][] createData2() {
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public class VCFStreamingIntegrationTest extends WalkerTest {
|
||||||
" --no_cmdline_in_header " +
|
" --no_cmdline_in_header " +
|
||||||
" -o %s",
|
" -o %s",
|
||||||
1,
|
1,
|
||||||
Arrays.asList("2cdcd9e140eb1b6da7e365e37dd7d859")
|
Arrays.asList("283f434b3efbebb8e10ed6347f97d104")
|
||||||
);
|
);
|
||||||
|
|
||||||
executeTest("testSimpleVCFStreaming", spec);
|
executeTest("testSimpleVCFStreaming", spec);
|
||||||
|
|
|
||||||
|
|
@ -480,7 +480,8 @@ public class BCF2EncoderDecoderUnitTest extends BaseTest {
|
||||||
final byte typeDescriptor = decoder.readTypeDescriptor();
|
final byte typeDescriptor = decoder.readTypeDescriptor();
|
||||||
|
|
||||||
// read the int[] with the low-level version
|
// read the int[] with the low-level version
|
||||||
final int[] decoded = decoder.decodeIntArray(typeDescriptor);
|
final int size = decoder.decodeNumberOfElements(typeDescriptor);
|
||||||
|
final int[] decoded = decoder.decodeIntArray(typeDescriptor, size);
|
||||||
|
|
||||||
if ( isMissing(ints) ) {
|
if ( isMissing(ints) ) {
|
||||||
// we expect that the result is null in this case
|
// we expect that the result is null in this case
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ public class VCFIntegrationTest extends WalkerTest {
|
||||||
String baseCommand = "-R " + b37KGReference + " --no_cmdline_in_header -o %s ";
|
String baseCommand = "-R " + b37KGReference + " --no_cmdline_in_header -o %s ";
|
||||||
|
|
||||||
String test1 = baseCommand + "-T SelectVariants -V " + testVCF;
|
String test1 = baseCommand + "-T SelectVariants -V " + testVCF;
|
||||||
WalkerTestSpec spec1 = new WalkerTestSpec(test1, 1, Arrays.asList("355b029487c3b4c499140d71310ca37e"));
|
WalkerTestSpec spec1 = new WalkerTestSpec(test1, 1, Arrays.asList("13329ba7360a8beb3afc02569e5a20c4"));
|
||||||
executeTest("Test reading and writing breakpoint VCF", spec1);
|
executeTest("Test reading and writing breakpoint VCF", spec1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,18 +56,23 @@ public class VariantContextTestProvider {
|
||||||
final private static boolean ENABLE_VARARRAY_TESTS = true;
|
final private static boolean ENABLE_VARARRAY_TESTS = true;
|
||||||
final private static boolean ENABLE_PLOIDY_TESTS = true;
|
final private static boolean ENABLE_PLOIDY_TESTS = true;
|
||||||
final private static boolean ENABLE_PL_TESTS = true;
|
final private static boolean ENABLE_PL_TESTS = true;
|
||||||
|
final private static boolean ENABLE_SYMBOLIC_ALLELE_TESTS = false;
|
||||||
final private static boolean ENABLE_SOURCE_VCF_TESTS = true;
|
final private static boolean ENABLE_SOURCE_VCF_TESTS = true;
|
||||||
final private static boolean ENABLE_VARIABLE_LENGTH_GENOTYPE_STRING_TESTS = true;
|
final private static boolean ENABLE_VARIABLE_LENGTH_GENOTYPE_STRING_TESTS = true;
|
||||||
|
final private static List<Integer> TWENTY_INTS = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20);
|
||||||
|
|
||||||
private static VCFHeader syntheticHeader;
|
private static VCFHeader syntheticHeader;
|
||||||
final static List<VariantContextTestData> TEST_DATAs = new ArrayList<VariantContextTestData>();
|
final static List<VariantContextTestData> TEST_DATAs = new ArrayList<VariantContextTestData>();
|
||||||
private static VariantContext ROOT;
|
private static VariantContext ROOT;
|
||||||
|
|
||||||
private final static List<File> testSourceVCFs = Arrays.asList(
|
private final static List<File> testSourceVCFs = new ArrayList<File>();
|
||||||
new File(BaseTest.privateTestDir + "ILLUMINA.wex.broad_phase2_baseline.20111114.both.exome.genotypes.1000.vcf"),
|
static {
|
||||||
new File(BaseTest.privateTestDir + "ex2.vcf"),
|
testSourceVCFs.add(new File(BaseTest.privateTestDir + "ILLUMINA.wex.broad_phase2_baseline.20111114.both.exome.genotypes.1000.vcf"));
|
||||||
new File(BaseTest.privateTestDir + "dbsnp_135.b37.1000.vcf")
|
testSourceVCFs.add(new File(BaseTest.privateTestDir + "ex2.vcf"));
|
||||||
);
|
testSourceVCFs.add(new File(BaseTest.privateTestDir + "dbsnp_135.b37.1000.vcf"));
|
||||||
|
if ( ENABLE_SYMBOLIC_ALLELE_TESTS )
|
||||||
|
testSourceVCFs.add(new File(BaseTest.privateTestDir + "diagnosis_targets_testfile.vcf"));
|
||||||
|
}
|
||||||
|
|
||||||
public abstract static class VariantContextIOTest {
|
public abstract static class VariantContextIOTest {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
@ -245,7 +250,7 @@ public class VariantContextTestProvider {
|
||||||
add(builder().attribute("INT3", Arrays.asList(1000, 2000, 3000)));
|
add(builder().attribute("INT3", Arrays.asList(1000, 2000, 3000)));
|
||||||
add(builder().attribute("INT3", Arrays.asList(100000, 200000, 300000)));
|
add(builder().attribute("INT3", Arrays.asList(100000, 200000, 300000)));
|
||||||
add(builder().attribute("INT3", null));
|
add(builder().attribute("INT3", null));
|
||||||
add(builder().attribute("INT20", Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)));
|
add(builder().attribute("INT20", TWENTY_INTS));
|
||||||
|
|
||||||
add(builder().attribute("FLOAT1", 1.0));
|
add(builder().attribute("FLOAT1", 1.0));
|
||||||
add(builder().attribute("FLOAT1", 100.0));
|
add(builder().attribute("FLOAT1", 100.0));
|
||||||
|
|
@ -449,6 +454,11 @@ public class VariantContextTestProvider {
|
||||||
attr("g1", ref, "INT3", 1, 2, 3),
|
attr("g1", ref, "INT3", 1, 2, 3),
|
||||||
attr("g2", ref, "INT3"));
|
attr("g2", ref, "INT3"));
|
||||||
|
|
||||||
|
addGenotypeTests(site,
|
||||||
|
attr("g1", ref, "INT20", TWENTY_INTS),
|
||||||
|
attr("g2", ref, "INT20", TWENTY_INTS));
|
||||||
|
|
||||||
|
|
||||||
if (ENABLE_VARARRAY_TESTS) {
|
if (ENABLE_VARARRAY_TESTS) {
|
||||||
addGenotypeTests(site,
|
addGenotypeTests(site,
|
||||||
attr("g1", ref, "INT.VAR", 1, 2, 3),
|
attr("g1", ref, "INT.VAR", 1, 2, 3),
|
||||||
|
|
@ -693,20 +703,23 @@ public class VariantContextTestProvider {
|
||||||
* @param expected
|
* @param expected
|
||||||
*/
|
*/
|
||||||
public static void assertEquals( final VariantContext actual, final VariantContext expected ) {
|
public static void assertEquals( final VariantContext actual, final VariantContext expected ) {
|
||||||
Assert.assertNotNull(actual);
|
Assert.assertNotNull(actual, "VariantContext expected not null");
|
||||||
Assert.assertEquals(actual.getChr(), expected.getChr());
|
Assert.assertEquals(actual.getChr(), expected.getChr(), "chr");
|
||||||
Assert.assertEquals(actual.getStart(), expected.getStart());
|
Assert.assertEquals(actual.getStart(), expected.getStart(), "start");
|
||||||
Assert.assertEquals(actual.getEnd(), expected.getEnd());
|
Assert.assertEquals(actual.getEnd(), expected.getEnd(), "end");
|
||||||
Assert.assertEquals(actual.getID(), expected.getID());
|
Assert.assertEquals(actual.getID(), expected.getID(), "id");
|
||||||
Assert.assertEquals(actual.getAlleles(), expected.getAlleles());
|
Assert.assertEquals(actual.getAlleles(), expected.getAlleles(), "alleles");
|
||||||
|
|
||||||
assertAttributesEquals(actual.getAttributes(), expected.getAttributes());
|
assertAttributesEquals(actual.getAttributes(), expected.getAttributes());
|
||||||
Assert.assertEquals(actual.getFilters(), expected.getFilters());
|
Assert.assertEquals(actual.getFilters(), expected.getFilters(), "filters");
|
||||||
BaseTest.assertEqualsDoubleSmart(actual.getPhredScaledQual(), expected.getPhredScaledQual());
|
BaseTest.assertEqualsDoubleSmart(actual.getPhredScaledQual(), expected.getPhredScaledQual());
|
||||||
|
|
||||||
Assert.assertEquals(actual.hasGenotypes(), expected.hasGenotypes());
|
Assert.assertEquals(actual.hasGenotypes(), expected.hasGenotypes(), "hasGenotypes");
|
||||||
if ( expected.hasGenotypes() ) {
|
if ( expected.hasGenotypes() ) {
|
||||||
Assert.assertEquals(actual.getSampleNames(), expected.getSampleNames());
|
final Set<String> actualSampleSet = new HashSet<String>(actual.getSampleNames());
|
||||||
|
final Set<String> expectedSampleSet = new HashSet<String>(expected.getSampleNames());
|
||||||
|
Assert.assertTrue(actualSampleSet.equals(expectedSampleSet), "sample names"); // note this is necessary due to testng bug for set comps
|
||||||
|
Assert.assertEquals(actual.getSampleNamesOrderedByName(), expected.getSampleNamesOrderedByName(), "sample names");
|
||||||
final Set<String> samples = expected.getSampleNames();
|
final Set<String> samples = expected.getSampleNames();
|
||||||
for ( final String sample : samples ) {
|
for ( final String sample : samples ) {
|
||||||
assertEquals(actual.getGenotype(sample), expected.getGenotype(sample));
|
assertEquals(actual.getGenotype(sample), expected.getGenotype(sample));
|
||||||
|
|
@ -715,33 +728,33 @@ public class VariantContextTestProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void assertEquals(final Genotype actual, final Genotype expected) {
|
public static void assertEquals(final Genotype actual, final Genotype expected) {
|
||||||
Assert.assertEquals(actual.getSampleName(), expected.getSampleName());
|
Assert.assertEquals(actual.getSampleName(), expected.getSampleName(), "Genotype names");
|
||||||
Assert.assertEquals(actual.getAlleles(), expected.getAlleles());
|
Assert.assertEquals(actual.getAlleles(), expected.getAlleles(), "Genotype alleles");
|
||||||
Assert.assertEquals(actual.getGenotypeString(), expected.getGenotypeString());
|
Assert.assertEquals(actual.getGenotypeString(), expected.getGenotypeString(), "Genotype string");
|
||||||
Assert.assertEquals(actual.getType(), expected.getType());
|
Assert.assertEquals(actual.getType(), expected.getType(), "Genotype type");
|
||||||
|
|
||||||
// filters are the same
|
// filters are the same
|
||||||
Assert.assertEquals(actual.getFilters(), expected.getFilters());
|
Assert.assertEquals(actual.getFilters(), expected.getFilters(), "Genotype fields");
|
||||||
Assert.assertEquals(actual.isFiltered(), expected.isFiltered());
|
Assert.assertEquals(actual.isFiltered(), expected.isFiltered(), "Genotype isFiltered");
|
||||||
|
|
||||||
// inline attributes
|
// inline attributes
|
||||||
Assert.assertEquals(actual.getDP(), expected.getDP());
|
Assert.assertEquals(actual.getDP(), expected.getDP(), "Genotype dp");
|
||||||
Assert.assertEquals(actual.getAD(), expected.getAD());
|
Assert.assertEquals(actual.getAD(), expected.getAD(), "Genotype ad");
|
||||||
Assert.assertEquals(actual.getGQ(), expected.getGQ());
|
Assert.assertEquals(actual.getGQ(), expected.getGQ(), "Genotype gq");
|
||||||
Assert.assertEquals(actual.hasPL(), expected.hasPL());
|
Assert.assertEquals(actual.hasPL(), expected.hasPL(), "Genotype hasPL");
|
||||||
Assert.assertEquals(actual.hasAD(), expected.hasAD());
|
Assert.assertEquals(actual.hasAD(), expected.hasAD(), "Genotype hasAD");
|
||||||
Assert.assertEquals(actual.hasGQ(), expected.hasGQ());
|
Assert.assertEquals(actual.hasGQ(), expected.hasGQ(), "Genotype hasGQ");
|
||||||
Assert.assertEquals(actual.hasDP(), expected.hasDP());
|
Assert.assertEquals(actual.hasDP(), expected.hasDP(), "Genotype hasDP");
|
||||||
|
|
||||||
Assert.assertEquals(actual.hasLikelihoods(), expected.hasLikelihoods());
|
Assert.assertEquals(actual.hasLikelihoods(), expected.hasLikelihoods(), "Genotype haslikelihoods");
|
||||||
Assert.assertEquals(actual.getLikelihoodsString(), expected.getLikelihoodsString());
|
Assert.assertEquals(actual.getLikelihoodsString(), expected.getLikelihoodsString(), "Genotype getlikelihoodsString");
|
||||||
Assert.assertEquals(actual.getLikelihoods(), expected.getLikelihoods());
|
Assert.assertEquals(actual.getLikelihoods(), expected.getLikelihoods(), "Genotype getLikelihoods");
|
||||||
Assert.assertEquals(actual.getPL(), expected.getPL());
|
Assert.assertEquals(actual.getPL(), expected.getPL(), "Genotype getPL");
|
||||||
|
|
||||||
Assert.assertEquals(actual.getPhredScaledQual(), expected.getPhredScaledQual());
|
Assert.assertEquals(actual.getPhredScaledQual(), expected.getPhredScaledQual(), "Genotype phredScaledQual");
|
||||||
assertAttributesEquals(actual.getExtendedAttributes(), expected.getExtendedAttributes());
|
assertAttributesEquals(actual.getExtendedAttributes(), expected.getExtendedAttributes());
|
||||||
Assert.assertEquals(actual.isPhased(), expected.isPhased());
|
Assert.assertEquals(actual.isPhased(), expected.isPhased(), "Genotype isPhased");
|
||||||
Assert.assertEquals(actual.getPloidy(), expected.getPloidy());
|
Assert.assertEquals(actual.getPloidy(), expected.getPloidy(), "Genotype getPloidy");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void assertAttributesEquals(final Map<String, Object> actual, Map<String, Object> expected) {
|
private static void assertAttributesEquals(final Map<String, Object> actual, Map<String, Object> expected) {
|
||||||
|
|
@ -753,16 +766,16 @@ public class VariantContextTestProvider {
|
||||||
final Object expectedValue = expected.get(act.getKey());
|
final Object expectedValue = expected.get(act.getKey());
|
||||||
if ( expectedValue instanceof List ) {
|
if ( expectedValue instanceof List ) {
|
||||||
final List<Object> expectedList = (List<Object>)expectedValue;
|
final List<Object> expectedList = (List<Object>)expectedValue;
|
||||||
Assert.assertTrue(actualValue instanceof List);
|
Assert.assertTrue(actualValue instanceof List, act.getKey() + " should be a list but isn't");
|
||||||
final List<Object> actualList = (List<Object>)actualValue;
|
final List<Object> actualList = (List<Object>)actualValue;
|
||||||
Assert.assertEquals(actualList.size(), expectedList.size());
|
Assert.assertEquals(actualList.size(), expectedList.size(), act.getKey() + " size");
|
||||||
for ( int i = 0; i < expectedList.size(); i++ )
|
for ( int i = 0; i < expectedList.size(); i++ )
|
||||||
assertAttributesEquals(actualList.get(i), expectedList.get(i));
|
assertAttributeEquals(act.getKey(), actualList.get(i), expectedList.get(i));
|
||||||
} else
|
} else
|
||||||
assertAttributesEquals(actualValue, expectedValue);
|
assertAttributeEquals(act.getKey(), actualValue, expectedValue);
|
||||||
} else {
|
} else {
|
||||||
// it's ok to have a binding in x -> null that's absent in y
|
// it's ok to have a binding in x -> null that's absent in y
|
||||||
Assert.assertNull(actualValue);
|
Assert.assertNull(actualValue, act.getKey() + " present in one but not in the other");
|
||||||
}
|
}
|
||||||
expectedKeys.remove(act.getKey());
|
expectedKeys.remove(act.getKey());
|
||||||
}
|
}
|
||||||
|
|
@ -771,7 +784,7 @@ public class VariantContextTestProvider {
|
||||||
// and they must all be null
|
// and they must all be null
|
||||||
for ( final String missingExpected : expectedKeys ) {
|
for ( final String missingExpected : expectedKeys ) {
|
||||||
final Object value = expected.get(missingExpected);
|
final Object value = expected.get(missingExpected);
|
||||||
Assert.assertTrue(isMissing(value));
|
Assert.assertTrue(isMissing(value), "Attribute " + missingExpected + " missing in one but not in other" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -788,12 +801,12 @@ public class VariantContextTestProvider {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void assertAttributesEquals(final Object actual, final Object expected) {
|
private static void assertAttributeEquals(final String key, final Object actual, final Object expected) {
|
||||||
if ( expected instanceof Double ) {
|
if ( expected instanceof Double ) {
|
||||||
// must be very tolerant because doubles are being rounded to 2 sig figs
|
// must be very tolerant because doubles are being rounded to 2 sig figs
|
||||||
BaseTest.assertEqualsDoubleSmart(actual, (Double)expected, 1e-2);
|
BaseTest.assertEqualsDoubleSmart(actual, (Double)expected, 1e-2);
|
||||||
} else
|
} else
|
||||||
Assert.assertEquals(actual, expected);
|
Assert.assertEquals(actual, expected, "Attribute " + key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addComplexGenotypesTest() {
|
public static void addComplexGenotypesTest() {
|
||||||
|
|
@ -863,14 +876,14 @@ public class VariantContextTestProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void assertEquals(final VCFHeader actual, final VCFHeader expected) {
|
public static void assertEquals(final VCFHeader actual, final VCFHeader expected) {
|
||||||
Assert.assertEquals(actual.getMetaData().size(), expected.getMetaData().size());
|
Assert.assertEquals(actual.getMetaData().size(), expected.getMetaData().size(), "No VCF header lines");
|
||||||
|
|
||||||
// for some reason set.equals() is returning false but all paired elements are .equals(). Perhaps compare to is busted?
|
// for some reason set.equals() is returning false but all paired elements are .equals(). Perhaps compare to is busted?
|
||||||
//Assert.assertEquals(actual.getMetaData(), expected.getMetaData());
|
//Assert.assertEquals(actual.getMetaData(), expected.getMetaData());
|
||||||
final List<VCFHeaderLine> actualLines = new ArrayList<VCFHeaderLine>(actual.getMetaData());
|
final List<VCFHeaderLine> actualLines = new ArrayList<VCFHeaderLine>(actual.getMetaData());
|
||||||
final List<VCFHeaderLine> expectedLines = new ArrayList<VCFHeaderLine>(expected.getMetaData());
|
final List<VCFHeaderLine> expectedLines = new ArrayList<VCFHeaderLine>(expected.getMetaData());
|
||||||
for ( int i = 0; i < actualLines.size(); i++ ) {
|
for ( int i = 0; i < actualLines.size(); i++ ) {
|
||||||
Assert.assertEquals(actualLines.get(i), expectedLines.get(i));
|
Assert.assertEquals(actualLines.get(i), expectedLines.get(i), "VCF header lines");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue