scrape_AnAge: Extracting life history data from the AnAge database

Description Usage Arguments Author(s) References Examples

View source: R/scrape_AnAge.R

Description

An R wrapper to access life history data from AnAge (http://genomics.senescence.info/species/) for one or multiple species.

Usage

1
2
scrape_AnAge(latin_name = NULL, vars = NULL, name_sep = " ",
  download_data = TRUE, file_path = "life_history_data.zip")

Arguments

latin_name

latin name of the species. Can be a string "Felis catus" or a vector with multiple species c("Felis catus", "Bos taurus"). The default separator is " ", but others can be chosen, see below. Should be case insensitive.

vars

vector of variables to extract for the species. Example: c("maximum_lovevity_yrs", "female_matury_days").
Options are:
"maximum_longevity_yrs"
"female_maturity_days"
"male_maturity_days"
"gestation_incubation_days" - duration of either gestation or incubation in days
"weaning_days"
"litter_clutch_size" - size of either litter or clutch

To see all options, check data(AnAge_variables)

name_sep

separator between genus and species in latin_name. Default is " ", as in "Felis catus".

download_data

Data has to be downloaded at least once and is by default saved into the working directory. For each subsequent call, download_data can be set to FALSE, except for when you want to update the datafile.

file_path

Name and path of file. Make sure to keep it as a .zip. Defaults to "life_history_data.zip", thus saving it into the working directory or looking for it in the working directory when download_data = FALSE.

Author(s)

Martin Stoffel (martin.adam.stoffel@gmail.com)

References

Tacutu, R., Thornton, D., Johnson, E., Budovsky, A., Barardo, D., Craig, T., Diana, E., Lehmann, G., Toren, D., Wang, J., Fraifeld, V. E., de Magalhaes, J. P. (2018) Human Ageing Genomic Resources: new and updated databases.. Nucleic Acids Research 46(D1):D1083-D1090.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
dat <- scrape_AnAge(latin_name = c("felis catus"),
                    vars = c("maximum_longevity_yrs","female_maturity_days"))
dat

# For multiple species. Now download_data = FALSE, as data has been
# downloaded already in the example above.

species <- c("felis catus", "Sterna paradisaea")
dat <- scrape_AnAge(latin_name = species,
                    vars = c("maximum_longevity_yrs","female_maturity_days"),
                    download_data = FALSE)
dat

mastoffel/AnAgeScrapeR documentation built on May 23, 2019, 2 a.m.