Takes input phylogenies or vectors of taxon names, checks
against taxonomic database, returns vector of cleaned taxonomic names
(using taxize::gnr_resolve()
) for use in spocc queries, as
well as warnings if there are invalid names.
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
taxize::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")
)
#> handled warning: Package taxize unavailable. Skipping taxonomic rectification.
#> handled warning: Package taxize unavailable. Skipping taxonomic rectification.
#> handled warning: Package taxize unavailable. Skipping taxonomic rectification.
#> 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 Taxonomic Databases w/ Matches
#> 1 Buteo buteo Buteo buteo Not rectified.
#> 2 Buteo buteo hartedi Buteo buteo hartedi Not rectified.
#> 3 Buteo japonicus Buteo japonicus Not rectified.
#>
#> 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")
)
#> handled warning: Package taxize unavailable. Skipping taxonomic rectification.
#> handled warning: Package taxize unavailable. Skipping taxonomic rectification.
#> handled warning: Package taxize unavailable. Skipping taxonomic rectification.
#> handled warning: Package taxize unavailable. Skipping taxonomic rectification.
#> handled warning: Package taxize unavailable. Skipping taxonomic rectification.
#> handled warning: Package taxize unavailable. Skipping taxonomic rectification.
#> handled warning: Package taxize unavailable. Skipping taxonomic rectification.
#> 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
#> 2 Kajikia_albida Kajikia_albida
#> 3 Kajikia_audax Kajikia_audax
#> 4 Tetrapturus_angustirostris Tetrapturus_angustirostris
#> 5 Tetrapturus_belone Tetrapturus_belone
#> 6 Tetrapturus_georgii Tetrapturus_georgii
#> 7 Tetrapturus_pfluegeri Tetrapturus_pfluegeri
#> Taxonomic Databases w/ Matches
#> 1 Not rectified.
#> 2 Not rectified.
#> 3 Not rectified.
#> 4 Not rectified.
#> 5 Not rectified.
#> 6 Not rectified.
#> 7 Not rectified.
#>
#> Slot "occSources":
#> logical(0)
#>
#> Slot "occCiteSearchDate":
#> character(0)
#>
#> Slot "occResults":
#> list()
#>
# }