Takes input phylogenies or vectors of taxon names, checks against taxonomic database, returns vector of cleaned taxonomic names (using taxonRectification) for use in spocc queries, as well as warnings if there are invalid names.

studyTaxonList(x = NULL, datasources = "GBIF Backbone Taxonomy")

Arguments

x

A phylogeny of class 'phylo' or a vector of class 'character' containing the names of taxa of interest

datasources

A vector of taxonomic data sources implemented in gnr_resolve. You can see the list using taxize::gnr_datasources().

Value

An object of class occCiteData containing the type of inquiry the user has made --a phylogeny or a vector of names-- and a data frame containing input taxa names, the closest match according to gnr_resolve, and a list of taxonomic data sources that contain the matching name.

Examples

## Inputting a vector of taxon names
studyTaxonList(
  x = c(
    "Buteo buteo",
    "Buteo buteo hartedi",
    "Buteo japonicus"
  ),
  datasources = c("National Center for Biotechnology Information")
)
#> An object of class "occCiteData"
#> Slot "userQueryType":
#> [1] "User-supplied list of taxa."
#> 
#> Slot "userSpecTaxonomy":
#> [1] "National Center for Biotechnology Information"
#> 
#> Slot "cleanedTaxonomy":
#>            Input Name           Best Match
#> 1         Buteo buteo          Buteo buteo
#> 2 Buteo buteo hartedi Buteo buteo harterti
#> 3     Buteo japonicus      Buteo japonicus
#>                  Taxonomic Databases w/ Matches
#> 1 National Center for Biotechnology Information
#> 2 National Center for Biotechnology Information
#> 3 National Center for Biotechnology Information
#> 
#> Slot "occSources":
#> logical(0)
#> 
#> Slot "occCiteSearchDate":
#> character(0)
#> 
#> Slot "occResults":
#> list()
#> 

# \donttest{
## Inputting a phylogeny
phylogeny <- ape::read.nexus(
  system.file("extdata/Fish_12Tax_time_calibrated.tre",
    package = "occCite"
  )
)
phylogeny <- ape::extract.clade(phylogeny, 18)
studyTaxonList(
  x = phylogeny,
  datasources = c("GBIF Backbone Taxonomy")
)
#> An object of class "occCiteData"
#> Slot "userQueryType":
#> [1] "User-supplied phylogeny."
#> 
#> Slot "userSpecTaxonomy":
#> [1] "GBIF Backbone Taxonomy"
#> 
#> Slot "cleanedTaxonomy":
#>                   Input Name                                    Best Match
#> 1           Istiompax_indica               Istiompax indica (Cuvier, 1832)
#> 2             Kajikia_albida                   Kajikia albida (Poey, 1860)
#> 3              Kajikia_audax                Kajikia audax (Philippi, 1887)
#> 4 Tetrapturus_angustirostris       Tetrapturus angustirostris Tanaka, 1915
#> 5         Tetrapturus_belone           Tetrapturus belone Rafinesque, 1810
#> 6        Tetrapturus_georgii                Tetrapturus georgii Lowe, 1841
#> 7      Tetrapturus_pfluegeri Tetrapturus pfluegeri Robins & de Sylva, 1963
#>   Taxonomic Databases w/ Matches
#> 1         GBIF Backbone Taxonomy
#> 2         GBIF Backbone Taxonomy
#> 3         GBIF Backbone Taxonomy
#> 4         GBIF Backbone Taxonomy
#> 5         GBIF Backbone Taxonomy
#> 6         GBIF Backbone Taxonomy
#> 7         GBIF Backbone Taxonomy
#> 
#> Slot "occSources":
#> logical(0)
#> 
#> Slot "occCiteSearchDate":
#> character(0)
#> 
#> Slot "occResults":
#> list()
#> 
# }