Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
6b5fd7b
Metadata
ms609 Feb 22, 2022
e8ffe41
Spell Euclidean
ms609 Feb 22, 2022
c8a758f
Native path.dist calc
ms609 Feb 22, 2022
255bd0e
Citations
ms609 Feb 22, 2022
15b41d4
c++ Attempt
ms609 Feb 22, 2022
0d89be8
A second way
Feb 23, 2022
8613aa6
Faster path dist comparison
Feb 23, 2022
011704a
sqrt; vec_diff_euclidean
Feb 23, 2022
84efdf8
tests & checks
Feb 23, 2022
cf95bbb
cf. phangorn::path.dist
Feb 23, 2022
efdac3c
How SPR is calcualted
Feb 23, 2022
e4d81c2
Whidden solutions
Feb 23, 2022
218c5f6
Improve SPR distance
Feb 28, 2022
af654cb
Definite improvement over de O algo
Feb 28, 2022
b56aae3
balance?
Feb 28, 2022
5e568ac
Approximates rather than underestimates
Mar 1, 2022
364c521
Split out deO approach
Mar 1, 2022
05e08a2
confusion()
Mar 1, 2022
0e683bf
Tree reduction
Mar 2, 2022
07d1c22
ren
Mar 2, 2022
a8c8dee
TreeConflict→Reduce()
Mar 2, 2022
6018259
rn
Mar 2, 2022
f9f14ec
Reduction rule 2
Mar 2, 2022
c5d6ad0
gg_aunt fixes reduce_tree()
Mar 4, 2022
a1174f3
Handle deletion of root leaf
Mar 4, 2022
3a897a8
Drop >1 if requested
Mar 4, 2022
08d8b4c
Reduce
Mar 4, 2022
2fd0404
Test root lift
Mar 4, 2022
0b51565
static root 1
Mar 4, 2022
3cf3bce
Lift logging
Mar 4, 2022
bbd72cc
lift log
Mar 4, 2022
04137ef
Success
Mar 4, 2022
04b8221
Root-lifting
Mar 8, 2022
f2bbb00
sibling rewritery
Mar 8, 2022
453ff24
Debugging glyphs
Mar 8, 2022
ba0068b
Simplify test
Mar 8, 2022
7911827
Renumber tips in situ
Mar 8, 2022
2a30733
Reduce → postorder
Mar 8, 2022
e61bb30
KeepTipPostorder
Mar 8, 2022
3ae786f
keep_and_reroot()
Mar 8, 2022
c89e70a
keep_and_reroot
Mar 8, 2022
bf115b2
rm dbg
Mar 8, 2022
23f1b08
splits by tree
Mar 8, 2022
e1358d1
rm i, j
Mar 8, 2022
95541cc
keep_and_reduce
Mar 8, 2022
97c94e0
Merge branch 'master' into no-phangorn
ms609 Jul 19, 2022
10d9eb1
document()
ms609 Jul 19, 2022
3e03cc9
insertCite
ms609 Jul 20, 2022
cfe96d5
Update from main
ms609 Feb 23, 2024
00515bb
Clear defunct methods
ms609 Feb 23, 2024
5f03f1d
act/expected
ms609 Feb 23, 2024
34c65a5
re-import root_on_node
ms609 Feb 23, 2024
4c434aa
TreeTools > 1.10.0, for root_on_node
ms609 Feb 23, 2024
b6359b0
STASHED testing
ms609 Feb 23, 2024
4cc2e7d
Merge branch 'master' into spr-dist
ms609 Feb 23, 2024
b1d503c
Delete Rplots.pdf
ms609 Feb 23, 2024
50b9979
Major fail
ms609 Feb 23, 2024
7b1d030
xor_splits
ms609 Feb 23, 2024
0171400
Merge branch 'master' into no-phangorn
ms609 Jun 26, 2024
9e2cd38
Merge; write
ms609 Jun 26, 2024
a55f885
document()
ms609 Jun 26, 2024
2d6dcdf
PathDist _is_ faster than path.dist()
ms609 Jun 26, 2024
214a818
Update test-tree_distance_path.R
ms609 Jun 26, 2024
2773102
Merge branch 'master' into spr-dist
ms609 Jun 26, 2024
9baf77d
Exact
ms609 Jun 26, 2024
d83e505
phangorn
ms609 Jun 26, 2024
b3e4de4
ms609/TreeDistData first
ms609 Jun 26, 2024
b99b23b
Run on successful R CMD check
ms609 Jun 26, 2024
e09a1a1
workflow_dispatch:
ms609 Jun 26, 2024
902f6d2
env
ms609 Jun 26, 2024
9471b13
phangorn (>= 2.2.1)
ms609 Jun 26, 2024
8f1bdaf
Update memcheck.yml
ms609 Jun 26, 2024
6a22f73
libicu66
ms609 Jun 26, 2024
d216e5d
-commetn
ms609 Jun 26, 2024
f98d892
libicu66
ms609 Jun 26, 2024
636cf65
ms609/TreeTools
ms609 Jun 26, 2024
6b7182d
phangorn 4.4 requires Matrix
ms609 Jun 26, 2024
8dd813a
libicu-dev
ms609 Jun 26, 2024
80a8627
Combine apt installs
ms609 Jun 26, 2024
0546c23
Work backwards
ms609 Jun 26, 2024
e4f2a24
Reorder; rm duplication
ms609 Jun 26, 2024
c698a07
Def don't want show all leaks
ms609 Jun 26, 2024
cb2b0ab
--errors-for-leak-kinds=definite
ms609 Jun 26, 2024
a5db899
Merge branch 'master' into no-phangorn
ms609 Jun 26, 2024
a6a5326
rm comment
ms609 Jun 26, 2024
195a9cc
* rm PathVectorR
ms609 Jun 26, 2024
972cd3f
libicu66: obseleted?
ms609 Jun 26, 2024
7e6d04f
libcui66 BEFORE -dev?
ms609 Jun 26, 2024
4e99133
libicu66 REALLY first
ms609 Jun 26, 2024
d8c95b2
copyedit
ms609 Jun 26, 2024
88256d5
-libicu66
ms609 Jun 26, 2024
fef612e
-libcurl
ms609 Jun 26, 2024
cb1f931
ws
ms609 Jun 26, 2024
b21b663
Github package install
ms609 Jun 26, 2024
74c8342
20.04
ms609 Jun 26, 2024
eb0912d
Reinstall stringi
ms609 Jun 26, 2024
3c736ba
latest
ms609 Jun 26, 2024
a116271
TreeTools first?
ms609 Jun 27, 2024
f7cb75a
22.04?
ms609 Jun 27, 2024
c602a81
stringi after
ms609 Jun 27, 2024
60f20f9
-remove
ms609 Jun 27, 2024
946be07
must use 20.04
ms609 Jun 27, 2024
b1405c1
Revert "must use 20.04"
ms609 Jun 27, 2024
170d417
Try install from source
ms609 Jun 27, 2024
6cafded
extra-repos
ms609 Jun 27, 2024
578746c
Give up - use 20.04
ms609 Jun 27, 2024
0c09c0e
Rm github step
ms609 Jun 27, 2024
b290165
sequence
ms609 Jun 27, 2024
72ba050
Error for possible leaks
ms609 Jun 27, 2024
f05c971
Update NEWS.md
ms609 Jun 27, 2024
ed8866b
Merge branch 'master' into no-phangorn
ms609 Jun 27, 2024
76763e1
Revert "Error for possible leaks"
ms609 Jun 27, 2024
065ce39
-pathVector2
ms609 Jun 27, 2024
ffef11e
consistncy
ms609 Jun 27, 2024
ec724d3
Merge branch 'master' into spr-dist
ms609 Jun 27, 2024
bb8377a
Merge branch 'no-phangorn' into spr-dist
ms609 Jun 27, 2024
9d6452a
Create KMeansPP.Rd
ms609 Jun 27, 2024
5c9ea4d
rm phangorn use
ms609 Jun 27, 2024
e0c8706
reqs phangorn
ms609 Jun 27, 2024
6ac1a10
test l2cons
ms609 Jun 27, 2024
f080cb5
Merge branch 'master' into spr-dist
ms609 Jun 27, 2024
02b7a0f
xor_splits
ms609 Jun 27, 2024
e007cd2
restore skip
ms609 Jun 27, 2024
2666661
Reorder
ms609 Jun 27, 2024
73f008c
trust setup-r
ms609 Jun 27, 2024
fdd74c2
Merge branch 'master' into spr-dist
ms609 Jun 27, 2024
3b80618
""
ms609 Jun 28, 2024
9938aa1
ws
ms609 Jun 28, 2024
13f97cd
DeO
ms609 Jun 28, 2024
576e0a5
side by side
ms609 Jun 28, 2024
47f1a5f
Method choice
ms609 Jun 28, 2024
19747e9
de Olivieria method verified
ms609 Jun 28, 2024
ed9464d
Support spaces
ms609 Jun 28, 2024
4eca9a6
.9010
ms609 Jun 28, 2024
5e898a2
Merge branch 'main' into spr-dist
ms609 Jan 15, 2026
45d985e
Redocument
ms609 Jan 15, 2026
2ff68cf
Format; Reduce→ReduceTrees
ms609 Jan 15, 2026
9f59897
Merge branch 'main' into spr-dist
ms609 Feb 3, 2026
2b5d299
debug by option
ms609 Feb 3, 2026
f4de741
Take out divide and conquer component
ms609 Feb 3, 2026
7a88412
Just compare values
ms609 Feb 3, 2026
b16e5e1
unskip
ms609 Feb 3, 2026
ba9edc9
line fmt
ms609 Feb 3, 2026
f474ab8
`options` to debug
ms609 Feb 3, 2026
6f38810
Locked middle test
ms609 Feb 3, 2026
cbb961a
Update SPRDist.Rd
ms609 Feb 3, 2026
d535353
Notes
ms609 Feb 3, 2026
6a3c186
Counterexample
ms609 Feb 3, 2026
705f124
Tie-breaker
ms609 Feb 3, 2026
6db22be
arr.ind
ms609 Feb 3, 2026
92bc2bf
Explore an AMI approach
ms609 Feb 3, 2026
8d3b5ae
Choose best singleton
ms609 Feb 3, 2026
c8176c1
Explore other optimality criteria
ms609 Feb 3, 2026
5e0d383
Break ties
ms609 Feb 3, 2026
1944745
return
ms609 Feb 3, 2026
56aeeb5
A DeOliviera underestimate
ms609 Feb 3, 2026
4b02838
AMI gives promising results
ms609 Feb 3, 2026
a65b852
precompute Ntropy
ms609 Feb 3, 2026
72bd41e
faster emi calc
ms609 Feb 3, 2026
a323db5
Visualizations
ms609 Feb 4, 2026
13ba92b
Merge branch 'main' into spr-dist
ms609 Feb 4, 2026
dd14ff0
<.>ThreeDPlotServer
ms609 Feb 4, 2026
bbdf166
Empty doc
ms609 Feb 4, 2026
ece81fd
Merge branch 'main' into spr-dist
ms609 Feb 5, 2026
6c444d9
Toy with "rogue" approach
ms609 Feb 5, 2026
24c2925
Handle common splits
ms609 Feb 5, 2026
cea3871
Looking very promising
ms609 Feb 5, 2026
1fc057a
Update true-25tip-12spr.Rds
ms609 Feb 5, 2026
b7899ee
Tricky pair
ms609 Feb 6, 2026
5c1179e
Create true-32tip-16spr.Rds
ms609 Feb 6, 2026
4324ddd
Support other proxies and depth 2
ms609 Feb 6, 2026
6b83931
dropTions
ms609 Feb 6, 2026
d8e7ccc
sp
ms609 Feb 6, 2026
917f571
Early exit
ms609 Feb 6, 2026
32f93c3
ClusteringEntropy→C++
ms609 Feb 6, 2026
9155c36
Optimize
ms609 Feb 6, 2026
e643d86
informative name
ms609 Feb 7, 2026
ec8c714
Sequence
ms609 Feb 7, 2026
b4caee2
Shortcut on 4
ms609 Feb 7, 2026
f9efaeb
n=5 shaves off >10% cf n == 4
ms609 Feb 7, 2026
ee6168a
Work through permutations for 6-leaf pairs
ms609 Feb 7, 2026
4d03adf
All twos so far!
ms609 Feb 7, 2026
0a37799
Exhaustive check
ms609 Feb 7, 2026
660d79c
Exact solutions for 6 leaf pairs
ms609 Feb 7, 2026
e14135a
Fold out exact calcs
ms609 Feb 7, 2026
b48ffeb
First stab at lookup table for n = 7
ms609 Feb 9, 2026
da24455
7
ms609 Feb 9, 2026
3a580c2
Improve packing
ms609 Feb 9, 2026
9ea2824
Rcpp ftw
ms609 Feb 9, 2026
47e1133
Manual fix for pectinate read
ms609 Feb 9, 2026
b0c4f9a
Debugged
ms609 Feb 9, 2026
c697b37
ren
ms609 Feb 9, 2026
9c59f0a
mark 7
ms609 Feb 9, 2026
e7bea5c
Draft for pec
ms609 Feb 9, 2026
379f235
mid draft
ms609 Feb 9, 2026
ac82665
lookup8
ms609 Feb 9, 2026
30b16fe
Update spr-exact-8.R
ms609 Feb 9, 2026
f9bd89e
7ize
ms609 Feb 9, 2026
1d11b56
First shape for 9s
ms609 Feb 9, 2026
7a55973
Quick bash at incorporating 8-leaves
ms609 Feb 9, 2026
ecc9e6e
shape1
ms609 Feb 9, 2026
bd7519d
shape2
ms609 Feb 9, 2026
f0ff480
Correct shapes
ms609 Feb 9, 2026
0354c49
Require TreeTools 2.1.0
ms609 Feb 11, 2026
110976d
Merge branch 'main' into spr-dist
ms609 Feb 12, 2026
e5d4580
Minimal working(?) version of 'rogue' SPR distance
ms609 Feb 12, 2026
cc8077e
rm debugging
ms609 Feb 12, 2026
697b0c1
Comment out working
ms609 Feb 12, 2026
5970e72
keep_and_reroot() coverage
ms609 Feb 12, 2026
294213b
Create test-binary_entropy_counts.R
ms609 Feb 12, 2026
9dd0efb
Test ClusteringInfo.splits
ms609 Feb 12, 2026
adb9d06
Update checks from TreeTools
ms609 Feb 12, 2026
98f6177
mismatch size calculator for arm64
ms609 Feb 12, 2026
1eb95f7
link reference/index.html
ms609 Feb 12, 2026
432e76e
extra-packages: ms609/TreeDistData
ms609 Feb 12, 2026
6f1b19d
arm64-safe `confusion()`
ms609 Feb 12, 2026
34bfa61
Absolute link to reference
ms609 Feb 12, 2026
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
85 changes: 74 additions & 11 deletions .github/workflows/R-CMD-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- "**.git"
- "**.json"
- "**.md"
- "**.yaml"
- "**.yml"
- "!**R-CMD-check.yml"
- "**.R[dD]ata"
Expand All @@ -30,6 +31,7 @@ on:
- "**.git"
- "**.json"
- "**.md"
- "**.yaml"
- "**.yml"
- "!**R-CMD-check.yml"
- "**.R[dD]ata"
Expand All @@ -38,24 +40,66 @@ on:
name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
check-release:
runs-on: ubuntu-24.04
name: ubuntu-24.04 (release)

