use of test.beast.beast2vs1.trace.Expectation in project bacter by tgvaughan.
the class AllOperatorTest method testShortMultiLocus.
@Test
public void testShortMultiLocus() throws Exception {
Randomizer.setSeed(1);
XMLParser parser = new XMLParser();
beast.core.Runnable runnable = parser.parseFile(new File("examples/allOperatorTests/allOperatorTestShortSSML.xml"));
disableScreenLog(runnable);
runnable.run();
List<Expectation> expectations = new ArrayList<>();
expectations.add(new Expectation("acg.CFheight", 1.601, 0.2));
expectations.add(new Expectation("acg.CFlength", 4.17, 0.5));
expectations.add(new Expectation("acg.nConv", 39.61, 0.5));
LogAnalyser logAnalyser = new LogAnalyser("allOperatorTestShortSSML.stats", expectations);
for (Expectation expectation : expectations) {
assertTrue(expectation.isValid());
assertTrue(expectation.isPassed());
}
Files.deleteIfExists(Paths.get("allOperatorTestShortSSML.stats"));
Files.deleteIfExists(Paths.get("allOperatorTestShortSSML.converted"));
Files.deleteIfExists(Paths.get("allOperatorTestShortSSML.trees"));
Files.deleteIfExists(Paths.get("allOperatorTestShortSSML.cf"));
Files.deleteIfExists(Paths.get("allOperatorTestShortSSML.xml.state"));
}
use of test.beast.beast2vs1.trace.Expectation in project bacter by tgvaughan.
the class CFOperatorTest method testCFSTX.
@Test
public void testCFSTX() throws Exception {
Randomizer.setSeed(1);
XMLParser parser = new XMLParser();
beast.core.Runnable runnable = parser.parseFile(new File("examples/CFOperatorTests/CFSubtreeExchangeTest5taxon.xml"));
disableScreenLog(runnable);
runnable.run();
List<Expectation> expectations = new ArrayList<>();
expectations.add(new Expectation("acg.CFheight", 1.606, 0.2));
expectations.add(new Expectation("acg.CFlength", 4.181, 0.5));
expectations.add(new Expectation("acg.nConv", 21.0, 0.5));
new LogAnalyser("CFSubtreeExchangeTest5taxon.stats", expectations);
for (Expectation expectation : expectations) {
assertTrue(expectation.isValid());
assertTrue(expectation.isPassed());
}
Files.deleteIfExists(Paths.get("CFSubtreeExchangeTest5taxon.stats"));
Files.deleteIfExists(Paths.get("CFSubtreeExchangeTest5taxon.trees"));
Files.deleteIfExists(Paths.get("CFSubtreeExchangeTest5taxon.xml.state"));
}
use of test.beast.beast2vs1.trace.Expectation in project bacter by tgvaughan.
the class CFOperatorTest method testCFWB.
@Test
public void testCFWB() throws Exception {
Randomizer.setSeed(1);
XMLParser parser = new XMLParser();
beast.core.Runnable runnable = parser.parseFile(new File("examples/CFOperatorTests/CFWilsonBaldingTest5taxon.xml"));
disableScreenLog(runnable);
runnable.run();
List<Expectation> expectations = new ArrayList<>();
expectations.add(new Expectation("acg.CFheight", 1.606, 0.2));
expectations.add(new Expectation("acg.CFlength", 4.181, 0.5));
expectations.add(new Expectation("acg.nConv", 21.0, 0.5));
new LogAnalyser("CFWilsonBaldingTest5taxon.stats", expectations);
for (Expectation expectation : expectations) {
assertTrue(expectation.isValid());
assertTrue(expectation.isPassed());
}
Files.deleteIfExists(Paths.get("CFWilsonBaldingTest5taxon.stats"));
Files.deleteIfExists(Paths.get("CFWilsonBaldingTest5taxon.converted"));
Files.deleteIfExists(Paths.get("CFWilsonBaldingTest5taxon.trees"));
Files.deleteIfExists(Paths.get("CFWilsonBaldingTest5taxon.cf"));
Files.deleteIfExists(Paths.get("CFWilsonBaldingTest5taxon.xml.state"));
}
use of test.beast.beast2vs1.trace.Expectation in project bacter by tgvaughan.
the class CFOperatorTest method testCFSTS.
@Test
public void testCFSTS() throws Exception {
Randomizer.setSeed(1);
XMLParser parser = new XMLParser();
beast.core.Runnable runnable = parser.parseFile(new File("examples/CFOperatorTests/CFSubtreeSlideTest5taxon.xml"));
disableScreenLog(runnable);
runnable.run();
List<Expectation> expectations = new ArrayList<>();
expectations.add(new Expectation("acg.CFheight", 1.606, 0.2));
expectations.add(new Expectation("acg.CFlength", 4.181, 0.5));
expectations.add(new Expectation("acg.nConv", 21.0, 0.5));
new LogAnalyser("CFSubtreeSlideTest5taxon.stats", expectations);
for (Expectation expectation : expectations) {
assertTrue(expectation.isValid());
assertTrue(expectation.isPassed());
}
Files.deleteIfExists(Paths.get("CFSubtreeSlideTest5taxon.stats"));
Files.deleteIfExists(Paths.get("CFSubtreeSlideTest5taxon.trees"));
Files.deleteIfExists(Paths.get("CFSubtreeSlideTest5taxon.xml.state"));
}
use of test.beast.beast2vs1.trace.Expectation in project bacter by tgvaughan.
the class MergeSplitTest method test.
@Test
public void test() throws Exception {
Randomizer.setSeed(1);
XMLParser parser = new XMLParser();
beast.core.Runnable runnable = parser.parseFile(new File("examples/mergeSplitTests/mergeSplitTest5taxon.xml"));
disableScreenLog(runnable);
runnable.run();
List<Expectation> expectations = new ArrayList<>();
expectations.add(new Expectation("acg.CFheight", 1.606, 0.2));
expectations.add(new Expectation("acg.CFlength", 4.181, 0.5));
expectations.add(new Expectation("acg.nConv", 21.0, 0.5));
LogAnalyser logAnalyser = new LogAnalyser("mergeSplitTest5taxon.stats", expectations);
for (Expectation expectation : expectations) {
assertTrue(expectation.isValid());
assertTrue(expectation.isPassed());
}
Files.deleteIfExists(Paths.get("mergeSplitTest5taxon.stats"));
Files.deleteIfExists(Paths.get("mergeSplitTest5taxon.converted"));
Files.deleteIfExists(Paths.get("mergeSplitTest5taxon.trees"));
Files.deleteIfExists(Paths.get("mergeSplitTest5taxon.cf"));
Files.deleteIfExists(Paths.get("mergeSplitTest5taxon.xml.state"));
}
Aggregations