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

How to use Beagle #61

Open
richelbilderbeek opened this issue Sep 21, 2021 · 2 comments
Open

How to use Beagle #61

richelbilderbeek opened this issue Sep 21, 2021 · 2 comments
Labels
volunteer needed Need a volunteer to confirm

Comments

@richelbilderbeek
Copy link
Member

An email from Clarke van Steenderen:

I am implementing your beastier package in some R workflows, and wanted to find out how to incorporate Beagle into a BEAST analysis? Is this feature functional in the use_beagle() function? Do I just need to include the Beagle download from here into the same directory?

@richelbilderbeek
Copy link
Member Author

richelbilderbeek commented Sep 21, 2021

Hi Clarke,

Thanks you for reaching out!

... wanted to find out how to incorporate Beagle into a BEAST analysis?

The short answer is: I have no idea, as I have never used Beagle myself.

Is this feature functional in the use_beagle() function?

There is no use_beagle() function, I assume you mean the use_beagle function argument, as e.g. used in create_beast2_options. It should definitely be set to TRUE, as it adds a flag to the call to BEAST2. When calling BEAST2, it should find it somehow, yet this is beyond the scope of beastier.

Do I just need to include the Beagle download from here into the same directory?

I have no idea how BEAST2 finds Beagle, as I have never used it myself.

Clarke, if you find out how this works, I'd be happy to accept some Pull Requests with documentation. If you want, we can have an online chat! If beastier is missing something, I'd be happy to add it from a reprex, yet AFAICS, beastier 'simply' implements all BEAST2 flags :-)

Already, thanks for the question, so others can find it!

@richelbilderbeek richelbilderbeek added the volunteer needed Need a volunteer to confirm label Jun 1, 2022
@richelbilderbeek
Copy link
Member Author

This is a test I removed, I'd be happy to put it back when someone wants to test this

test_that("Issue https://github.com/ropensci/beastier/issues/61", {
  skip("#61")
  beast2_xml_filename <- get_beastier_tempfilename(fileext = ".xml")
  expect_error(
    beautier::create_beast2_input_file(
      input_filename = beautier::get_fasta_filename(),
      output_filename = beast2_xml_filename,
      site_model = beautier::create_gtr_site_model(
        gamma_site_model = beautier::create_gamma_site_model()
      ),
      mcmc = beautier::create_mcmc(
        chain_length = 9e+07,
        store_every = -1,
        pre_burnin = 0,
        n_init_attempts = 10,
        sample_from_prior = FALSE,
        tracelog = beautier::create_tracelog(
          filename = "Step 4.2 COI BEAST output.log", log_every = 9000
        ),
        screenlog = beautier::create_screenlog(log_every = 9000),
        treelog = beautier::create_treelog(
          filename = "Step 4.2 COI BEAST output.trees",
          log_every = 9000
        )
      ),
      beauti_options = beautier::create_beauti_options_v2_6()
    )
  )
  expect_error(
    beautier::create_beast2_input_file(
      input_filename = beautier::get_fasta_filename(),
      output_filename = beast2_xml_filename,
      site_model = beautier::create_gtr_site_model(
        gamma_site_model = beautier::create_gamma_site_model()
      ),
      mcmc = beautier::create_mcmc(
        chain_length = 9e+07,
        store_every = -1,
        pre_burnin = 0,
        n_init_attempts = 10,
        sample_from_prior = FALSE,
        tracelog = beautier::create_tracelog(filename = "trace.log", log_every = 9000),
        screenlog = beautier::create_screenlog(log_every = 9000),
        treelog = beautier::create_treelog(filename = "my.trees", log_every = 9000)),
      beauti_options = beautier::create_beauti_options_v2_6()
    )
  )
  beastier::run_beast2(input_filename = beast2_xml_filename)
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
volunteer needed Need a volunteer to confirm
Projects
None yet
Development

No branches or pull requests

1 participant