richelbilderbeek / pirouette_article

Article about pirouette, by Bilderbeek, Laudanno and Etienne
GNU General Public License v3.0
0 stars 0 forks source link

Fix bug in `pir_to_pics` #92

Closed richelbilderbeek closed 4 years ago

richelbilderbeek commented 4 years ago

From the Travis CI build log:

Error in FUN(X[[i]], ...) : object 'error' not found
Calls: pir_to_pics ... <Anonymous> -> f -> scales_add_defaults -> lapply -> FUN
Execution halted
richelbilderbeek commented 4 years ago

OK, something happened to pirouette between 2 and 3 days ago:

richelbilderbeek commented 4 years ago

Weird, all I did those days was using newer version of beastier, beautier, babette, etc... :confused:

richelbilderbeek commented 4 years ago

Gotcha (in the Travis build logs)!

richelbilderbeek commented 4 years ago

Ah, the experiments are not checked to have different filenames:

> pir_params$experiments[[1]]$errors_filename
[1] "/home/richel/temp/temp/pirouette_example_30/example_30_314/errors.csv"
> pir_params$experiments[[2]]$errors_filename
[1] "/home/richel/temp/temp/pirouette_example_30/example_30_314/errors.csv"
richelbilderbeek commented 4 years ago

Also, df_errors does not contain an x column.

    csv_filename <- first_experiment$errors_filename
    testthat::expect_true(file.exists(csv_filename))
    df_errors <- utils::read.csv(csv_filename)
    testthat::expect_true("x" %in% names(df_errors))
> df_errors
  tree inference_model inference_model_weight site_model clock_model  tree_prior    error_1
1 true      generative                     NA       JC69      strict        yule 0.31887031
2 true       candidate              0.9375251       JC69      strict birth_death 0.31887031
3 twin      generative                     NA       JC69      strict        yule 0.09862447
4 twin       candidate              0.4727861       JC69      strict birth_death 0.09862447
      error_2    error_3     error_4
1 0.060040025 0.01627043 0.042882867
2 0.019009408 0.01266966 0.025718688
3 0.007670674 0.01793261 0.014001079
4 0.021105273 0.03824056 0.007614701
richelbilderbeek commented 4 years ago

Moved to https://github.com/richelbilderbeek/pirouette/issues/402, closing this one