Skip to contents

Extract valid children from given taxonomic name(s) or Open Tree of Life Taxonomic identifiers (OTT ids) from a taxonomic source.

Usage

get_valid_children(input = NULL, ott_ids = NULL, reference_taxonomy = "ncbi")

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() or rotl::tnrs_match_names() or tnrs_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".

Value

A named list containing valid taxonomic children of given taxonomic name(s).

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
#> 
#>