Package {megatrees}


Type: Package
Title: Subsets of Randomly Selected Phylogenies from Existing Mega-Phylogenies
Version: 1.0.0
Maintainer: Daijiang Li <daijianglee@gmail.com>
Description: There are an increasing number of mega-phylogenies available nowadays, with many of them being sets of thousands of posterior distribution phylogenies. For ecological studies, we may need to randomly select many such posterior phylogenies to conduct analyses. This data package serves this purpose by providing a small number (100 or 50) of randomly selected posterior phylogenies (if available) so that we can readily use them for our downstream analyses without repeating the downloading and selecting processes.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
LazyDataCompression: xz
Suggests: piggyback, testthat (≥ 3.0.0), dplyr, stringr
Depends: R (≥ 3.5), ape
Config/testthat/edition: 3
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-05-18 15:37:52 UTC; dli
Author: Daijiang Li [aut, cre]
Repository: CRAN
Date/Publication: 2026-05-22 09:20:08 UTC

Get 100 randomly selected mega-trees of Amphibians from VertLife

Description

The first tree is the "consensus" tree; the remaining 99 are posterior phylogenies. Because of the large file size (~12 MB), this dataset is not bundled with the package and is downloaded and cached locally on first use.

Usage

get_tree_amphibian_n100(force = FALSE)

Arguments

force

Logical. Re-download even if a local cache exists. Default FALSE.

Value

A multiPhylo object. Each phylogeny also has a data frame genus_family_root with root node information for every unique genus and family, usable for inserting new tips onto the phylogeny.

Source

http://vertlife.org/data/amphibians/

References

Jetz, W., & Pyron, R. A. (2018). The interplay of past diversification and evolutionary isolation with present imperilment across the amphibian tree of life. Nature ecology & evolution, 2(5), 850-858.


Get 100 randomly selected mega-trees of Bees from Bee Tree of Life

Description

Because of the large file size (~5 MB), this dataset is not bundled with the package and is downloaded and cached locally on first use.

Usage

get_tree_bee_n100(force = FALSE)

Arguments

force

Logical. Re-download even if a local cache exists. Default FALSE.

Value

A multiPhylo object. Each phylogeny also has a data frame genus_family_root with root node information for every unique genus and family, usable for inserting new tips onto the phylogeny.

Source

http://beetreeoflife.org

References

Henríquez-Piskulich, P., Hugall, A. F., & Stuart-Fox, D. (2023). A supermatrix phylogeny of the world's bees (Hymenoptera: Anthophila). bioRxiv 2023.06.16.545281. doi:10.1101/2023.06.16.545281

See Also

tree_bee


Get 100 randomly selected mega-trees of Birds from Bird Tree

Description

The first 50 phylogenies use the Ericson backbone and the second 50 use the Hackett backbone (Jetz et al. 2012). Because of the large file size (~18 MB), this dataset is not bundled with the package and is downloaded and cached locally on first use.

Usage

get_tree_bird_n100(force = FALSE)

Arguments

force

Logical. Re-download even if a local cache exists. Default FALSE.

Value

A multiPhylo object. Each phylogeny also has a data frame genus_family_root with root node information for every unique genus and family, usable for inserting new tips onto the phylogeny.

Source

https://data.vertlife.org/

References

Jetz, W., Thomas, G. H., Joy, J. B., Hartmann, K., & Mooers, A. O. (2012). The global diversity of birds in space and time. Nature, 491(7424), 444.

See Also

tree_bird_McTavish


Get 50 randomly selected mega-trees of 31516 Fish from The Fish Tree of Life

Description

This tree was generated by Rabosky et al. (2018). It has 31516 tips, with species missing sequence data added using birth-death models. The authors suggest not using these trees for trait evolution analyses. Because of the large file size (~23 MB), this dataset is not bundled with the package and is downloaded and cached locally on first use.

Usage

get_tree_fish_32k_n50(force = FALSE)

Arguments

force

Logical. Re-download even if a local cache exists. Default FALSE.

Value

A multiPhylo object. Each phylogeny also has a data frame genus_family_root with root node information for every unique genus and family, usable for inserting new tips onto the phylogeny.

Source

https://fishtreeoflife.org/downloads/actinopt_full.trees.xz

References

Rabosky, D. L., Chang, J., Title, P. O., Cowman, P. F., Sallan, L., Friedman, M., ... & Alfaro, M. E. (2018). An inverse latitudinal gradient in speciation rate for marine fishes. Nature, 559(7714), 392.

See Also

tree_fish_12k


Get 100 randomly selected mega-trees of Mammals from PHYLACINE V1.2

Description

These 100 phylogenies are randomly selected from the 1000 trees generated by Faurby et al. (2018). Because of the large file size (~6 MB), this dataset is not bundled with the package and is downloaded and cached locally on first use.

