richelbilderbeek / razzo

Research project by Giovanni Laudanno and Richel J.C. Bilderbeek
GNU General Public License v3.0
2 stars 2 forks source link

Figure 1 uses the 4 pretty colors #254

Closed richelbilderbeek closed 5 years ago

richelbilderbeek commented 5 years ago

Currently, razzo figure 1 does not show it is showing the errors of the candidate models:

20190828_fig_1

Additionally, I think the 4 colors are very pretty and I hope these are put in the figure:

errors

I suggest to make figure 1 use the 4 pretty colors.

richelbilderbeek commented 5 years ago

Within create_fig_1 I removed the inference models' names:

richelbilderbeek commented 5 years ago

To be ultimately clear, a sloppy sketch:

issue_12345

Giappo commented 5 years ago

Since I cannot work with candidate models I am trying to use the data coming from here:

`zip_filename <- file.path(tempdir(), "razzo_project.zip") curl::curl_download( url = "http://richelbilderbeek.nl/razzo_project_20190801.zip", destfile = zip_filename, quiet = FALSE # This download will take some time )

project_folder_name <- file.path(dirname(zip_filename), "razzo_project") dir.create(project_folder_name, recursive = TRUE)

utils::unzip(zipfile = zip_filename, exdir = project_folder_name)`

The problem is that when I call plot <- create_fig_1(project_folder_name = project_folder_name)

I get this error:

