delimtools 0.4.3
Bug fixes and CRAN compliance
-
src/abgd/abgdCore.c,src/abgd/main_abgd.c: the-Wformat-overflowand-Wstringop-overflowwarning names in the shared#pragma GCC diagnostic ignoredblock are GCC-only — Clang (including Apple clang, used by the macOS CI runner) doesn’t recognize them and emits-Wunknown-warning-optionfor each, whichR CMD check --as-cranthen reports as a “significant warning” during installation, failingR-CMD-check.yamlon macOS. Those two are now only ignored under real GCC (defined(__GNUC__) && !defined(__clang__)); the rest of the block, which both compilers recognize, is unchanged.
delimtools 0.4.2
Bug fixes and CRAN compliance
abgd_tbl(): fixed a crash (object 'delim' not found) when parsing ABGD’s native (non-SPART)webserverresults format — adelim <- ... |> mutate(... nrow(delim) ...)pipe referenceddelimbefore it existed. Now usesdplyr::row_number().-
asap_tbl(): the cleanup of ASAP’s incidental working-directory output files (*.res.cvs,*_distmat.txt) calledtools::file_path_as_absolute()before checking whether those files existed, which errors on a nonexistent path instead of letting the subsequentfile.exists()guard handle it; it now builds the candidate paths without requiring them to exist first.- Removed a stray semicolon after the closing brace of the
Increase()comparison function insrc/abgd/main_abgd.c, which triggered a-Wpedanticwarning (“ISO C does not allow extra ‘;’ outside of a function”).
- Removed a stray semicolon after the closing brace of the
Fixed integer-overflow warnings (
-Woverflow) insrc/mptp/hash.con platforms whereunsigned longis 32 bits (e.g. 64-bit Windows).hash_fnv()now performs the FNV-1a computation with fixed-widthuint64_tconstants (UINT64_C()), so the offset basis and prime are no longer silently truncated.hash_fnv()now processes input bytes asunsigned char, avoiding sign extension for non-ASCII characters (e.g. accented sequence labels). Hash values for such labels differ from previous versions; this only affects the internal hash table and has no effect on results.
delimtools 0.4.1
New functions
-
ptp()andptp_tbl()added as aliases ofmptp()/mptp_tbl(), withmethoddefaulting to"single"(single-rate PTP) instead ofmptp()’s own default of"multi"(multi-rate mPTP).
Improvements
abgd_tbl()andasap_tbl()now auto-detect and parse the SPART matricial text format, in addition to each tool’s own native webserver/CLI output, wherever they read a results file (thewebserverargument, and the file the CLI run itself produces). Detection and parsing are handled by new internal.is_spart_file()/.read_spart()(R/spart.R), following the grammar of https://github.com/iTaxoTools/SpartParser. A SPART file with more than one spartition yields one column per spartition, named{delimname}_1,{delimname}_2, etc.gmyc()andbgmyc()now accept atreeio-style"treedata"object (e.g. fromtreeio::read.beast()) directly, converting it tophylointernally before use.mptp()/mptp_mcmc()gained input validation consistent withgmyc()/bgmyc(): class, duplicate tip labels, a minimum of 3 taxa, and polytomy detection. A polytomous tree previously failed with the misleading"mPTP: tree is neither rooted nor unrooted Newick."; it now reports the actual problem and points toape::multi2di().mptp()/mptp_mcmc()now emit amessage()when an unrooted input tree is rooted automatically (on the tip with the single longest terminal branch — not midpoint rooting) and nooutgroupwas supplied, matching a notice the oldermptp_tbl()CLI path already gave.
Bug fixes
abgd(): fixed a segfault on any alignment containing a pair of sequences that share no non-gap site (reachable with the defaultmodel = "simple") — the embedded C code’sfprintf()/fclose()calls operated on aNULLfile handle left over from the original CGI tool; replaced with a clear R-levelerror()naming the offending pair.abgd(): removed asystem("mv ...")call in the embedded C code, left over from the original CGI tool and never reachable from R, but the kind of call CRAN reviewers flag by hand regardless of reachability.asap(): fixed sequence pairs with no overlapping site being silently reported as distance0(i.e. identical) for every distance model other than"simple"—ape::dist.dna()correctly returnsNaNfor these, which was then unconditionally coerced to0. Now raises a clear error naming the offending pairs, for every model.Internal
asap_exit_properly()was a no-op under the R wrapper for all of ASAP’s “should never happen” internal assertions (memory-allocation failures, invalid internal state), silently letting execution continue on bad state instead of stopping; it now always halts via R’serror().mptp()/mptp_mcmc(): fixed a NULL-pointer crash in the embedded mPTP C engine — thestdout/stderrmacros were only lazily initialized as a side effect of one unrelated internal function, so anyfprintf()to either stream that ran first (which happened on essentially every default run) segfaulted. Both macros now resolve through a function that always returns a valid stream.get_dwc()/as_dwc(): fixed three compounding bugs — the Darwin Core distribution files have no header row (the first term was silently dropped byreadr::read_csv()),type = "all"requested a nonexistentall_dwc_vertical.csv(the real file isdwc_vertical.csv), and thetypeargument was mistakenly reused as a column-name selector instead of the actual term column.get_dwc(),as_dwc(),dwc_terms(): their examples read a live GitHub-hosted data source and previously failed CRAN’s automated checks outright when that resource’s format changed upstream. These examples are now wrapped in\dontrun{}, since they inherently depend on a remote resource outside our control.DESCRIPTION: addedAdditional_repositoriespointing at the Bioconductor release repository.ggtree(Imports) andtreeio(now declared in Suggests; it was already used, unguarded, in the vignette) are Bioconductor packages, and without this field they could be reported as unavailable on some CRAN check flavors..Rbuildignore:installs/(renamed frominstall/some time ago) was never added under its new name, so it — along with untrackedbenchmark/andissues/directories — leaked into the built package as non-standard top-level content.
Internal changes
.github/workflows/pkgdown.yaml: the “Update home page” step was pointed at a different package’s files (vignettes/VCFArrow.md, aP_vaillantii.jpegimage) left over from the template it was copied from; it now builds the home page from this package’s own vignette (vignettes/delimtools.Rmd), knitted so its live code actually runs, with figures routed throughman/figures/so pkgdown can serve them. The build step force-cleansdocs/past a one-time pkgdown ownership check, and stages/restoresinstalls/install.mdaround it.vignettes/delimtools.Rmdpromoted from a pkgdown-only article (previouslyvignettes/articles/) to a real,R CMD check-built vignette.install.Rmdmoved out ofdocs/(pkgdown’s own build destination, which it fully owns and cleans on every build) intoinstalls/, asinstalls/install.Rmd, alongside a renderedinstalls/install.md.
delimtools 0.3.5
Breaking changes
- Removed all remaining direct calls to
bGMYC::/splits::frombgmyc_tbl(),gmyc_tbl(), anddelim_join()— these now call delimtools’ own native engines unconditionally.
Bug fixes
Fixed an alignment-verification bug:
ape::read.FASTA()returns a list-formDNAbin(one vector per sequence) rather than a matrix, butabgd()/asap()’s shared input check testedis.matrix()directly, wrongly rejecting validly-aligned list-form input. Now coerces viaas.matrix()and only rejects on genuine length mismatches.Fixed several
R CMD checkERRORs/WARNINGs/NOTEs ahead of CRAN submission: stalecheck_identifiers.Rdregenerated; undocumentedtr/intervalarguments inconfidence_intervals()documented explicitly instead of via a broken@inheritParams splits::gmyc; examples that calledbGMYC::/splits::directly (an unstated-dependency WARNING, and neither package is on CRAN) reworked to use delimtools’ owngmyc()/bgmyc(), including a hand-built legacysinglebgmycexample forbgmyc_tbl()that no longer needsbGMYCinstalled; stale Rd cross-references[gmyc][splits::gmyc]/[spec.list][splits::spec.list]repointed to delimtools’ own functions.R-CMD-check.yaml(macOS): installs XQuartz, needed byggtree’sggiraph/gdtoolsdependency chain at package-load time.R-CMD-check.yaml:ubuntu-latest (devel)leg markedcontinue-on-error— its recurringbit64/install-stage failures are upstream RSPM/P3M binary-vs-R-devel-ABI mismatches, not a delimtools bug.test-coverage.yaml: fixedfail_ci_if_errorlogic, which previously hard-failed on every push regardless of whether aCODECOV_TOKENsecret was actually configured.
delimtools 0.3.4
Breaking changes
- Removed the
bGMYCpackage dependency: species delimitation and the legacysinglebgmyc-object path inbgmyc_tbl()now run on delimtools’ own native engine; the option to analyze legacybGMYCoutput is retained.
delimtools 0.3.2
Internal changes
src/Makevars: subdirectory build rules reordered (most specific first, catch-all last) to prevent a silent-bug risk.confidence_intervals():splits::gmyc()call replaced withdelimtools::gmyc().match_ratio(): namespace-qualified function calls.Old/unused dependencies removed from
DESCRIPTION;Imports/Suggestsupdated.build-binaries.yamladded, to build platform binaries and generate GitHub releases.
delimtools 0.3.0.9014
Breaking changes
-
delim_join()now returns the delimitations in order of input. #118d137 -
delim_consensus()now returns NA when there are ties between two first consensus outputs. #ddc3e74 -
match_ratio()now returns a dataframe sorted by match_ratio values by default. #8eeac15 -
delim_consensusnow inputs NA values when there are ties.
Internal
- updated .Rd files for
abgd,abgd_tbl(),asap(),asap_tbl()
delimtools 0.3.0.9013
Breaking changes
-
mptp_assignments()removed. Usemptp_tbl()directly — it accepts an"mptp_ml"/"mptp_mcmc"object and returns the same information as a properly named tibble.
delimtools 0.3.0.9012
Breaking changes
-
asap(): French parameter names renamed to English equivalents —seuil_pvalue→pvalue_threshold,pond_pente→slope_weight,pond_score→score_weight.
delimtools 0.3.0.9011
Breaking changes
-
run_bgmyc()renamed tobgmyc(). -
run_mptp_ml()renamed tomptp(). -
run_mptp_mcmc()renamed tomptp_mcmc().
delimtools 0.3.0.9010
Performance
-
run_bgmyc()is now ~3.8× faster (136-tip tree, 11 000 steps: 3.94 s → 1.03 s). TheC_bgmyc_mcmcGibbs loop now cacheslog(n_spe[i])andlog(jc[c] * (jc[c] - 1))per threshold and replacespow(x, p)withexp(p * log_x)for the two-pass log-likelihood. The cache is rebuilt only when a threshold (t) proposal is accepted (~11 % of steps); the remainingpy/pcupdates reuse the cached values without anypow()call.
delimtools 0.3.0.9009
Breaking changes
"bgmyc_fit"objects (returned byrun_bgmyc()) now store$assignmentsas a data frame with columnslabelsandbgmyc— the same shape as"mptp_ml"/"mptp_mcmc"objects — instead of a raw integer matrix. The raw per-sample cluster indices have been replaced by$probmat, the posterior co-occurrence probability matrix (n_tips × n_tips).run_bgmyc()gains appcutoffargument (default0.05) that controls the threshold used to compute the point-estimate$assignments.-
bgmyc_tbl()for"bgmyc_fit"objects now reads$probmatdirectly, enabling recomputation of the partition at any cutoff without re-running the
delimtools 0.3.0.9008
New functions
-
run_bgmyc()— runs a Bayesian implementation of the General Mixed Yule-Coalescent (bGMYC) species delimitation model via the embedded C GMYC engine. Accepts an ultrametricapephyloobject. MCMC likelihood evaluations are performed in C (C_gmyc_loglik) and cluster assignments are extracted in C (C_gmyc_clusters), eliminating the dependency on the externalbGMYCpackage. Supports configurable MCMC steps, burn-in, thinning, prior bounds, and proposal scales. Returns a classed"bgmyc_fit"list with MCMC samples, per-tip cluster assignments, and acceptance rates. Implements asummaryS3 method.
Improvements
-
bgmyc_tbl()now accepts a"bgmyc_fit"object (returned byrun_bgmyc()) as its first argument, requiring no external package. The co-occurrence probability matrix is built from the precomputed$assignmentsmatrix and a point-estimate partition is derived via union-find at the givenppcutoff. The legacy"singlebgmyc"path (requiresbGMYC) is unchanged.
delimtools 0.3.0.9006
Bug fixes
-
run_mptp_mcmc()now returns meaningful labels insupport$node_label. Previously the column was always empty because most Newick files do not label inner nodes, causingnode->labelto beNULLin the C parser. Inner nodes without a Newick label now receive a sequential postorder label ("Inner_1","Inner_2", …); nodes that do carry a label in the file (e.g. bootstrap values) are unaffected.
delimtools 0.3.0.9005
Breaking changes
-
$assignmentsinside"mptp_ml"/"mptp_mcmc"objects now uses column nameslabelsandmptp(multi-rate) orptp(single-rate), matching themptp_tbl()output format. The previous namestaxonandspeciesare gone.
delimtools 0.3.0.9004
Improvements
-
mptp_tbl()now accepts an"mptp_ml"or"mptp_mcmc"object (returned byrun_mptp_ml()/run_mptp_mcmc()) as its first argument, bypassing the CLI path entirely. The assignments are extracted and returned as the standard tibble with columnslabelsand the species integer index. All other arguments are ignored when an object is supplied.
delimtools 0.3.0.9003
Bug fixes
run_mptp_ml()andrun_mptp_mcmc()now correctly report singleton species (taxa that form a one-taxon coalescent group). Previously, any tip that was itself a coalescent root (i.e. a direct child of a speciation node in the backtrack tree) was silently assignedspecies = 0and excluded from the result, causing the returned cluster count to be lower than the equivalentmptp_tbl()run. Fixed inbuild_assignments_ml()by checkingnode->event == EVENT_COALESCENT && !in_coalat the tip branch before inheriting the parent’s species index.run_mptp_ml()andrun_mptp_mcmc()now returnn_species = 1when the likelihood ratio test fails (null model preferred). Previouslydp_get_stats()always returned the DP-table species count regardless of the LRT outcome, producing a mismatch with the assignments (which correctly placed all taxa in one group because no backtrack was performed).
delimtools 0.3.0.9002
Improvements
abgd_tbl()now accepts an"abgd"object (returned byabgd()) as its first argument, bypassing the CLI path entirely.best_partition()is called internally and the result is returned as the standard tibble. Atypeargument ("recursive"/"initial", default"recursive") selects which ABGD pass to use.hapsfiltering is respected.asap_tbl()now accepts an"asap"object (returned byasap()) as its first argument, bypassing the CLI path entirely.best_partition()is called internally and the result is returned as the standard tibble. Arankargument (defaultNULL, i.e. rank 1) selects which ranked partition to return.hapsfiltering is respected.
delimtools 0.3.0.9001
Breaking changes
- License changed from GPL-3 to AGPL-3, required by the embedded mPTP C engine (AGPL-3, Flouri, Lutteropp & Kapli). Tomas Flouri, Sarah Lutteropp, and Paschalia Kapli added as contributors in
DESCRIPTION.
New functions
run_mptp_ml()— runs the multi-rate Poisson Tree Processes (mPTP) species delimitation algorithm (ML mode) via the embedded C engine. Accepts a Newick file path or anapephyloobject; supports rooted and unrooted trees, single and multi coalescent rate models, and optional outgroup rooting/cropping. Returns a classed"mptp_ml"list with species assignments, log-likelihoods, LRT result, and edge counts. Implements aprintS3 method.run_mptp_mcmc()— runs the mPTP MCMC engine to compute posterior support for each inner node as a coalescent root. Accepts the same inputs asrun_mptp_ml(); supports multiple independent runs, configurable steps, burn-in, and sampling frequency. Returns a classedc("mptp_mcmc", "mptp_ml")list with all ML fields plus per-node support values and MCMC metadata. Implements aprintS3 method.mptp_assignments()— extracts the taxon-to-species assignment data frame from an"mptp_ml"or"mptp_mcmc"result.mptp_species()— extracts the species-to-taxon named list from an"mptp_ml"or"mptp_mcmc"result.mptp_support()— extracts the per-node posterior support data frame from an"mptp_mcmc"result.
Internal changes
Embedded mPTP C engine (v1.2.3, 2023-09-19 snapshot) under
src/mptp/. Includes DP, MCMC, likelihood, tree-parsing (rooted and unrooted Newick via Flex/Bison), and utility modules. No external library dependencies beyond-lm.src/Makevarsrefactored to per-directory pattern rules.abgd/%.oandasap/%.oreceive-include asap/r_compat.h;mptp/%.oreceives-DHAVE_CONFIG_H -DR_PACKAGE -DYY_FATAL_ERROR(...). This replaces the previous global-include asap/r_compat.hinPKG_CPPFLAGS, which would cause null-pointer crashes when applied to mptp’sfprintf(stdout/stderr, ...)calls beforer_compat_null_streamis initialised.src/delimtools_init.cupdated withrmptp_ml(9 args) andrmptp_mcmc(17 args) call-method entries.
delimtools 0.3.0.9000
New functions
abgd()— runs the Automatic Barcode Gap Discovery algorithm entirely within R via the embedded C engine (abgdCore.c). Accepts a FASTA file path or aDNAbinobject. Supports K80, JC69, TN93, and simple (p-distance) models. Returns a classed"abgd"list withinitialandrecursivepartition data frames.asap()— runs the Assemble Species by Automatic Partitions algorithm via the embedded C engine (asap_core.c). Accepts aDNAbinobject, adistmatrix, or a numeric distance matrix. Returns a classed"asap"list with partitions ranked by ASAP score, the best partition, and the distance matrix used. ImplementsprintandsummaryS3 methods.gmyc()— runs the General Mixed Yule Coalescent model via the embedded C log-likelihood engine (gmyc_core.c) driven by R’soptim(). Accepts an ultrametricphylotree. Returns a splits-compatible"gmyc"object. ImplementsprintandsummaryS3 methods.spec.list()— S3 generic that extracts species lists from delimitation results.spec.list.gmyc()method is compatible with thesplitspackage output.best_partition()— S3 generic for selecting the best partition from a delimitation result.best_partition.abgd()applies the plateau criterion (Puillandre et al. 2012);best_partition.asap()returns the partition at a given rank (default: rank 1).
Internal changes
Embedded C engines for ABGD, ASAP, and GMYC under
src/abgd/,src/asap/, andsrc/gmyc/respectively. No external binary dependencies.src/asap/r_compat.handsrc/asap/r_compat.credirect ASAP’sprintf,exit,rand,stderr, andstdoutto R-safe equivalents; applied globally via-include asap/r_compat.hinPKG_CPPFLAGS.ASAP RNG functions (
unirandom,exponentialdev,poissondev) now defined insrc/asap/asap_wrapper.cusing R’sunif_rand()for reproducibility withset.seed().src/delimtools_init.cconsolidatesR_registerRoutinesfor all three engines into a singleR_init_delimtools().Fixed a pre-existing syntax error (missing comma) in the
delim_tbl()example.
delimtools 0.2.2
CRAN release: 2026-03-23
Fixed an issue caused by an update in
dplyr::if_elseconditions;Added
tryin examples to avoid any CRAN checking errors;
delimtools 0.2.1
CRAN release: 2025-09-29
Get startedvignette added;Fixed
hap_uniteunnesting NA values (#15);get_delim_colsnow returns a data frame in the same order of the phylogenetic tree plot (#16);Fixed
abgd_tblnot returning a subset of the original file when usinghapsandwebserveroptions (#17);Fixed
asap_tblnot returning a subset of the original file when usinghapsandwebserveroptions (#18);Fixed
get_delim_colsincompatibility with ggplot2 v.4.0.0 (#20)