Usage

get_tree_mammal_n100_phylacine(force = FALSE)

Arguments

force

Logical. Re-download even if a local cache exists. Default FALSE.

Value

A multiPhylo object. Each phylogeny also has a data frame genus_family_root with root node information for every unique genus and family, usable for inserting new tips onto the phylogeny.

Source

https://github.com/MegaPast2Future/PHYLACINE_1.2/blob/master/Data/Phylogenies/Complete_phylogeny.nex

References

Faurby, S., Davis, M., Pedersen, R. Ø., Schowanek, S. D., Antonelli, A., & Svenning, J. C. (2018). PHYLACINE 1.2: The phylogenetic atlas of mammal macroecology. Ecology, 99(11), 2626-2626.

See Also

get_tree_mammal_n100_vertlife


Get 100 randomly selected mega-trees of Mammals from VertLife

Description

The first 50 phylogenies use the Node Dating Exponential backbone and the second 50 use the Fossil Birth Death backbone (Upham et al. 2019). Because of the large file size (~11 MB), this dataset is not bundled with the package and is downloaded and cached locally on first use.

Usage

get_tree_mammal_n100_vertlife(force = FALSE)

Arguments

force

Logical. Re-download even if a local cache exists. Default FALSE.

Value

A multiPhylo object. Each phylogeny also has a data frame genus_family_root with root node information for every unique genus and family, usable for inserting new tips onto the phylogeny.

Source

https://vertlife.org/data/mammals/

References

Upham, N. S., Esselstyn, J. A., & Jetz, W. (2019). Inferring the mammal tree: species-level sets of phylogenies for questions in ecology, evolution, and conservation. PLoS biology, 17(12), e3000494.

See Also

get_tree_mammal_n100_phylacine


Get 100 randomly selected plant mega-trees (Carruthers et al.)

Description

This tree was based on Carruthers et al. (2026), which in turn was an update of the Smith and Brown (2018). We randomly selected 100 plant mega-trees from this dataset. Because of the large file size (~135 MB), this dataset is not bundled with the package and is downloaded and cached locally on first use.

Usage

get_tree_plant_n100_Carruthers(force = FALSE)

Arguments

force

Logical. Re-download even if a local cache exists. Default FALSE.

Value

A multiPhylo object. Each phylogeny also has a data frame genus_family_root with root node information for every unique genus and family, which can be used to insert new tips onto the phylogeny later.

Source

https://www.biorxiv.org/content/10.64898/2026.01.06.695000v1

References

Carruthers et al., (2026). A large phylogenetic tree for euphyllophytes. bioRxiv.

See Also

tree_plant_Carruthers


Get 100 randomly selected mega-trees of Reptiles (Squamates) from VertLife

Description

Because of the large file size (~15 MB), this dataset is not bundled with the package and is downloaded and cached locally on first use.

Usage

get_tree_reptile_n100(force = FALSE)

Arguments

force

Logical. Re-download even if a local cache exists. Default FALSE.

Value

A multiPhylo object. Each phylogeny also has a data frame genus_family_root with root node information for every unique genus and family, usable for inserting new tips onto the phylogeny.

Source

https://vertlife.org/data/squamates/

References

Tonini, J. F. R., Beard, K. H., Ferreira, R. B., Jetz, W., & Pyron, R. A. (2016). Fully-sampled phylogenies of squamates reveal evolutionary patterns in threat status. Biological Conservation, 204, 23-31.


Get 100 randomly selected mega-trees of Sharks, Rays, and Chimaeras from VertLife

Description

Because of the large file size (~2 MB), this dataset is not bundled with the package and is downloaded and cached locally on first use.

Usage

get_tree_shark_ray_n100(force = FALSE)

Arguments

force

Logical. Re-download even if a local cache exists. Default FALSE.

Value

A multiPhylo object. Each phylogeny also has a data frame genus_family_root with root node information for every unique genus and family, usable for inserting new tips onto the phylogeny.

Source

https://vertlife.org/data/sharks/

References

Stein, R. W., Mull, C. G., Kuhn, T. S., Aschliman, N. C., Davidson, L. N., Joy, J. B., ... & Mooers, A. O. (2018). Global priorities for conserving the evolutionary history of sharks, rays and chimaeras. Nature ecology & evolution, 2(2), 288-298.


The Maximum Likely Mega-tree of Bees from Bee Tree of Life

Description

The Maximum Likely Mega-tree of Bees from Bee Tree of Life

Usage

tree_bee

Format

A maximum likely phylogeny with class "phylo". Compare with a normal phylo object, this phylogeny has another data frame 'genus_family_root', which provides the root nodes information for every unique genus and family in the phylogeny. Such information can be used to insert new tips onto the phylogeny later.

Source

