Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
- `attr(dataset, "weight")` now accepts non-integer character weights. The
C++ scoring engine still stores `int` weights internally; fractional
inputs are rescaled to integer with a configurable precision (default
0.001, controlled by `getOption("TreeSearch.fractional.scale", 1000L)`).
~0.001, controlled by `getOption("TreeSearch.fractional.scale", 1260L)`).
Previously, fractional weights were silently truncated at the Rcpp
boundary (e.g. `c(0.5, 1.7)` became `c(0L, 1L)`, dropping 50% / 41% of
the respective characters' contributions). Integer weights pass
Expand Down Expand Up @@ -174,9 +174,6 @@ faster; inapplicable character handling (Brazeau _et al._ 2019) is built in.

### New features

- `PaintCharacters()` colours each character in a morphological dataset by its
most concordant tree edges.

- `ScoreSpectrum()`: Chao1-style landscape coverage estimator. Treats
distinct parsimony scores found across replicates as "species" and estimates
how thoroughly the parsimony landscape has been sampled (Good-Turing sample
Expand Down Expand Up @@ -206,8 +203,6 @@ faster; inapplicable character handling (Brazeau _et al._ 2019) is built in.
- **MPT enumeration**: after the main search converges, a TBR plateau walk
from each pool tree discovers additional most-parsimonious topologies on the
same and neighbouring score plateaus, up to `poolMaxSize`.
This addresses a common complaint that the previous implementation returned
only one tree when multiple MPTs exist.
- `LeastSquaresTree()` and `LeastSquaresFit()` search for, and
fit branch lengths to, the tree that best matches a target distance matrix
under a least-squares criterion, reusing the optimised C++ rearrangement
Expand All @@ -224,7 +219,7 @@ faster; inapplicable character handling (Brazeau _et al._ 2019) is built in.
- `attr(dataset, "weight")` now accepts non-integer character weights. The
C++ scoring engine still stores `int` weights internally; fractional
inputs are rescaled to integer with a configurable precision (default
0.001, controlled by `getOption("TreeSearch.fractional.scale", 1000L)`).
~0.001, controlled by `getOption("TreeSearch.fractional.scale", 1260L)`).
Previously, fractional weights were silently truncated at the Rcpp
boundary (e.g. `c(0.5, 1.7)` became `c(0L, 1L)`, dropping 50% / 41% of
the respective characters' contributions). Integer weights pass
Expand Down Expand Up @@ -401,8 +396,6 @@ faster; inapplicable character handling (Brazeau _et al._ 2019) is built in.
- Dataset-adaptive timeout default (1–15 minutes based on dataset size).
- Internal modularization of the Shiny app into proper Shiny modules.

## Other improvements

# TreeSearch 1.8.0.9001 (2026-04-23)

- Reorder parameters in `Q[A]Col(quality, amount)`.
Expand Down
6 changes: 1 addition & 5 deletions R/Concordance.R
Original file line number Diff line number Diff line change
Expand Up @@ -1002,9 +1002,6 @@ SharedPhylogeneticConcordance <- function(tree, dataset) {
#' consistent with a specified phylogenetic tree, and the signal:noise
#' ratio of the character matrix implied if the tree is true.
#'
#' Presently restricted to datasets whose characters contain a maximum of
#' two parsimony-informative states.
#'
#' @return `ConcordantInformation()` returns a named vector with elements:
#'
#' - `informationContent`: cladistic information content of `dataset`
Expand All @@ -1018,8 +1015,7 @@ SharedPhylogeneticConcordance <- function(tree, dataset) {
#' matrix to the cladistic information content of the tree, a measure of the
#' redundancy of the matrix
#' - `ignored`: information content of characters whose signal and noise could
#' not be calculated (too many states) and so are not included in the totals
#' above.
#' not be calculated, and so are not included in the totals above.
#'
#' @inheritParams TreeTools::Renumber
#' @inheritParams MaximizeParsimony
Expand Down
34 changes: 16 additions & 18 deletions R/MaximizeParsimony.R
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,8 @@
#' `maxSeconds`, or raise `enumTimeFraction`, for a more complete set.
#' \item **TBR-island coverage.** The plateau walk only explores islands of
#' equal-score trees that a main-loop replicate actually landed on. MPTs
#' lying in unvisited islands are never enumerated, however large
#' `poolMaxSize` is. Increase `maxReplicates` to seed more islands. Two
#' independent runs (or runs at different `strategy` effort) can therefore
#' return the *same* count if they exhaust the same connected island — this
#' reflects island structure, not a cap.
#' in unvisited islands are never enumerated, however large `poolMaxSize`
#' is; increase `maxReplicates` to seed more islands.
#' }
#' By default (`collapse = TRUE`), zero-length (unsupported) branches are
#' contracted into polytomies and the returned set is deduplicated on the
Expand All @@ -387,11 +384,10 @@
#'
#' Implied weighting is supported natively: set `concavity` to a numeric
#' value (e.g.\sspace{}10).
#' Profile parsimony (`concavity = "profile"`) is supported natively:
#' characters are simplified to binary (max 2 informative states),
#' inapplicable tokens are treated as ambiguous, and per-character
#' information profiles are used for scoring
#' \insertCite{Faith2001}{TreeSearch}.
#' Profile parsimony (`concavity = "profile"`) is supported natively.
#' Inapplicable tokens are treated as ambiguous, and each character is scored
#' by its information profile \insertCite{Faith2001}{TreeSearch}; see
#' [`PrepareDataProfile()`] for how multi-state profiles are computed.
#'
#' @param dataset A phylogenetic data matrix of \pkg{phangorn} class
#' \code{phyDat}, whose names correspond to the labels of any accompanying tree.
Expand All @@ -406,7 +402,7 @@
#' @param concavity Determines the degree to which extra steps beyond the first
#' are penalized. Specify a numeric value to use implied weighting
#' \insertCite{Goloboff1993}{TreeSearch}; `concavity` specifies _k_ in
#' _k_ / _e_ + _k_. A value of 10 is recommended;
#' _k_ / (_e_ + _k_). A value of 10 is recommended;
#' TNT sets a default of 3, but this is too low in some circumstances
#' \insertCite{Goloboff2018,Smith2019}{TreeSearch}.
#' Better still explore the sensitivity of results under a range of
Expand Down Expand Up @@ -479,18 +475,20 @@
#' character patterns; `"default"` otherwise.}
#' \item{`"sprint"`}{Fast search: 3 ratchet cycles, no drift, minimal
#' sectorial. Good for small datasets or quick surveys.}
#' \item{`"default"`}{Balanced: 12 ratchet + sectorial + fusing.}
#' \item{`"default"`}{Balanced: 6 ratchet cycles, sectorial search and
#' fusing.}
#' \item{`"thorough"`}{Intensive: 20 ratchet cycles, adaptive
#' perturbation, extra sectorial rounds, drift (2 cycles) and 5 Wagner
#' starts, outer cycle loop. Best for datasets with 65-119 tips and 100+
#' character patterns; the drift cycles also recover equal-score trees on
#' TBR-disconnected islands that random restarts alone miss.}
#' \item{`"large"`}{Large-tree search (>=120 tips): reduced cycle
#' counts scaled for expensive per-replicate cost, no NNI
#' perturbation, single biased Wagner start (Goloboff 2014), larger
#' sector sizes, 1-cycle simulated annealing instead of drift
#' (linear cooling from T=20 to T=0 over 5 phases). Empirically matches
#' or exceeds `"thorough"` at 180 tips across all time budgets.}
#' \item{`"large"`}{Large-tree search (>=120 tips): the `"thorough"`
#' settings with `maxReplicates` raised to 500 to suit the higher
#' per-replicate cost.}
#' \item{`"intensive"`}{Deprecated alias of `"thorough"`, retained for
#' backward compatibility. The extra Wagner starts (5) that once
#' distinguished it are now folded into `"thorough"`, so the two are
#' identical.}
#' \item{`"none"`}{Use only the explicitly supplied parameter values.}
#' }
#' Presets stop on `targetHits` and the `perturbStopFactor` no-improvement
Expand Down
3 changes: 1 addition & 2 deletions R/SearchControl.R
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ SearchControl <- function(
# Ratchet
# Default 12->6 (T-P5d, 2026-06-19): the ratchet was over-provisioned;
# halving cycles saved 20-38% wall at zero quality loss on the mid-size EW
# benchmarks. The `large` preset keeps 12 (deliberate large-tree tradeoff,
# T-179) and is unaffected by this formal-default change.
# benchmarks. The `thorough` preset (which `large` now rebases on) sets 20.
ratchetCycles = 6L,
ratchetPerturbProb = 0.25,
ratchetPerturbMode = 0L,
Expand Down
2 changes: 1 addition & 1 deletion R/WideSample.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
#' Default `60`.
#'
#' @return A `multiPhylo` object of length `min(n, length(trees))` containing
#' a uniform sample of `trees`.
#' a topologically diverse (Max-Min) subset of `trees`.
#' If `n == 1`, the single most central tree (the medoid) is returned.
#' Attributes of the input (e.g. `score`, `hits_to_best`) are preserved.
#'
Expand Down
17 changes: 9 additions & 8 deletions R/data_manipulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@
#' Maddison & Slatkin (1991), falling back to a Monte Carlo approximation for
#' large or complex characters.
#'
#' Characters are simplified where necessary, with a warning:
#' - inapplicable tokens will be replaced with the ambiguous token
#' (i.e. `-` \ifelse{html}{\out{&rarr;}}{\eqn{\rightarrow}{-->}} `?`);
#' - Ambiguous tokens will be treated as fully ambiguous
#' (i.e. `{02}` \ifelse{html}{\out{&rarr;}}{\eqn{\rightarrow}{-->}} `?`)
#' Characters are simplified where necessary:
#' - inapplicable tokens are replaced with the ambiguous token
#' (i.e. `-` \ifelse{html}{\out{&rarr;}}{\eqn{\rightarrow}{-->}} `?`),
#' reported with a message;
#' - ambiguous tokens are treated as fully ambiguous
#' (i.e. `{02}` \ifelse{html}{\out{&rarr;}}{\eqn{\rightarrow}{-->}} `?`).
#'
#' @param dataset dataset of class \code{phyDat}
#' @param approx Character string controlling how profile information amounts
Expand All @@ -63,9 +64,9 @@
#' - `informative`: logical specifying which characters contain any
#' phylogenetic information.
#'
#' - `bootstrap`: The character vector
#' \code{c("info.amounts", "split.sizes")}, indicating attributes to sample
#' when bootstrapping the dataset (e.g. in Ratchet searches).
#' - `bootstrap`: A character vector naming the attributes to resample when
#' bootstrapping the dataset (e.g. in Ratchet searches); `PrepareDataProfile`
#' adds `"info.amounts"`.
#'
#' `PrepareDataIW` adds the attribute:
#'
Expand Down
2 changes: 1 addition & 1 deletion man/AdditionTree.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions man/ConcordantInformation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/LengthAdded.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 16 additions & 18 deletions man/MaximizeParsimony.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions man/PrepareDataProfile.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/Resample.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/SuccessiveApproximations.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/TreeLength.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/WideSample.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading