Skip to content

Commit 752f516

Browse files
authored
v0.17.0: splintering and migration of specialized functionalities to new packages (#218)
* some new features, e.g. traversal routines, getting node heights, check for time-consistency * internal field names modified * many function names were modified: older exported names are deprecated * new packages: SNaQ.jl, PhyloTraits, PhyLiNC. * function to search for most parsimony network left in (not exported), but not working (was limited to level-1 networks) * nj: swap in-place instead of taking views (which became slow under julia v1.11) --------- Co-authored-by: Josh Justison, Jingcheng Xu, Claudia Solis-Lemus, Paul Bastide
1 parent be61ecb commit 752f516

File tree

163 files changed

+7309
-33224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+7309
-33224
lines changed

.github/dependabot.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- master
1010
tags: ['*']
11+
workflow_dispatch:
1112

1213
concurrency:
1314
# Skip intermediate builds: always.
@@ -40,7 +41,7 @@ jobs:
4041
- uses: julia-actions/julia-buildpkg@v1
4142
- uses: julia-actions/julia-runtest@v1
4243
- uses: julia-actions/julia-processcoverage@v1
43-
- uses: codecov/codecov-action@v4
44+
- uses: codecov/codecov-action@v5
4445
with:
4546
files: lcov.info
4647
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/documentation.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- master
77
tags: '*'
88
pull_request:
9+
workflow_dispatch:
910

1011
jobs:
1112
Documenter:

CITATION.bib

+11-32
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,7 @@ @article{2017SolislemusBastideAne_PhyloNetworks
99
pages = {3292-3298},
1010
doi = {10.1093/molbev/msx235},
1111
}
12-
13-
% paper on the SNaQ method
14-
@article{2016SolislemusAne_SNaQ,
15-
author = {Sol{\'\i}s-Lemus, Claudia and An{\'e}, C{\'e}cile},
16-
title = {Inferring Phylogenetic Networks with Maximum Pseudolikelihood under Incomplete Lineage Sorting},
17-
journal = {PLOS Genetics},
18-
year = {2016},
19-
volume = {12},
20-
number = {3},
21-
pages = {1-21},
22-
doi = {10.1371/journal.pgen.1005896},
23-
}
24-
% paper on phylogenetic comparative methods for continuous traits on networks
25-
@article{2018Bastide_continuoustraitevolution,
26-
author = {Bastide, Paul and Sol{\'\i}s-Lemus, Claudia and Kriebel, Ricardo and William Sparks, K and An{\'e}, C{\'e}cile},
27-
title = {Phylogenetic Comparative Methods on Phylogenetic Networks with Reticulations},
28-
journal = {Systematic Biology},
29-
year = {2018},
30-
volume = {67},
31-
number = {5},
32-
pages = {800-820},
33-
doi = {10.1093/sysbio/syy033},
34-
}
35-
% paper on phylogenetic comparative methods for discrete traits on networks
12+
% paper describing network calibration, based on genetic distances estimated from gene trees
3613
@article{2020Karimi_baobab_discretetraitevolution,
3714
author = {Karimi, Nisa and Grover, Corrinne E and Gallagher, Joseph P and Wendel, Jonathan F and An{\'e}, C{\'e}cile and Baum, David A},
3815
title = {Reticulate Evolution Helps Explain Apparent Homoplasy in Floral Biology and Pollination in Baobabs (\textit{{Adansonia}}; {Bombacoideae}; {Malvaceae})},
@@ -43,12 +20,14 @@ @article{2020Karimi_baobab_discretetraitevolution
4320
pages = {462-478},
4421
doi = {10.1093/sysbio/syz073},
4522
}
46-
% paper on continuous traits with intraspecific variation
47-
@article{2022Teo_intraspeciesvariation,
48-
author = {Teo, Benjamin and Rose, Jeffrey P. and Bastide, Paul and An{\'e}, C{\'e}cile},
49-
title = {Accounting for intraspecific variation in continuous trait evolution on a reticulate phylogeny},
50-
journal = {bioRxiv},
51-
year = {2022},
52-
doi = {10.1101/2022.05.12.490814},
53-
publisher = {Cold Spring Harbor Laboratory},
23+
% dissertation describing semidirected NNI (nearest neighbor interchange)
24+
% to modify a semidirected network: in Chapter 4
25+
@phdthesis{2020AllenSavietta-Ane,
26+
author = {Allen-Savietta, Cora},
27+
title = {Estimating Phylogenetic Networks from Concatenated Sequence Alignments},
28+
school = {The University of Wisconsin - Madison},
29+
year = 2020,
30+
note = {Ph.D. dissertation, advised by Cécile Ané, ProQuest Dissertations & Theses 28263540},
31+
url = {https://www.proquest.com/docview/2476856270/},
32+
pages = 165,
5433
}

CONTRIBUTING.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,29 @@ The following guidelines are designed for contributors of `PhyloNetworks`.
44

55
## Reporting Issues and Questions
66

7-
For reporting a bug, a failed function or requesting a new feature, you can simply open an issue in [the issue tracker](https://github.com/juliaphylo/PhyloNetworks.jl/issues).
8-
First, seach through existing issues (open or closed) that might have the answer to your question.
7+
For reporting a bug, a failed function or requesting a new feature,
8+
please open an issue in [the issue tracker](https://github.com/juliaphylo/PhyloNetworks.jl/issues).
9+
First, search through existing issues (open or closed) that might have the answer to your question.
910
If you are reporting a bug, please also include a minimal code example or all relevant information for us to replicate the issue.
1011

1112
For general questions, make sure to check out the [google user group](https://groups.google.com/g/phylonetworks-users). If you cannot find answers to your question, please post a new question. We do our best to reply in a timely fashion, but we are undermanned so we appreciate your patience.
1213

1314
## Contributing Code
1415

15-
To make contributions to `PhyloNetworks`, you need to set up your [GitHub](https://github.com/) account (if you do not have one) and request your change(s) or contribution(s) via a pull request against the `master` branch of `PhyloNetworks` from a non-master branch in your fork.
16+
To make contributions to `PhyloNetworks`, you need to set up a [GitHub](https://github.com/) account (if you do not have one) and request your change(s) or contribution(s) via a pull request against the `master` branch of `PhyloNetworks` from a non-master branch in your fork.
1617
Using a non-master branch on your end will give developers push access to your
1718
branch to make edits to it (in case we want to work collaboratively on the new code).
1819

1920
Please use the following steps:
2021

2122
1. Fork the `PhyloNetworks` repository to your GitHub account
2223
2. Clone your fork locally with `git clone`
23-
3. Create a new branch with a name that describes your contribution. For example, if your contribution is fixing a bug in `readTopology`, your new branch can be named `fix-bug-readTopology`. You can create it and switch with:
24+
3. Create a new branch with a name that describes your contribution.
25+
For example, if your contribution is fixing a bug in `readnewick`,
26+
your new branch can be named `fix-bug-readnewick`.
27+
You can create it and switch with:
2428
```
25-
git checkout -b fix-bug-readTopology
29+
git checkout -b fix-bug-readnewick
2630
```
2731
4. Make your changes on this new branch.
2832
Write a [docstring](https://docs.julialang.org/en/v1/manual/documentation/)
@@ -32,7 +36,7 @@ Please use the following steps:
3236
5. Push your changes to your fork
3337
6. [Submit a pull request](https://github.com/juliaphylo/PhyloNetworks.jl/pulls) against the `master` branch in `PhyloNetworks`. Make sure that your code passes all the automatic tests and that it is not in conflict with the current status of `master`
3438

35-
Please make sure to follow the Julia package guidelines and conventions on your code. `PhyloNetworks` was created before these conventions were catalyzed, but we are attempting to follow them going forward.
39+
Please make sure to follow the Julia package guidelines and conventions on your code. `PhyloNetworks` was created before these conventions were catalyzed, but we are attempting to follow them going forward.
3640

3741
To learn more about the Julia conventions, check out the following links:
3842

LICENSE.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
The PhyloNetworks.jl package is licensed under the MIT "Expat" License:
2-
3-
> Copyright (c) 2014-2018: Claudia Solis-Lemus and Cecile Ane.
4-
>
5-
> Permission is hereby granted, free of charge, to any person obtaining a copy
6-
> of this software and associated documentation files (the "Software"), to deal
7-
> in the Software without restriction, including without limitation the rights
8-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
> copies of the Software, and to permit persons to whom the Software is
10-
> furnished to do so, subject to the following conditions:
11-
>
12-
> The above copyright notice and this permission notice shall be included in all
13-
> copies or substantial portions of the Software.
14-
>
15-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
> SOFTWARE.
22-
>
1+
The PhyloNetworks.jl package is licensed under the MIT "Expat" License:
2+
3+
> Copyright (c) 2014-2018: Claudia Solis-Lemus and Cecile Ane.
4+
>
5+
> Permission is hereby granted, free of charge, to any person obtaining a copy
6+
> of this software and associated documentation files (the "Software"), to deal
7+
> in the Software without restriction, including without limitation the rights
8+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
> copies of the Software, and to permit persons to whom the Software is
10+
> furnished to do so, subject to the following conditions:
11+
>
12+
> The above copyright notice and this permission notice shall be included in all
13+
> copies or substantial portions of the Software.
14+
>
15+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
> SOFTWARE.
22+
>

Project.toml

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PhyloNetworks"
22
uuid = "33ad39ac-ed31-50eb-9b15-43d0656eaa72"
33
license = "MIT"
4-
version = "0.16.4"
4+
version = "0.17.0"
55

66
[deps]
77
BioSequences = "7e6ae17a-c86d-528c-b3b9-7f778a29fe59"
@@ -15,16 +15,12 @@ Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
1515
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
1616
FASTX = "c2308a5c-f048-11e8-3e8a-31650f418d12"
1717
Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196"
18-
GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a"
1918
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
2019
NLopt = "76087f3c-5699-56af-9a33-bf431cd00edd"
2120
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
2221
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
23-
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
2422
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2523
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
26-
StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
27-
StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"
2824

2925
[compat]
3026
BioSequences = "2.0, 3"
@@ -35,17 +31,14 @@ DataFrames = "1.3"
3531
DataStructures = "0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18"
3632
Distributions = "0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25"
3733
FASTX = "1.1, 2"
38-
Functors = "0.2, 0.3, 0.4"
39-
GLM = "1.1, 1.2, 1.3, 1.4"
34+
Functors = "0.2, 0.3, 0.4, 0.5"
4035
NLopt = "0.5.1, 0.6, 1"
41-
StaticArrays = "0.8.3, 0.9, 0.10, 0.11, 0.12, 1.0"
4236
StatsBase = "0.26, 0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34"
43-
StatsFuns = "0.7, 0.8, 0.9, 1"
44-
StatsModels = "0.6, 0.7"
45-
julia = "1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7"
37+
julia = "1.5, 1.6, 1.7"
4638

4739
[extras]
4840
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
41+
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
4942

5043
[targets]
51-
test = ["Test"]
44+
test = ["Test", "StableRNGs"]

README.md

+45-66
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# PhyloNetworks: analysis for phylogenetic networks <img src="docs/src/logo_text.png" align=right>
2-
31
[![doc stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaphylo.github.io/PhyloNetworks.jl/stable)
42
[![doc dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaphylo.github.io/PhyloNetworks.jl/dev)
53
[![Build status](https://github.com/juliaphylo/PhyloNetworks.jl/workflows/CI/badge.svg?branch=master)](https://github.com/juliaphylo/PhyloNetworks.jl/actions/workflows/ci.yml)
@@ -8,88 +6,69 @@
86
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
97
[![PkgEval](https://JuliaCI.github.io/NanosoldierReports/pkgeval_badges/P/PhyloNetworks.svg)](https://JuliaCI.github.io/NanosoldierReports/pkgeval_badges/report.html)
108

9+
<div align="right">
10+
11+
![logo dark](docs/src/logo_text_darkmode.png#gh-dark-mode-only)
12+
![logo light](docs/src/logo_text.png#gh-light-mode-only)
13+
14+
</div>
15+
1116
## Overview
1217

13-
PhyloNetworks is a [Julia](http://julialang.org) package with utilities to:
14-
- read / write phylogenetic trees and networks,
15-
in (extended) Newick format.
16-
Networks are considered explicit: nodes represent ancestral species.
17-
They can be rooted or unrooted.
18+
PhyloNetworks is a [Julia](http://julialang.org) package with utilities to
19+
to handle phylogenetic trees and networks.
20+
It serves as a core package that other packages can depend on, such as
21+
[PhyloPlots](https://github.com/JuliaPhylo/PhyloPlots.jl)
22+
to visualize phylogenies,
23+
[SNaQ](https://github.com/JuliaPhylo/PhyloPlots.jl)
24+
to infer phylogenies from genetic data,
25+
[PhyloTraits](https://github.com/JuliaPhylo/PhyloTraits.jl)
26+
to analyze the evolution of traits along phylogenies.
27+
28+
Phylogenetic networks represent the evolutionary relationships between a set
29+
of organisms, e.g. populations, species, languages, cultures etc.
30+
They are also called *admixture graphs* when their leaves are populations
31+
of the same or closely related species.
32+
They are *explicit* graph representations, in which nodes represent
33+
ancestral populations / species, and edge lengths represent evolutionary time.
34+
35+
Utilities in this core package include:
36+
- read / write phylogenies in (extended) Newick format
1837
- manipulate networks: re-root, prune taxa, remove hybrid edges,
38+
transform a network with a semidirected nearest-neighbor interchange (sNNI),
1939
extract the major tree from a network, extract displayed networks / trees
20-
- compare networks / trees with dissimilarity measures
21-
(Robinson-Foulds distance on trees)
22-
- summarize samples of bootstrap networks (or trees)
23-
with edge and node support
24-
- estimate species networks from multilocus data: SNaQ
25-
- phylogenetic comparative methods for continuous trait evolution
26-
on species networks / trees
27-
- plot networks (and trees), via the companion package
28-
[PhyloPlots](https://github.com/juliaphylo/PhyloPlots.jl)
40+
- compare networks with dissimilarity measures
41+
(e.g. the Robinson-Foulds distance on trees)
42+
- summarize samples of networks with support for local features
43+
(edges and clades of hybrid origin or sister to a hybrid clade)
44+
- fit edges lengths from average pairwise distances between leaves,
45+
using least-squares
46+
- network traversal routines
2947

3048
To get help, check
3149

3250
- the [latest documentation](https://juliaphylo.github.io/PhyloNetworks.jl/dev)
33-
- the [wiki](https://github.com/juliaphylo/PhyloNetworks.jl/wiki) for a step-by-step tutorial
34-
with background on networks (last revised 2022)
51+
- the [wiki](https://github.com/juliaphylo/PhyloNetworks.jl/wiki) for a
52+
step-by-step tutorial with background on networks (last revised 2022)
3553
- [tutorial](https://cecileane.github.io/networkPCM-workshop/) for
3654
comparative methods, including network calibration (2023 workshop)
3755
- the [google group](https://groups.google.com/forum/#!forum/phylonetworks-users)
3856
for common questions. Join the group to post/email your questions,
3957
or to receive information on new versions, bugs fixed, etc.
4058

41-
If you use the package, please cite ([bibtex format here](CITATION.bib))
59+
If you use the package, please cite ([bibtex format here](CITATION.bib)).
60+
For the PhyloNetworks package in particular, please cite:
4261

4362
- Claudia Sol&iacute;s-Lemus, Paul Bastide and C&eacute;cile An&eacute; (2017).
4463
PhyloNetworks: a package for phylogenetic networks.
4564
[Molecular Biology and Evolution](https://academic.oup.com/mbe/article/doi/10.1093/molbev/msx235/4103410/PhyloNetworks-a-package-for-phylogenetic-networks?guestAccessKey=230afceb-df28-4160-832d-aa7c73f86369)
4665
34(12):3292–3298.
4766
[doi:10.1093/molbev/msx235](https://doi.org/10.1093/molbev/msx235)
4867

49-
## Maximum pseudolikelihood estimation of species network: SNaQ <img src="docs/src/snaq.png" align=right title="SNaQ logo" width=262.5 height=111>
50-
<!-- ![SNaQ logo](http://pages.stat.wisc.edu/~claudia/Images/snaq.png)
51-
original size: 525px × 222px-->
52-
53-
SNaQ implements the statistical inference method in Sol&iacute;s-Lemus and An&eacute;
54-
[(2016)](http://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1005896).
55-
The procedure involves a
56-
numerical optimization of branch lengths and inheritance probabilities
57-
and a heuristic search in the space of phylogenetic
58-
networks.
59-
60-
If you use SNaQ, please cite
61-
62-
- Claudia Sol&iacute;s-Lemus and C&eacute;cile An&eacute; (2016).
63-
Inferring Phylogenetic Networks with Maximum Pseudolikelihood under Incomplete Lineage Sorting.
64-
[PLoS Genet](http://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1005896)
65-
12(3):e1005896.
66-
[doi:10.1371/journal.pgen.1005896](https://doi.org/10.1371/journal.pgen.1005896)
67-
68-
## Phylogenetic comparative methods for trait evolution
69-
70-
For continuous traits, study based on the Brownian motion process,
71-
with or without transgressive evolution after reticulations:
72-
73-
- Bastide, Solís-Lemus, Kriebel, Sparks, Ané (2018).
74-
Phylogenetic Comparative Methods for Phylogenetic Networks with Reticulations.
75-
Systematic Biology, 67(5):800–820.
76-
[doi:10.1093/sysbio/syy033](https://doi.org/10.1093/sysbio/syy033).
77-
SI on [dryad](http://dx.doi.org/10.5061/dryad.nt2g6)
78-
including a tutorial for trait evolution
79-
and a tutorial for network calibration.
80-
81-
Continuous traits, accounting for within-species variation:
82-
83-
- Benjamin Teo, Jeffrey P. Rose, Paul Bastide & Cécile Ané (2022).
84-
Accounting for intraspecific variation in continuous trait evolution
85-
on a reticulate phylogeny.
86-
[bioRxiv](https://doi.org/10.1101/2022.05.12.490814)
87-
88-
For a discrete trait (influence of gene flow on the trait,
89-
ancestral state reconstruction, rates):
90-
91-
- Karimi, Grover, Gallagher, Wendel, Ané & Baum (2020). Reticulate evolution
92-
helps explain apparent homoplasy in floral biology and pollination in baobabs
93-
(*Adansonia*; Bombacoideae; Malvaceae).
94-
Systematic Biology,
95-
69(3):462-478. doi: [10.1093/sysbio/syz073](https://academic.oup.com/sysbio/advance-article/doi/10.1093/sysbio/syz073/5613901?guestAccessKey=a32e7dd3-27fd-4a13-b171-7ff5d6da0e01).
68+
> [!NOTE]
69+
> Version 0.17 of PhyloNetworks is a major change from version v0.16.4. Many
70+
> functionalities were moved to other packages (e.g. SNaQ.jl and PhyloTraits.jl),
71+
> the names of many methods were changed, and various internal functions
72+
> were improved with breaking changes (e.g. traversal routines).
73+
> PhyloNetworks v0.17 should serve as a better "core", used by other packages
74+
> with more specialized functionalities.

0 commit comments

Comments
 (0)