Skip to content

Commit

Permalink
Progress #99
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Dec 26, 2023
1 parent 1eb6293 commit 85928d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/rln_clock_model_to_xml_operators.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ rln_clock_model_to_xml_operators <- function( # nolint indeed a long internal fu
"parameter=\"@rateCategories.c:", id, "\" weight=\"10.0\"/>"
)
)
if (has_mrca_prior_with_distr(inference_model)) {
if (has_mrca_prior_with_distr(inference_model) || has_tip_dating(inference_model)) {
text <- c(
text,
paste0(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
################################################################################

test_that("RLN + tipdates, v2.6", {
skip("https://github.com/ropensci/babette/issues/99")
## https://github.com/ropensci/babette/issues/99"
inference_model <- create_inference_model(
tree_prior = create_yule_tree_prior(
birth_rate_distr = create_uniform_distr(id = 1)
Expand All @@ -20,7 +20,6 @@ test_that("RLN + tipdates, v2.6", {
tipdates_filename = get_beautier_path("test_output_0_tipdates.tsv"),
beauti_options = create_beauti_options_v2_6(
namespace = "beast.core:beast.evolution.alignment:beast.evolution.tree.coalescent:beast.core.util:beast.evolution.nuc:beast.evolution.operators:beast.evolution.sitemodel:beast.evolution.substitutionmodel:beast.evolution.likelihood"

)
)
created <- create_beast2_input_from_model(
Expand All @@ -37,6 +36,12 @@ test_that("RLN + tipdates, v2.6", {
expected_line <- r"(<Uniform id="Uniform.3" name="distr" upper="Infinity"/>)"
testthat::expect_equal(1, sum(stringr::str_detect(expected, expected_line)))
testthat::expect_equal(1, sum(stringr::str_detect(created, expected_line)))
expected_line <- r"(<operator id="ucldMeanScaler.c:test_output_0" spec="ScaleOperator" parameter="@ucldMean.c:test_output_0" scaleFactor="0.5" weight="1.0"/>)"
testthat::expect_equal(1, sum(stringr::str_detect(expected, expected_line)))
testthat::expect_equal(1, sum(stringr::str_detect(created, expected_line)))
expected_line <- r"(<operator id="relaxedUpDownOperator.c:test_output_0" spec="UpDownOperator" scaleFactor="0.75" weight="3.0">)"
testthat::expect_equal(1, sum(stringr::str_detect(expected, expected_line)))
testthat::expect_equal(1, sum(stringr::str_detect(created, expected_line)))

if (1 == 2) {
compare_lines(
Expand Down

0 comments on commit 85928d6

Please sign in to comment.