Extract valid children from given taxonomic name(s) or Open Tree of Life Taxonomic identifiers (OTT ids) from a taxonomic source.
Source:R/opentree_taxonomy.R
get_valid_children.Rd
Extract valid children from given taxonomic name(s) or Open Tree of Life Taxonomic identifiers (OTT ids) from a taxonomic source.
Arguments
- input
Optional. A character vector of names or a
datelifeQuery
object.- ott_ids
If not NULL, it takes this argument and ignores input. A numeric vector of ott ids obtained with
rotl::taxonomy_taxon_info()
orrotl::tnrs_match_names()
ortnrs_match()
.- reference_taxonomy
A character vector with the desired taxonomic sources. Options are "ncbi", "gbif" or "irmng". Any other value will retrieve data from all taxonomic sources. The function defaults to "ncbi".
Details
GBIF and other taxonomies contain deprecated taxa that are not marked as such in the Open Tree of Life Taxonomy. We are relying mainly in the NCBI taxonomy for now.
Examples
# genus Dictyophyllidites with ott id = 6003921 has only extinct children
# in cases like this the same name will be returned
tti <- rotl::taxonomy_taxon_info(6003921, include_children = TRUE)
gvc <- get_valid_children(ott_ids = 6003921)
#>
|
| | 0%
|
|======================================================================| 100%
# More examples:
get_valid_children(ott_ids = 769681) # Psilotopsida
#>
|
| | 0%
|
|======================================================================| 100%
#> $Tracheophyta
#> $Tracheophyta$children
#> ott_id rank
#> Euphyllophyta 1007992 no rank
#> Lycopodiopsida 144795 class
#>
#> $Tracheophyta$is_monotypic
#> [1] FALSE
#>
#>
get_valid_children(ott_ids = 56601) # Marchantiophyta
#>
|
| | 0%
|
|======================================================================| 100%
#> $Marchantiophyta
#> $Marchantiophyta$children
#> ott_id rank
#> Jungermanniopsida 991930 class
#> Marchantiopsida 991932 class
#> Haplomitriopsida 339229 class
#>
#> $Marchantiophyta$is_monotypic
#> [1] FALSE
#>
#>