lookup_tol: Look up a sequenced specimen or gene in ToL.

View source: R/tol.R

lookup_tolR Documentation

Look up a sequenced specimen or gene in ToL.

Description

Request the record for a sequenced specimen or gene in ToL using its ToL ID.

Usage

lookup_tol(id, type = c("specimen", "gene"), .wait = 0.1)

Arguments

id

A string containing a valid ToL ID.

type

The type of record to lookup, either specimen or gene.

.wait

Time to wait before making a request, to help rate limiting.

Details

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.

The lookup API allows users to retrieve taxonomic and sequencing information for a specific sequenced specimen or gene using the unique ToL ID. If this is not known, it can be found out using the ToL search API.

Value

A tol_{type} object, which is a simple structure with fields for each of the fields returned by the lookup API, as well as the the httr response object.

References

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

See Also

  • search_tol() to search ToL using taxonomic information.

  • download_tol() to download a file from the ToL SFTP server.

  • load_tol() load a file from the ToL SFTP server.

Other ToL functions: download_tol(), load_tol()

Examples


# retrieve information for a particular specimen
lookup_tol("1296")

# print a summary of the returned information
r <- lookup_tol("1296")
print(r)

# tidy into a tibble
r <- lookup_tol("1296")
tidy(r)

# extract the returned gene stats for the specimen
r <- lookup_tol("1296")
tidied <- tidy(r)
tidied$gene_stats

# expand the taxonomy info
r <- lookup_tol("1296")
tidied <- tidy(r)
tidyr::unnest(tidied, cols=taxonomy, names_sep="_")

# retrieve information for a particular gene
lookup_tol("51", type="gene")

# print a summary of the returned information
r <- lookup_tol("51", type="gene")
print(r)

# tidy into a tibble
r <- lookup_tol("51", type="gene")
tidy(r)


barnabywalker/kewr documentation built on July 5, 2022, 5:37 p.m.