Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save BEAST2 posterior trees as readable by tracerer #100

Closed
richelbilderbeek opened this issue Nov 15, 2018 · 0 comments
Closed

Save BEAST2 posterior trees as readable by tracerer #100

richelbilderbeek opened this issue Nov 15, 2018 · 0 comments

Comments

@richelbilderbeek
Copy link
Owner

richelbilderbeek commented Nov 15, 2018

Currently, the BEAST2 posterior is saved in a way that is incompatible with tracerer.
To use the functionality of tracerer, this is desired.

I've labeled two tests with:

# TODO: Issue 100, #100

Sneak preview of one of these:

test_that("use", {

  # Create input files
  parameters_filename <- raz_create_tempfile("parameters.csv") # nolint internal function
  mbd_alignment_filename <- raz_create_tempfile("mbd.fasta") # nolint internal function

  # Run
  mbd_posterior_filenames <- raz_create_mbd_posterior_files( # nolint internal function
    parameters_filename = parameters_filename
  )

  # Check
  # All files exist
  expect_true(all(file.exists(mbd_posterior_filenames)))

  # MBD treees
  mbd_trees_filename <- grep(
    pattern = "mbd\\.trees$",
    mbd_posterior_filenames, perl = TRUE, value = TRUE
  )
  expect_true(length(mbd_trees_filename) > 0)

  # TODO: Issue 100, #100
  # tracerer must be able to read the posterior trees
  if (1 == 2) {
    # Current error: Error in value[[3L]](cond) : invalid file
    expect_silent(
      tracerer::parse_beast_trees(mbd_trees_filename)
    )
  }
  # ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant