Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5f44b9f
Require R3.6
ms609 Aug 26, 2024
2d53412
dataset via ReadCharacters()
ms609 Aug 26, 2024
3c3d41f
Still use RNGVersion
ms609 Aug 26, 2024
b490599
ignore phangorn
ms609 Aug 26, 2024
6f7c21e
phangorn@2.7.1
ms609 Aug 26, 2024
96c130b
pandoc v2
ms609 Aug 26, 2024
0e8cbfb
rm dead link
ms609 Aug 26, 2024
77dd2a9
\r\n
ms609 Aug 26, 2024
88c1477
Rfast@2.0.8
ms609 Aug 26, 2024
522d02b
Try RFast 1.9.8
ms609 Aug 26, 2024
269e2f5
Crass manual implementation of palette.cols
ms609 Aug 26, 2024
9d41322
Alphabet
ms609 Aug 26, 2024
e93926d
dx.doi
ms609 Aug 26, 2024
d939c4b
RNGversion("3.6.0")
ms609 Aug 26, 2024
e81d385
RNGVersion unnecessary
ms609 Aug 26, 2024
a1a78f6
suppressWarnings(RNGversion("3.5.0"))
ms609 Aug 26, 2024
72ec9d0
{}
ms609 Aug 26, 2024
64c76c6
RNGversion
ms609 Aug 30, 2024
52603ee
[]
ms609 Aug 30, 2024
dc0d8de
unset originalIndex attribute
ms609 Sep 5, 2024
a35fde7
brio 1.1.3 now available
ms609 Sep 5, 2024
f72f53c
Bump version to .9001
ms609 Oct 11, 2024
87f2c7e
Merge branch 'master' into ordered-chars
ms609 Oct 11, 2024
9f739a4
Create update-csl.yml
ms609 Oct 31, 2024
11cbe59
bump version number
ms609 Dec 12, 2024
4adbc16
Fixed package versions
ms609 Dec 12, 2024
efa0141
waldo, testthat
ms609 Dec 12, 2024
af8c7fb
vdiff, cpp, httr versions
ms609 Dec 12, 2024
177ddf1
Merge branch 'master' into ordered-chars
ms609 Feb 5, 2025
0b26021
bench@1.1.3
ms609 Feb 6, 2025
0ae1e36
.9005
ms609 Feb 6, 2025
5f82681
Merge branch 'master' into ordered-chars
ms609 Feb 6, 2025
63e38d0
Require R4.0
ms609 Feb 6, 2025
c74e053
Rm RNGversion("3.5.0")
ms609 Feb 6, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '4.1', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} # Until TreeDist can slough phangorn
#- {os: ubuntu-20.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
if: runner.os == 'macOS'
run: |
brew install libgit2 xquartz ghostscript

- name: Set up R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gcc-ASAN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:

- name: Setup pandoc
if: ${{ matrix.config.test }} == 'vignettes'
uses: r-lib/actions/setup-pandoc@master
uses: r-lib/actions/setup-pandoc@v2

- name: Query dependencies
run: |
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/update-csl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update CSL file
on:
schedule:
- cron: '0 0 * * 1' # Runs weekly on Monday at 00:00 UTC
workflow_dispatch: # Allows manual triggering

jobs:
update-csl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Download latest CSL file
run: |
curl -o inst/apa-old-doi-prefix.csl https://raw.githubusercontent.com/citation-style-language/styles/master/apa-old-doi-prefix.csl

- name: Check for changes
id: changes
run: |
if git diff --quiet; then
echo "No changes to commit"
exit 0
fi

- name: Commit and push if changed
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git add inst/apa-old-doi-prefix.csl
git commit -m "Update CSL file from upstream"
git push
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: TreeSearch
Title: Phylogenetic Analysis with Discrete Character Data
Version: 1.5.1.9003
Version: 1.5.1.9005
Authors@R: c(
person(
"Martin R.", 'Smith',
Expand Down Expand Up @@ -32,7 +32,7 @@ Description: Reconstruct phylogenetic trees from discrete data.
URL: https://ms609.github.io/TreeSearch/ (doc),
https://github.com/ms609/TreeSearch/ (devel)
BugReports: https://github.com/ms609/TreeSearch/issues/
Depends: R (>= 3.5.0)
Depends: R (>= 4.0)
Imports:
ape (>= 5.6),
cli (>= 3.0),
Expand Down
11 changes: 9 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# TreeSearch 1.5.1.9005 (2025-02)

- Support for ordered (additive) characters
- Require R 4.0 (to simplify maintenance)

# TreeSearch 1.5.1.9003 (2025-02)

- Improve support for constraints in `AdditionTree()`
Expand All @@ -7,12 +12,14 @@

- Buttons to download consensus trees in app


# TreeSearch 1.5.1.9001 (2024-12)

- Fix display of state labels in app
- Fix SPR behaviour when move is close to root

# TreeSearch 1.5.1.9000 (2024-10)

- Fix display of state labels in app


# TreeSearch 1.5.1 (2024-05-23)

Expand Down
1 change: 1 addition & 0 deletions R/AdditionTree.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ AdditionTree <- function (dataset, concavity = Inf, constraint, sequence) {
attr(dataset, "info.amounts") <- NULL
attr(dataset, "min.length") <- NULL
attr(dataset, "informative") <- NULL
attr(dataset, "originalIndex") <- NULL

# Starting tree, rooted on first element in sequence
tree <- PectinateTree(sequence[1:3])
Expand Down
8 changes: 6 additions & 2 deletions R/NNI.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ NNI <- function (tree, edgeToBreak = NULL) {
#' @export
cNNI <- function (tree, edgeToBreak = NULL, whichSwitch = NULL) {
edge <- tree[["edge"]]
if (is.null(edgeToBreak)) edgeToBreak <- sample.int(dim(edge)[1] - NTip(tree) - 1L, 1L)
if (is.null(whichSwitch)) whichSwitch <- sample.int(2L, 1L)
if (is.null(edgeToBreak)) {
edgeToBreak <- sample.int(dim(edge)[[1]] - NTip(tree) - 1L, 1L)
}
if (is.null(whichSwitch)) {
whichSwitch <- sample.int(2L, 1L)
}
tree[["edge"]] <- nni(edge, edgeToBreak, whichSwitch)

# Return:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Brazeau, M. D., Guillerme, T. and Smith, M. R. (2019).
Faith D. P., Trueman J. W. H. (2001).
Towards an inclusive philosophy for phylogenetic inference.
Systematic Biology, 50(3), 331–350.
doi: [10.1080/10635150118627](https://doi.org/10.1080/10635150118627).
doi: [10.1080/10635150118627](https://dx.doi.org/10.1080/10635150118627).

Farris, J. S. (1969). A successive approximations approach to character weighting.
Systematic Biology, 18(4), 374–385.
Expand Down
8 changes: 4 additions & 4 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"codeRepository": "https://github.com/ms609/TreeSearch/",
"issueTracker": "https://github.com/ms609/TreeSearch/issues/",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "1.5.1.9002",
"version": "1.5.1",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.4.2 (2024-10-31)",
"runtimePlatform": "R version 4.4.0 (2024-04-24)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -380,7 +380,7 @@
},
"SystemRequirements": "C++17"
},
"fileSize": "4469.809KB",
"fileSize": "4467.376KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down Expand Up @@ -452,7 +452,7 @@
],
"name": "{TreeSearch}: phylogenetic analysis with discrete character data",
"identifier": "10.5281/zenodo.1042590",
"description": "R package version 1.5.1.9002",
"description": "R package version 1.5.1",
"@id": "https://doi.org/10.5281/zenodo.1042590",
"sameAs": "https://doi.org/10.5281/zenodo.1042590"
},
Expand Down
1 change: 1 addition & 0 deletions man-roxygen/datasetParam.r
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#' @param dataset A phylogenetic data matrix of \pkg{phangorn} class
#' \code{phyDat}, whose names correspond to the labels of any accompanying tree.
#' Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.
# Defined in TreeTools. Please propagate any changes there.
3 changes: 2 additions & 1 deletion man/AdditionTree.Rd

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

3 changes: 2 additions & 1 deletion man/CharacterLength.Rd

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

3 changes: 2 additions & 1 deletion man/ConcordantInformation.Rd

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

3 changes: 2 additions & 1 deletion man/Consistency.Rd

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

3 changes: 2 additions & 1 deletion man/MaximizeParsimony.Rd

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

3 changes: 2 additions & 1 deletion man/PlotCharacter.Rd

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

3 changes: 2 additions & 1 deletion man/SuccessiveApproximations.Rd

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

3 changes: 2 additions & 1 deletion man/TaxonInfluence.Rd

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

3 changes: 2 additions & 1 deletion man/TreeLength.Rd

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

3 changes: 2 additions & 1 deletion man/TreeSearch.Rd

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

4 changes: 2 additions & 2 deletions tests/testthat/test-CustomSearch.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RootySwappers <- list(RootedTBRSwap, RootedSPRSwap, RootedNNISwap)
test_that("Tree can be found", {
skip_if_not_installed("phangorn")
phy11 <- phangorn::phyDat(data11, type = "USER", levels = c(FALSE, TRUE))
suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0
RNGkind("Mersenne-Twister")
set.seed(1)
random11 <- as.phylo(17905853L, 11, letters[1:11])
expect_error(TreeSearch(unrooted11, dataset = phy11))
Expand Down Expand Up @@ -110,7 +110,7 @@ test_that("Profile parsimony works in tree search", {
dataset <- TreeTools::PhyDat(sillyData)
readyData <- PrepareDataProfile(dataset)

suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0
RNGkind("Mersenne-Twister")
set.seed(0)

rTree <- randomTree <- RandomTree(dataset, "1")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-Jackknife.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test_that("Jackknife supports are correct", {
expect_error(Jackknife(start_tree, dataset, resampleFreq = 0))
expect_error(Jackknife(start_tree, dataset, resampleFreq = 9/10))

suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0
suppressWarnings(RNGversion("3.5.0"))
set.seed(0)

strict <- TreeSearch(start_tree, dataset, verbosity = 0)
Expand Down
3 changes: 0 additions & 3 deletions tests/testthat/test-pp-random-tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ test_that("four-tip trees are randomly distributed", {
})

test_that("four-tip trees are randomly scored", {
suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0
set.seed(0)

nTrees <- 6000
Expand All @@ -57,7 +56,6 @@ test_that("four-tip trees are randomly scored", {
})

test_that("five-tip trees are randomly scored", {
suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0
set.seed(0)
nTrees <- 6000
stringency <- 0.005
Expand All @@ -75,7 +73,6 @@ test_that("five-tip trees are randomly scored", {


test_that("six-tip trees are randomly scored", {
suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0
set.seed(0)

nTrees <- 6000
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-zzz-tree-rearrange.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test_that("NNI works", {
Test(2, 0, 3, 9)
Test(2, 1, 8, 9)

suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0
suppressWarnings(RNGversion("3.5.0"))
set.seed(0)
nniComb <- NNI(trComb)
expect_equal(nniComb$tip.label, trComb$tip.label)
Expand All @@ -57,7 +57,7 @@ test_that("NNI works", {

test_that("SPR works", {
testTree <- Preorder(root(BalancedTree(7), 1, resolve.root = TRUE))
edge <- testTree$edge
edge <- testTree[["edge"]]
expect_equal(spr(edge, 66), cSPR(testTree, 66)$edge)

Test <- function (m, p1, r1) {
Expand Down Expand Up @@ -243,7 +243,7 @@ CheckTreeSanity <- function (tree) {
info=paste0("Root is numbered ", min(parent), "; expecting ", nTip + 1)
)
expect_false(min(parent) %in% child,
info=paste0("Root node (", min(parent), ") is child of edge ", paste0(which(min(parent) == child), collapse=', '))
info=paste0("Root node (", min(parent), ") is child of edge ", paste0(which(min(parent) == child), collapse = ", "))
)
expect_true(all(seq_len(nTip) %in% child)) # No missing tips
expect_equal(max(parent), nTip + nNode)
Expand All @@ -252,7 +252,7 @@ CheckTreeSanity <- function (tree) {
expect_true(all(child[!tips] > parent[!tips]), info="Parent nodes must be > child nodes")
}

suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0
suppressWarnings(RNGversion("3.5.0"))
set.seed(0)
small_tree <- rtree(8)
large_tree <- rtree(80)
Expand Down
2 changes: 1 addition & 1 deletion vignettes/getting-started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ datasets.
### Simple installation

To use "TreeSearch" you will first need to [install R](
https://CRAN.R-project.org/).
https://CRAN.R-project.org/).
[RStudio](https://posit.co/) is a popular front-end that makes several of R's
features easier to use.

Expand Down
4 changes: 2 additions & 2 deletions vignettes/profile.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ library("TreeSearch")

In order to reproduce the random elements of this document, set a random seed:

```{R rng-version}
```{R rng-version, warn = FALSE}
# Set a random seed so that random functions in this document are reproducible
suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0
RNGversion("3.5.0")
set.seed(888)
```

Expand Down
4 changes: 2 additions & 2 deletions vignettes/tree-search.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ escape from local optima.
vinther <- TreeSearch::inapplicable.phyData[["Vinther2008"]]
```

```{R RNG-version}
```{R RNG-version, warn = FALSE}
# Set a random seed so that random functions in this document are reproducible
suppressWarnings(RNGversion("3.5.0")) # Until we require R v3.6.0
RNGversion("3.5.0")
set.seed(0)
```

Expand Down
Loading