Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausVigo committed Aug 26, 2024
1 parent 5d73e73 commit 7fa4870
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inst/tinytest/test_ancestral.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ test_acctran <- ancestral.pars(tree, dna, "ACCTRAN")


data(Laurasiatherian)
fit <- pml_bb(Laurasiatherian[,1:100], "JC", rearrangement = "none")
fit <- pml_bb(Laurasiatherian[,1:100], "JC", rearrangement = "none",
control=pml.control(trace=0))
anc_ml <- ancestral.pml(fit)
write.ancestral(anc_ml)
align <- read.phyDat("ancestral_align.fasta")
tree <- read.tree("ancestral_tree.nwk")
df <- read.table("ancestral.state", header=TRUE)
anc_ml_disc <- ancestral(tree, align, df)
expect_equal(anc_ml[[1]], anc_ml_disc[[1]])
expect_equal(anc_ml[[2]], anc_ml_disc[[2]])
expect_equal(anc_ml[[2]][tree$tip.label], anc_ml_disc[[2]])
expect_equal(anc_ml[[3]], anc_ml_disc[[3]])
expect_equal(anc_ml[[4]], anc_ml_disc[[4]])
unlink(c("ancestral_align.fasta", "ancestral_tree.nwk", "ancestral.state"))
Expand Down

0 comments on commit 7fa4870

Please sign in to comment.