env:
_R_CHECK_CRAN_INCOMING_: true # Seemingly not set by --as-cran
_R_CHECK_FORCE_SUGGESTS_: false # CRAN settings
R_COMPILE_AND_INSTALL_PACKAGES: 'never'
_R_CHECK_THINGS_IN_CHECK_DIR_: false
R_REMOTES_STANDALONE: true
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: "https://packagemanager.posit.co/cran/__linux__/noble/latest"
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout git repo
uses: actions/checkout@v5

- name: Temporarily bump package version
run: |
old_version=$(grep "Version:" DESCRIPTION | awk '{print $2}')
if [[ $(echo "$old_version" | tr -cd '.' | wc -c) -eq 2 ]]; then
new_version="${old_version}.8888"
if [[ "$RUNNER_OS" == "macOS" ]]; then
sed -i "" "s/Version: .*/Version: ${new_version}/" DESCRIPTION
else
sed -i "s/Version: .*/Version: ${new_version}/" DESCRIPTION
fi
fi
shell: bash

- name: Set up R
uses: r-lib/actions/setup-r@v2

- name: Set up R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
ms609/TreeDistData
needs: |
check

- name: Check package
uses: r-lib/actions/check-r-package@v2


check-all:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: macos-15-intel, r: 'release'} # Until Intel architecture retired 2027-11
- {os: ubuntu-22.04, r: '4.1',
rspm: "https://packagemanager.posit.co/cran/__linux__/jammy/latest"}
- {os: ubuntu-24.04-arm, r: "release",
rspm: "https://packagemanager.posit.co/cran/__linux__/noble/latest"}
- {os: ubuntu-latest, r: 'devel',
rspm: "https://packagemanager.posit.co/cran/__linux__/noble/latest"}
- {os: windows-latest, r: "release"}
- {os: macos-15-intel, r: "release"} # Until Intel architecture retired 2027-11
- {os: macOS-latest, r: "release"}
- {os: ubuntu-22.04, r: '4.1', rspm: "https://packagemanager.posit.co/cran/__linux__/jammy/latest"}
- {os: ubuntu-24.04-arm, r: "release", rspm: "https://packagemanager.posit.co/cran/__linux__/noble/latest"}
- {os: ubuntu-24.04, r: "devel", rspm: "https://packagemanager.posit.co/cran/__linux__/noble/latest"}

