use of test.beast.beast2vs1.trace.LogAnalyser in project bacter by tgvaughan.
the class SimulatedACGTest method test5TaxonSerialSampling.
@Test
public void test5TaxonSerialSampling() throws Exception {
Randomizer.setSeed(1);
XMLParser parser = new XMLParser();
beast.core.Runnable runnable = parser.parseFile(new File("examples/ACGsimulations/simulateACGs5taxonSerialSampling.xml"));
runnable.run();
List<Expectation> expectations = new ArrayList<>();
expectations.add(new Expectation("acg.CFheight", 1.909, 1e-2));
expectations.add(new Expectation("acg.CFlength", 4.655, 1e-2));
expectations.add(new Expectation("acg.nConv", 23.381, 5e-2));
LogAnalyser logAnalyser = new LogAnalyser("simulateACGs5taxonSerialSampling.stats", expectations);
for (int i = 0; i < expectations.size(); i++) {
assertTrue(expectations.get(i).isValid());
assertTrue(expectations.get(i).isPassed());
}
Files.deleteIfExists(Paths.get("simulateACGs5taxonSerialSampling.stats"));
Files.deleteIfExists(Paths.get("simulateACGs5taxonSerialSampling.converted"));
Files.deleteIfExists(Paths.get("simulateACGs5taxonSerialSampling.trees"));
}
use of test.beast.beast2vs1.trace.LogAnalyser in project bacter by tgvaughan.
the class SimulatedACGTest method test5TaxonMultiLocus.
@Test
public void test5TaxonMultiLocus() throws Exception {
Randomizer.setSeed(1);
XMLParser parser = new XMLParser();
beast.core.Runnable runnable = parser.parseFile(new File("examples/ACGsimulations/simulateACGs5taxonMultiLocus.xml"));
runnable.run();
List<Expectation> expectations = new ArrayList<>();
expectations.add(new Expectation("acg.CFheight", 1.917, 1e-2));
expectations.add(new Expectation("acg.CFlength", 4.672, 1e-2));
expectations.add(new Expectation("acg.nConv", 23.614, 5e-2));
LogAnalyser logAnalyser = new LogAnalyser("simulateACGs5taxonMultiLocus.stats", expectations);
for (int i = 0; i < expectations.size(); i++) {
assertTrue(expectations.get(i).isValid());
assertTrue(expectations.get(i).isPassed());
}
Files.deleteIfExists(Paths.get("simulateACGs5taxonMultiLocus.stats"));
Files.deleteIfExists(Paths.get("simulateACGs5taxonMultiLocus.converted"));
Files.deleteIfExists(Paths.get("simulateACGs5taxonMultiLocus.trees"));
}
use of test.beast.beast2vs1.trace.LogAnalyser in project bacter by tgvaughan.
the class SimulatedACGTest method test2Taxon.
@Test
public void test2Taxon() throws Exception {
Randomizer.setSeed(1);
XMLParser parser = new XMLParser();
beast.core.Runnable runnable = parser.parseFile(new File("examples/ACGsimulations/simulateACGs2taxon.xml"));
runnable.run();
List<Expectation> expectations = new ArrayList<>();
expectations.add(new Expectation("acg.CFheight", 1.0, 1e-2));
expectations.add(new Expectation("acg.CFlength", 2.0, 1e-2));
expectations.add(new Expectation("acg.nConv", 10.0, 5e-2));
LogAnalyser logAnalyser = new LogAnalyser("simulateACGs2taxon.stats", expectations);
for (int i = 0; i < expectations.size(); i++) {
assertTrue(expectations.get(i).isValid());
assertTrue(expectations.get(i).isPassed());
}
Files.deleteIfExists(Paths.get("simulateACGs2taxon.stats"));
Files.deleteIfExists(Paths.get("simulateACGs2taxon.converted"));
Files.deleteIfExists(Paths.get("simulateACGs2taxon.trees"));
}
use of test.beast.beast2vs1.trace.LogAnalyser in project bacter by tgvaughan.
the class SimulatedACGTest method test5TaxonDynamicPopSize.
@Test
public void test5TaxonDynamicPopSize() throws Exception {
Randomizer.setSeed(1);
XMLParser parser = new XMLParser();
beast.core.Runnable runnable = parser.parseFile(new File("examples/ACGsimulations/simulateACGs5taxonDynamicPopSize.xml"));
runnable.run();
List<Expectation> expectations = new ArrayList<>();
expectations.add(new Expectation("acg.CFheight", 8.840, 1e-2));
expectations.add(new Expectation("acg.CFlength", 25.312, 1e-2));
expectations.add(new Expectation("acg.nConv", 25.464, 5e-2));
LogAnalyser logAnalyser = new LogAnalyser("simulateACGs5taxonDynamicPopSize.stats", expectations);
for (int i = 0; i < expectations.size(); i++) {
assertTrue(expectations.get(i).isValid());
assertTrue(expectations.get(i).isPassed());
}
Files.deleteIfExists(Paths.get("simulateACGs5taxonDynamicPopSize.stats"));
Files.deleteIfExists(Paths.get("simulateACGs5taxonDynamicPopSize.converted"));
Files.deleteIfExists(Paths.get("simulateACGs5taxonDynamicPopSize.trees"));
}
use of test.beast.beast2vs1.trace.LogAnalyser in project bacter by tgvaughan.
the class AddRemoveRedundantTest method test5Taxon.
@Test
public void test5Taxon() throws Exception {
Randomizer.setSeed(1);
XMLParser parser = new XMLParser();
beast.core.Runnable runnable = parser.parseFile(new File("examples/addRemoveTests/addRemoveRedundantTest5taxon.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("addRemoveRedundantTest5taxon.stats", expectations);
for (int i = 0; i < expectations.size(); i++) {
assertTrue(expectations.get(i).isValid());
assertTrue(expectations.get(i).isPassed());
}
Files.deleteIfExists(Paths.get("addRemoveRedundantTest5taxon.stats"));
Files.deleteIfExists(Paths.get("addRemoveRedundantTest5taxon.converted"));
Files.deleteIfExists(Paths.get("addRemoveRedundantTest5taxon.trees"));
Files.deleteIfExists(Paths.get("addRemoveRedundantTest5taxon.cf"));
Files.deleteIfExists(Paths.get("addRemoveRedundantTest5taxon.xml.state"));
}
Aggregations