
This software is under development, and as such cannot be assumed to be free of bugs or poor functionality. Always inspect results carefully. If you find a problem, please report it with as much detail as possible in Issues. The current version is completely stand alone, no longer depending on third party binaries or R dependencies no longer available on CRAN. The affected functions, however, retain their legacy behavior for now. Follow these instructions for installing the third party binaries and R dependencies.
As of v0.3.0, delimtools provides native R ports for all
species delimitation software currently supported by this package. This
means that ABGD, ASAP, bGMYC, GMYC and mPTP—previously dependent on
external binaries or third-party R packages—will run
entirely within the R environment, with
performance-critical likelihood computations handled by embedded C
code.
These R ports were developed with the assistance of Claude (Anthropic), under continuous human supervision. This porting process prioritized fidelity to the original source code: algorithms, likelihood functions, and core logic were preserved as closely as possible, with changes limited to what was strictly necessary for integration into the R/C ecosystem.
This change removes the Unix-only restriction that affected several
functions in earlier versions, making the full delimtools
pipeline available on all platforms, including
Windows. Users will no longer need to install or
configure standalone executables to run any of the supported methods.
All currently implemented wrappers (*_tbl() functions) will continue to
be available for comparative purposes for some time, but will eventually
be deprecated in the upcoming updates.
This is the official GitHub repository for the R package
delimtools (Bittencourt, Collins &
Hrbek, 2026).
Single-lucus species delimitation analyses have been implemented in a
diversity of packages that use different methods to delimit species.
These include GMYC (Monaghan et al., 2009),
bGMYC (Reid &
Carstens, 2012), mPTP (Kapli et al.,
2017), ABGD (Puillandre et
al., 2011) and ASAP (Puillandre et al.,
2020). These software run on different platforms (e.g. R, Unix,
webservers), and also do not output their results in a consistent format
to allow easy comparison. To address these shortcomings we have
developed a suite of functions in the delimtools package
that replicate the behavior of these software, and then standardize and
simplify the output of these functions. This then permits comparison of
the delimitation analyses, and unified visualization of the delimitation
results.
Delimtools mainly depends on the tidyverse and ggtree packages. To install these, run the command lines below:
Install tidyverse:
install.packages("tidyverse")Install ggtree
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("ggtree")To install delimtools you may execute the following
commands. We recommend using the latest CRAN release.
Latest stable version from CRAN
install.packages("delimtools")Development version from GitHub:
pak::pak("legalLab/delimtools")
# or alternately
devtools::install_github("legalLab/delimtools")
# Windows and macOS binaries are also provided with each release
install.packages("https://github.com/legalLab/delimtools/releases/download/v0.4.3/delimtools_0.4.3.zip", repos = NULL, type = "win.binary")
install.packages("https://github.com/legalLab/delimtools/releases/download/v0.4.3/delimtools_0.4.3.tgz", repos = NULL, type = "mac.binary")Or a specific version via renv:
renv::install("legalLab/delimtools@v0.1.0")Here, we demonstrate plotting a single-locus species delimitation analysis of a Geophagus eartheater cichlid dataset (Ximenes et al., 2021) using a diversity of methods. A tutorial running through all major package functionality is found in the vignette.
library(delimtools)
library(dplyr)
# make tip label table
tip.tab <- geophagus_info |>
filter(gbAccession %in% geophagus_beast@phylo$tip.label) |>
mutate(labs = glue::glue("{gbAccession} | {scientificName}")) |>
select(gbAccession, labs, scientificName)
# get columns
cols <- delim_brewer(delim = geophagus_delims, package = "randomcoloR", seed = 42)
# plot
delim_autoplot(delim = geophagus_delims,
tr = geophagus_beast,
consensus = TRUE,
n_match = 4,
delim_order = c("asap","abgd","locmin","gmyc","bgmyc","ptp", "mptp","morph"),
tbl_labs = tip.tab,
col_vec = cols,
hexpand = 0.7,
widths = c(0.5, 0.5))
#> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
#> ℹ Please use `linewidth` instead.
#> ℹ The deprecated feature was likely used in the ggtree package.
#> Please report the issue at <https://github.com/YuLab-SMU/ggtree/issues>.
#> This warning is displayed once per session.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
delimtools in R by running
citation(package='delimtools').