If I run the the 1st example from the READ.me without the -x option I get an error (see below). If this is indeed caused by certain characters in sequence names, it could be nice to cover these requirements in the documentation, and run a check for legal leaf names, with a warning message if that fails.
./mulberrytree -t example/a_treeSimple.nwk -g example/b_taxa.tsv -c example/c_colorGroups.tsv
Warning messages:
1: package ‘ggplot2’ was built under R version 4.2.3
2: package ‘tibble’ was built under R version 4.2.3
3: package ‘tidyr’ was built under R version 4.2.3
4: package ‘readr’ was built under R version 4.2.3
5: package ‘purrr’ was built under R version 4.2.3
6: package ‘dplyr’ was built under R version 4.2.3
7: package ‘stringr’ was built under R version 4.2.3
8: package ‘forcats’ was built under R version 4.2.3
Warning message:
package ‘tidytree’ was built under R version 4.2.3
Warning message:
package ‘phytools’ was built under R version 4.2.3
Warning message:
package ‘ape’ was built under R version 4.2.3
Warning message:
package ‘gplots’ was built under R version 4.2.3
Loading time: 3.31 seconds
mulberrytree will use the following information:
---------------------------------------
-Tree file:
example/a_treeSimple.nwk
-Group file:
example/b_taxa.tsv
-Color file:
example/c_colorGroups.tsv
-Will print to files:
example/a_treeSimple.mulberryCollapsed.pdf
example/a_treeSimple.mulberryCollapsed.nxs
example/a_treeSimple.mulberryUncollapsed.pdf
example/a_treeSimple.mulberryUncollapsed.nxs
--------------------------------------
Reading tree file...
Reading taxon names file...
Reading taxon colors file...
Analysing tree...
Error in `reduce()`:
! Must supply `.init` when `.x` is empty.
Backtrace:
▆
1. ├─global monophyletic_subgroups(tree, leaves, col_groups, threads)
2. │ └─groupMono %>% ...
3. └─purrr::reduce(.init = <empty>)
4. └─purrr:::reduce_impl(.x, .f, ..., .init = .init, .dir = .dir)
5. └─purrr:::reduce_init(.x, .init, left = left, error_call = .purrr_error_call)
6. └─cli::cli_abort(...)
7. └─rlang::abort(...)
Execution halted
If I run the the 1st example from the READ.me without the -x option I get an error (see below). If this is indeed caused by certain characters in sequence names, it could be nice to cover these requirements in the documentation, and run a check for legal leaf names, with a warning message if that fails.