Skip to content

Commit

Permalink
Check multifurcating trees
Browse files Browse the repository at this point in the history
  • Loading branch information
ms609 committed Feb 17, 2025
1 parent a6ad8f8 commit ad2079d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/testthat/test-Concordance.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ test_that("QuartetConcordance(method = minhq)", {
expect_concordance(iq = "iq", 9, c(0, 0, 1 / 12, 0, 0))
expect_equal(unname(QuartetConcordance(tree, dat, method = "iqtree")),
c(56.7, 0, 85.4, 0, 62.5) / 100, tolerance = 0.01)

collapsed <- CollapseNode(tree, c(12, 13))
expect_equal(
QuartetConcordance(collapsed, dat, method = "iqtree"),
QuartetConcordance(tree, dat, method = "iqtree")[-c(2, 3)]
)
})

test_that("QuartetConcordance(method = minh)", {
Expand Down Expand Up @@ -114,6 +120,11 @@ test_that("QuartetConcordance(method = minh)", {
unname(QuartetConcordance(tree, dat, method = "minh", n = 1234)),
c(56.7, 0, 85.4, 0, 62.5) / 100)

collapsed <- CollapseNode(tree, c(12, 13))
expect_equal(tolerance = 0.05,
QuartetConcordance(collapsed, dat, method = "minh", n = 1234),
QuartetConcordance(tree, dat, method = "minh", n = 1234)[-(2:3)]
)
})

test_that("QuartetConcordance() calculates correct values - weighting", {
Expand Down

0 comments on commit ad2079d

Please sign in to comment.