Skip to contents

Searches and downloads associations from SMML Fungus-Hosts Distributions and Specimens database for fungus or plant species input vector

Usage

associations(x, database = c("FH", "SP", "both"),
  spec_type = c("plant", "fungus"), clean = TRUE, syn_include = TRUE,
  process = TRUE, db = "ncbi")

Arguments

x

a vector of class character containing fungal or plant species names or a genus name (see Details)

database

a character string specifying the databases that should be queried. Valid are "FH" (Fungus-Host Distributions), "SP" (Specimens) or "both" databases

spec_type

a character string specifying the type of x. Can be either "plant" or "fungus"

clean

logical, if TRUE a cleaning step is run of the resulting associations list

syn_include

logical, if TRUE associations for synonyms are searched and added. For a complete synonyms list check rusda::synonyms

process

logical, if TRUE downloading and extraction process is displayed

db

if x is higher than species level, all species for the higher taxon are retrived using the function taxize::downstream. Here one of ITIS (itis), Catalogue of Life (col), GBIF (gbif), or NCBI (ncbi) has to be selected. NCBI is default.

Value

an object of class list.

First is synonyms, second is associations. Synonmys is a vector of mode list with synonyms for x. Notice: This is not a complete list of synonym data in the database. This is the list of synonyms that contain data for the input x. For a complete synonyms list check rusda::synonyms or (if needed) for fungi R package rmycobank.

Associations is a vector of mode list of associations for x

Details

The Fungus-Hosts distributions database 'FH' comprises data compiled from Literature. In the uncleaned output all kinds of unspecified substrates are documented like "submerged wood". Cleanded data displayes Linnean names only and species names with either "subsp.","f. sp." "f.", "var.". The Specimens database comprises entries from field collections.

If genera names are supplied, then species are derived from the NCBI taxonomy.

Author

Franz-Sebastian Krah

Examples

if (FALSE) { # \dontrun{
## Example for species name(s) as input
x <- "Fagus sylvatica"
pathogens <- associations(x, database = "both", clean = TRUE, syn_include = TRUE,
spec_type = "plant", process = TRUE)
x <- "Rosellinia ligniaria"
hosts <- associations(x, database = "both", clean = TRUE, syn_include = TRUE, 
spec_type = "fungus", process = TRUE)
is.element("Rosellinia ligniaria", pathogens$association[[1]])
is.element("Fagus sylvatica", hosts$association[[1]])

## Example for genus/genera name(s) as input
x <- "Zehneria"
# or
x <- c("Zehneria", "Momordica")
hosts <- associations(x, database = "both", clean = TRUE, syn_include = TRUE, 
spec_type = "plant", process = TRUE)
} # }