env:
_R_CHECK_CRAN_INCOMING_: ${{ github.event_name == 'pull_request' }}
Expand All @@ -64,6 +108,7 @@ jobs:
_R_CHECK_THINGS_IN_CHECK_DIR_: false
R_REMOTES_STANDALONE: true
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
R_REALLY_FORCE_SYMBOLS: true # Until R4.3
RSPM: ${{ matrix.config.rspm }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -164,3 +209,21 @@ jobs:
state: 'open'
});
}
rev-dep-check:
runs-on: ubuntu-latest
needs: check-release

name: revdepcheck

env:
R_COMPILE_AND_INSTALL_PACKAGES: 'never'
R_REMOTES_STANDALONE: true
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: ms609/actions/revdepcheck@main
with:
deps: ${{ matrix.config.deps }}
extra-packages: ms609/TreeDistData
11 changes: 2 additions & 9 deletions .github/workflows/revdepcheck.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
# Now integrated into R CMD check.yml.
name: rev-dep-check

on:
workflow_dispatch:
workflow_run:
workflows: ["R-CMD-check"]
types:
- completed
push:
paths: "**revdepcheck.yml"
pull_request:
paths: "**revdepcheck.yml"

jobs:
mem-check:
runs-on: ubuntu-latest

name: revdepcheck
name: revdepcheck (manual)

