Request a tree file for the whole ToL or an alignment, sequence, or gene tree for a particular specimen or gene.
load_tol(url = NULL, .wait = 0.1)
URL pointing to a file on the ToL SFTP server.
Time to wait before making a request, to help rate limiting.
The Tree of Life is a database of specimens sequenced as part of Kew's efforts to build a comprehensive evolutionary tree of life for flowering plants.
Newick tree, alignment, and sequence files are help on an SFTP server
for download. The URLs to access these are stored in entries for specimens
and genes in the ToL database. These can be accessed by either using search_tol()
to get all specimens for a particular order, family, genus, or species or by
looking up a specific specimen or gene using lookup_tol()
. If no URL is specified,
this will load the ToL tree.
Baker W.J., Bailey P., Barber V., Barker A., Bellot S., Bishop D., Botigue L.R., Brewer G., Carruthers T., Clarkson J.J., Cook J., Cowan R.S., Dodsworth S., Epitawalage N., Francoso E., Gallego B., Johnson M., Kim J.T., Leempoel K., Maurin O., McGinnie C., Pokorny L., Roy S., Stone M., Toledo E., Wickett N.J., Zuntini A.R., Eiserhardt W.L., Kersey P.J., Leitch I.J. & Forest F. 2021. A Comprehensive Phylogenomic Platform for Exploring the Angiosperm Tree of Life. Systematic Biology, 2021; syab035, https://doi.org/10.1093/sysbio/syab035
lookup_tol()
to lookup information about a sequenced specimen
using a valid ToL ID.
search_tol()
to search ToL using taxonomic info.
download_tol()
to save a file on the ToL SFTP server to file.
Other ToL functions:
download_tol()
,
lookup_tol()
# load the ToL
load_tol()
#> No encoding supplied: defaulting to UTF-8.
#> <ToL tree url: https://treeoflife.kew.org/api/tree>
#> Preview:
#> (((17419_false_Gnetales_Gnetaceae_Gnetum_montanum:0.00000,18215_false_Ephedrales_Ephedraceae_Ephedra
# load a specimen fasta file
specimen_info <- lookup_tol("1296")
#> No encoding supplied: defaulting to UTF-8.
load_tol(specimen_info$fasta_file_url)
#> No encoding supplied: defaulting to UTF-8.
#> <ToL fasta url: http://sftp.kew.org/pub/paftol/current_release/fasta/by_recovery/INSDC.ERR5033358.Anisosepalum_alboviolaceum.a353.fasta>
#> Preview:
#> >6483 Gene_Name:RPL13 Species:Anisosepalum_alboviolaceum Repository:INSDC Sequence_ID:ERR5033358
#> GAA
# load a gene alignment file
gene_info <- lookup_tol("51", type="gene")
#> No encoding supplied: defaulting to UTF-8.
load_tol(gene_info$alignment_file_url)
#> No encoding supplied: defaulting to UTF-8.
#> <ToL fasta url: http://sftp.kew.org/pub/paftol/current_release/fasta/alignments/5328.dna.aln.fasta>
#> Preview:
#> >5328 Gene_Name:AAAS Species:Ceratophyllum_demersum Repository:INSDC Sequence_ID:SRR7451107
#> --------
# load the gene tree
load_tol(gene_info$tree_file_url)
#> No encoding supplied: defaulting to UTF-8.
#> <ToL tree url: http://sftp.kew.org/pub/paftol/current_release/tree/gene/5328.tree>
#> Preview:
#> (Ceratophyllales_Ceratophyllaceae_Ceratophyllum_demersum_SRR7451107:0.3494554101,(((((((((((((((((((