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

Prevent BEAST2 freeze when overwriting a log file with overwrite set to false #50

Open
richelbilderbeek opened this issue Oct 27, 2019 · 0 comments

Comments

@richelbilderbeek
Copy link
Member

richelbilderbeek commented Oct 27, 2019

test_that("BEAST2 freezes when treelog file already exists", {

  skip("Issue 50, Issue #50")

  if (!is_beast2_installed()) return()

  beast2_xml_filename <- tempfile(
    pattern = "beast2_", tmpdir = rappdirs::user_cache_dir(),
    fileext = ".xml"
  )

  beautier::create_beast2_input_file_from_model(
    input_filename = beautier::get_fasta_filename(),
    output_filename = beast2_xml_filename,
    inference_model = beautier::create_test_inference_model(
      mcmc = beautier::create_test_mcmc(
        screenlog = beautier::create_screenlog(filename = "")
      )
    )
  )
  testit::assert(file.exists(beast2_xml_filename))

  # First run works fine, takes approx 1 sec on my computer
  beastier::run_beast2_from_options(
    beastier::create_beast2_options(
      input_filename = beast2_xml_filename,
      overwrite = FALSE,
      verbose = TRUE
    )
  )

  # Second run causes BEAST2 to freeze
  beastier::run_beast2_from_options(
    beastier::create_beast2_options(
      input_filename = beast2_xml_filename,
      overwrite = FALSE,
      verbose = TRUE
    )
  )

})
richelbilderbeek pushed a commit that referenced this issue Oct 27, 2019
richelbilderbeek pushed a commit that referenced this issue Oct 27, 2019
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