env:
R_COMPILE_AND_INSTALL_PACKAGES: 'never'
Expand Down
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: TreeDist
Type: Package
Title: Calculate and Map Distances Between Phylogenetic Trees
Version: 2.11.1.9001
Version: 2.12.0
Authors@R: c(person("Martin R.", "Smith",
email = "martin.smith@durham.ac.uk",
role = c("aut", "cre", "cph", "prg"),
Expand Down Expand Up @@ -50,7 +50,7 @@ Imports:
Rdpack (>= 0.7),
shiny,
shinyjs,
TreeTools (>= 2.0.0.9004),
TreeTools (>= 2.1.0),
Suggests:
bookdown,
cluster,
Expand All @@ -71,6 +71,7 @@ Suggests:
rgl,
Rogue,
spelling,
TBRDist,
testthat (>= 3.0),
Ternary (>= 1.1.2),
TreeDistData (> 0.1.0),
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export(is.HPart)
importFrom(Rdpack,reprompt)
importFrom(TreeTools,AllAncestors)
importFrom(TreeTools,DropTip)
importFrom(TreeTools,FirstMatchingSplit)
importFrom(TreeTools,KeepTip)
importFrom(TreeTools,KeepTipPostorder)
importFrom(TreeTools,LnRooted.int)
Expand Down
14 changes: 8 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# TreeDist 2.11.1.9001 (2026-02-05)

- Support larger trees by updating some functions to use 32-bit integers, per TreeTools v2.1.0.


# TreeDist 2.11.1.9000 (2025-11-13)
# TreeDist 2.12.0 (2026-02-12)

- Support larger trees in some functions by updating some functions to use
32-bit integers, per TreeTools v2.1.0.

- `AHMI()` now returns negative values (previously zeroed in error).

- Experimental support for a new method of SPR distance calculation:
subject to change or removal.


# TreeDist 2.11.1 (2025-10-13)

- Improve robustness of `SpectralEigens()` tests.
Expand Down
12 changes: 12 additions & 0 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

binary_entropy_counts <- function(inSplit, nLeaves) {
.Call(`_TreeDist_binary_entropy_counts`, inSplit, nLeaves)
}

COMCLUST <- function(trees) {
.Call(`_TreeDist_COMCLUST`, trees)
}
Expand Down Expand Up @@ -58,6 +62,10 @@ entropy_int <- function(n) {
.Call(`_TreeDist_entropy_int`, n)
}

expected_mi <- function(ni, nj) {
.Call(`_TreeDist_expected_mi`, ni, nj)
}

lapjv <- function(x, maxX) {
.Call(`_TreeDist_lapjv`, x, maxX)
}
Expand Down Expand Up @@ -102,6 +110,10 @@ keep_and_reduce <- function(tree1, tree2, keep) {
.Call(`_TreeDist_keep_and_reduce`, tree1, tree2, keep)
}

spr_table_7 <- function(sp1, sp2) {
.Call(`_TreeDist_spr_table_7`, sp1, sp2)
}

cpp_robinson_foulds_distance <- function(x, y, nTip) {
.Call(`_TreeDist_cpp_robinson_foulds_distance`, x, y, nTip)
}
Expand Down
Loading
Loading