http://beetreeoflife.org

References

Henríquez-Piskulich, P.; Hugall, A.F.; Stuart-Fox; D. 2023. A supermatrix phylogeny of the world’s bees (Hymenoptera: Anthophila). bioRxiv 2023.06.16.545281. doi.org/10.1101/2023.06.16.545281.


The summary tree by McTavish et al. 2025 PNAS

Description

This is the [summary tree v1.6 by McTavish et al. 2025](https://github.com/McTavishLab/AvesData/blob/main/Tree_versions/Aves_1.6/Clements2025/summary_dated_clements.nex). It used the taxonomy of eBird (Clements 2025).

Usage

tree_bird_McTavish

Format

A phylogeny with class 'phylo'. Compare with a normal phylo object, each phylogeny has another data frame 'genus_family_root', which provides the root nodes information for every unique genus and family in the phylogeny. Such information can be used to insert new tips onto the phylogeny later.

Source

https://github.com/McTavishLab/AvesData/blob/main/Tree_versions/Aves_1.6/Clements2025/summary_dated_clements.nex

References

E.J. McTavish,J.A. Gerbracht,M.T. Holder,M.J. Iliff,D. Lepage,P.C. Rasmussen,B.D. Redelings,L.L. Sánchez Reyes,& E.T. Miller, A complete and dynamic tree of birds, Proc. Natl. Acad. Sci. U.S.A. 122 (18) e2409658122, https://doi.org/10.1073/pnas.2409658122 (2025).


Tree of 2244 butterfly species

Description

This tree was generated by Kawahara et al. (2023).

Usage

tree_butterfly

Format

A phylogeny with class "phylo". It is also a list. Compare with a normal phylo object, it has another data frame 'tree_butterfly$genus_family_root', which provides the root nodes information for every unique genus and family in the phylogeny. Such information can be used to insert new tips onto the phylogeny later.

Source

https://springernature.figshare.com/articles/dataset/A_global_phylogeny_of_butterflies_reveals_their_evolutionary_history_ancestral_host_plants_and_biogeographic_origins/21774899?file=39124943

References

Kawahara, Akito Y., et al. "A global phylogeny of butterflies reveals their evolutionary history, ancestral hosts and biogeographic origins." Nature ecology & evolution 7.6 (2023): 903-913.


Mega-tree of 11638 Fish from The Fish Tree of Life

Description

This tree was generated by Rabosky et al. (2018). It has 11638 tips that all have sequence data. Node labels were added here.

Usage

tree_fish_12k

Format

A phylogeny with class "phylo". It is also a list. Compare with a normal phylo object, it has another data frame 'tree_fish_12k$genus_family_root', which provides the root nodes information for every unique genus and family in the phylogeny. Such information can be used to insert new tips onto the phylogeny later.

Source

https://fishtreeoflife.org/downloads/actinopt_12k_treePL.tre.xz

References

Rabosky, D. L., Chang, J., Title, P. O., Cowman, P. F., Sallan, L., Friedman, M., ... & Alfaro, M. E. (2018). An inverse latitudinal gradient in speciation rate for marine fishes. Nature, 559(7714), 392.

See Also

tree_fish_32k_n50


Mega-tree of Plants based on Carruthers et al., 2026

Description

This tree was based on Carruthers et al. (2026), which in turn was an update of the Smith and Brown (2018).

Usage

tree_plant_Carruthers

Format

A phylogeny with class "phylo". It is also a list. Compare with a normal phylo object, it has another data frame 'tree_plant_Carruthers$genus_family_root', which provides the root nodes information for every unique genus and family in the phylogeny. Such information can be used to insert new tips onto the phylogeny later.

Source

https://www.biorxiv.org/content/10.64898/2026.01.06.695000v1

References

Carruthers et al., (2026). A large phylogenetic tree for euphyllophytes. bioRxiv.


Mega-tree of Plants based on Open Tree of Life

Description

This tree was based on Smith and Brown (2018), which in turn was based on the Open Tree of Life. It was copied from 'V.PhyloMaker::GBOTB.extended'. After then, node labels were added for empty ones.

Usage

tree_plant_otl

Format

A phylogeny with class "phylo". It is also a list. Compare with a normal phylo object, it has another data frame 'tree_plant_otl$genus_family_root', which provides the root nodes information for every unique genus and family in the phylogeny. Such information can be used to insert new tips onto the phylogeny later.

Source

https://github.com/jinyizju/V.PhyloMaker/tree/master/data

References

Smith, S. A., & Brown, J. W. (2018). Constructing a broadly inclusive seed plant phylogeny. American Journal of Botany, 105(3), 302-314.

Jin, Y., & Qian, H. (2019). V. PhyloMaker: an R package that can generate very large phylogenies for vascular plants. Ecography.