Error in value[[3L]](cond) : 'experiments' must be one experiment or a list of one or more experiments. Tip: use a list of 'create_experiment'. Error message: 'experiments[[1]] invalid. Tip: use 'create_experiment' for each list element. Error: 'beast2_options' must be valid BEAST2 options. Tip: use 'beastier::create_beast2_options'. Error: lazy-load database 'C:/Program Files/R/R-3.6.0/library/beastier/R/beastier.rdb' is corrupt Value: /home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.xml/home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.log/home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.trees/home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.xml.state1NAFALSETRUE/home/p230198/.cache/file13dbc2fca9df2/home/p230198/.local/share/beast/lib/launcher.jarFALSE Value: list(model_type = "generative", run_if = "always", do_measure_evidence = TRUE)list(site_model = list(name = "JC69", id = NA, gamma_site_model = list(gamma_cat_count = "0", gamma_shape = "1.0", In addition: Warning messages: 1: In get0(oNam, envir = ns) : restarting interrupted promise evaluation 2: In get0(oNam, envir = ns) : Error in value[[3L]](cond) : 'experiments' must be one experiment or a list of one or more experiments. Tip: use a list of 'create_experiment'. Error message: 'experiments[[1]] invalid. Tip: use 'create_experiment' for each list element. Error: 'beast2_options' must be valid BEAST2 options. Tip: use 'beastier::create_beast2_options'. Error: lazy-load database 'C:/Program Files/R/R-3.6.0/library/beastier/R/beastier.rdb' is corrupt Value: /home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.xml/home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.log/home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.trees/home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.xml.state1NAFALSETRUE/home/p230198/.cache/file13dbc2fca9df2/home/p230198/.local/share/beast/lib/launcher.jarFALSE Value: list(model_type = "generative", run_if = "always", do_measure_evidence = TRUE)list(site_model = list(name = "JC69", id = NA, gamma_site_model = list(gamma_cat_count = "0", gamma_shape = "1.0",

This can be ultimately traced back to this

razzo_params <- readRDS(parameters_filename)
check_experiments(razzo_params$pir_params$experiments)

or, more precisely, to

i <- 1 # or whatever
check_experiment(razzo_params$pir_params$experiments[[i]])

which gives

Error in value[[3L]](cond) : 'experiments[[1]] invalid.
Tip: use 'create_experiment' for each list element.
Error: 'beast2_options' must be valid BEAST2 options.
Tip: use 'beastier::create_beast2_options'.
Error: lazy-load database 'C:/Program Files/R/R-3.6.0/library/beastier/R/beastier.rdb' is corrupt
Value: /home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.xml/home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.log/home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.trees/home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.xml.state1NAFALSETRUE/home/p230198/.cache/file13dbc2fca9df2/home/p230198/.local/share/beast/lib/launcher.jarFALSE
Value: list(model_type = "generative", run_if = "always", do_measure_evidence = TRUE)list(site_model = list(name = "JC69", id = NA, gamma_site_model = list(gamma_cat_count = "0", gamma_shape = "1.0", prop_invariant = "0.0", gamma_shape_prior_distr = NA)), clock_model = list(name = "strict", id = NA, clock_rate_param = list(name =
In addition: Warning messages:
1: In get0(oNam, envir = ns) : restarting interrupted promise evaluation
2: In get0(oNam, envir = ns) : internal error -3 in R_decompress1

I think we've seen already something like this. Do you know how to get rid of this?

Giappo commented 5 years ago

Actually it goes down to this:

beastier::check_beast2_options(experiment$beast2_options) Error in get0(oNam, envir = ns) : lazy-load database 'C:/Program Files/R/R-3.6.0/library/beastier/R/beastier.rdb' is corrupt In addition: Warning messages: 1: In get0(oNam, envir = ns) : restarting interrupted promise evaluation 2: In get0(oNam, envir = ns) : internal error -3 in R_decompress1

and

beastier::is_bin_path(experiment$beast2_bin_path) Error in get0(oNam, envir = ns) : lazy-load database 'C:/Program Files/R/R-3.6.0/library/beastier/R/beastier.rdb' is corrupt In addition: Warning messages: 1: In get0(oNam, envir = ns) : restarting interrupted promise evaluation 2: In get0(oNam, envir = ns) : internal error -3 in R_decompress1

Giappo commented 5 years ago

Maybe it can be solved just by regenerating the data @ "http://richelbilderbeek.nl/razzo_project_20190801.zip" ?

richelbilderbeek commented 5 years ago

It is shown in the (yes, very long) error, in the third line:

Error: lazy-load database 'C:/Program Files/R/R-3.6.0/library/beastier/R/beastier.rdb' is corrupt Value: /home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.xml/home/p230198/GitHubs

Note the weird filename:

/home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.xml/home/p230198/GitHubs
  1. p230198 is me. How does it get there on your computer? OTOH, this could have been part of our older naming. Will have a fresh (full, yet 2 replicates) run tomorrow for ya, for even cooler pics!
  2. that the filename ends with mbd_gen.xml/home/p230198/GitHubs is even more unexpected

Especially due to point 2, I think something is wrong with the file naming inside the function.

Good luck :+1:

richelbilderbeek commented 5 years ago

P.S. perhaps try the latest and greatest test run (URL from razzo_project's richel branch)

Giappo commented 5 years ago

It is shown in the (yes, very long) error, in the third line:

Error: lazy-load database 'C:/Program Files/R/R-3.6.0/library/beastier/R/beastier.rdb' is corrupt Value: /home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.xml/home/p230198/GitHubs

Note the weird filename:

/home/p230198/GitHubs/razzo_project/data/0.2-0-1-0.1/1/mbd_gen.xml/home/p230198/GitHubs
  1. p230198 is me. How does it get there on your computer? OTOH, this could have been part of our older naming. Will have a fresh (full, yet 2 replicates) run tomorrow for ya, for even cooler pics!
  2. that the filename ends with mbd_gen.xml/home/p230198/GitHubs is even more unexpected

Especially due to point 2, I think something is wrong with the file naming inside the function.

Apparently the problem is in experiment$beast2_options and in experiment$beast2_bin_path. Point 2) I suppose you see this weird superlong paths because in the error message there is probably some "\n" missing and therefore series of paths are concatenated in the message. Point 1) These are probably the paths saved in the parameters file that you provided (@ http://richelbilderbeek.nl/razzo_project_20190827.zip). I'll print them here:

parameters$pir_params$experiments[[1]]$beast2_bin_path [1] "/home/p230198/.local/share/beast/bin/beast" parameters$pir_params$experiments[[1]]$beast2_options$beast2_working_dir [1] "/home/p230198/.cache/file165643b17069c/pff_165641d9143b4" parameters$pir_params$experiments[[1]]$beast2_options$beast2_path [1] "/home/p230198/.local/share/beast/lib/launcher.jar"

Do we actually need these? If we need them, can they be put in a better position in such a way data can be used in remote (as I am trying to do)?

richelbilderbeek commented 5 years ago

Apparently the problem is in experiment$beast2_options and in experiment$beast2_bin_path. [...] Do we actually need these? If we need them, can they be put in a better position in such a way data can be used in remote (as I am trying to do)?

No, for creating a figure we do not need these. I think the problem is that the razzo_params are checked: usually great, but not in this context. For some work for raket, I solved this by using readRDS (no checks) instead of open_parameter_file (does check). I think that will help!

Point 2) I suppose you see this weird superlong paths because in the error message there is probably some "\n" missing and therefore series of paths are concatenated in the message.

Yes, you are probably right on that point! I tend to forget this.. :blush:

Good luck :+1:

Giappo commented 5 years ago

Hi @richelbilderbeek , what do you think if we instead split the plot in two plots (mu = 0, and mu = 0.15)? In this way we can increase the readability (there is a lot of information in these plots) and in this way it's easier to identify the increase in MBD-ness (it has minimum in top left and maximum in bottom right).

richelbilderbeek commented 5 years ago

I dunno. How does it look like now?

Giappo commented 5 years ago

That's the current output for the two figures:

fig_1_mu_0

fig_1_mu_015

Giappo commented 5 years ago

Any suggestion is gladly accepted

richelbilderbeek commented 5 years ago

Looks pretty! I suggest to keep it like that!

richelbilderbeek commented 5 years ago

I'll close the Issue, @Giappo did a great job!