This is an introduction to the helminthR
package, whicih allows for the programmatic access to the London Natural History Museum's helminth parasite database (available here). This database represents the largest known database of host-helminth interactions, containing host-helminth occurrence records for over 350 locations, including aquatic, marine, and terrestrial locations.
See software note in Ecography (available here)
From GitHub
# install.packages("devtools")
devtools::install_github("rOpenSci/helminthR")
library("helminthR")
From CRAN
install.packages("helminthR")
The package allows for the acquisition of host-helminth interaction records based on host name (genus or species), parasite name (genus, species, or group), and/or location (accepted region name as provided in data(locations)
. Parasite groups include “Acanthocephalans”, “Cestodes”, “Monogeans”, “Nematodes”, “Trematodes”, or “Turbs” (short for Turbellarians). The user can further define host species as occuring
by inputting the corresponding number above in the hostState
argument.
The package itself has three main functions; findHost
, findParasite
, and findLocation
.
Given a host genus and (optionally) species and location, this function returns all host-parasite associations of a given host species. The example below determines all parasite records for helminth infections of Gorilla gorilla. We also use the citation
argument here to obtain information on the citations which the host-helminth occurrences are based on.
library(helminthR)
gorillaParasites <- findHost(genus='Gorilla', species='gorilla',
hostState=1, speciesOnly=TRUE, citation=TRUE)
dim(gorillaParasites)
#> [1] 23 5
head(gorillaParasites)
#> Host Parasite
#> 1 Gorilla gorilla Strongyle
#> 2 Gorilla gorilla beringei Strongyle
#> 3 Gorilla gorilla Trichostrongylidae
#> 4 Gorilla gorilla Anoplocephala gorillae
#> 5 Gorilla gorilla beringei Anoplocephala gorillae
#> 6 Gorilla gorilla graueri Anoplocephala gorillae
#> ParasiteFull
#> 1 (Strongyle)
#> 2 (Strongyle)
#> 3 (Trichostrongylidae)
#> 4 Anoplocephala gorillae Nybelin, 1928
#> 5 Anoplocephala gorillae Nybelin, 1928
#> 6 Anoplocephala gorillae Nybelin, 1928
#> Reference
#> 1 http://www.nhm.ac.uk/research-curation/scientific-resources/taxonomy-systematics/host-parasites/database/references.jsp;jsessionid=877ACBD6FF3E6DC42C5E0B510574D437?paragenus=(Strongyle)¶species=¶group=&subgroup=&hostgenus=Gorilla&hostspecies=gorilla&pstatus=&hstate=1&location=&locationID=&linkedthrough=true
#> 2 http://www.nhm.ac.uk/research-curation/scientific-resources/taxonomy-systematics/host-parasites/database/references.jsp;jsessionid=877ACBD6FF3E6DC42C5E0B510574D437?paragenus=(Strongyle)¶species=¶group=&subgroup=&hostgenus=Gorilla&hostspecies=gorilla+beringei&pstatus=&hstate=1&location=&locationID=&linkedthrough=true
#> 3 http://www.nhm.ac.uk/research-curation/scientific-resources/taxonomy-systematics/host-parasites/database/references.jsp;jsessionid=877ACBD6FF3E6DC42C5E0B510574D437?paragenus=(Trichostrongylidae)¶species=¶group=&subgroup=&hostgenus=Gorilla&hostspecies=gorilla&pstatus=&hstate=1&location=&locationID=&linkedthrough=true
#> 4 http://www.nhm.ac.uk/research-curation/scientific-resources/taxonomy-systematics/host-parasites/database/references.jsp;jsessionid=877ACBD6FF3E6DC42C5E0B510574D437?paragenus=Anoplocephala¶species=gorillae+Nybelin%2c+1928¶group=&subgroup=&hostgenus=Gorilla&hostspecies=gorilla&pstatus=&hstate=1&location=&locationID=&linkedthrough=true
#> 5 http://www.nhm.ac.uk/research-curation/scientific-resources/taxonomy-systematics/host-parasites/database/references.jsp;jsessionid=877ACBD6FF3E6DC42C5E0B510574D437?paragenus=Anoplocephala¶species=gorillae+Nybelin%2c+1928¶group=&subgroup=&hostgenus=Gorilla&hostspecies=gorilla+beringei&pstatus=&hstate=1&location=&locationID=&linkedthrough=true
#> 6 http://www.nhm.ac.uk/research-curation/scientific-resources/taxonomy-systematics/host-parasites/database/references.jsp;jsessionid=877ACBD6FF3E6DC42C5E0B510574D437?paragenus=Anoplocephala¶species=gorillae+Nybelin%2c+1928¶group=&subgroup=&hostgenus=Gorilla&hostspecies=gorilla+graueri&pstatus=&hstate=1&location=&locationID=&linkedthrough=true
#> CitationNumber
#> 1 1
#> 2 1
#> 3 1
#> 4 1
#> 5 3
#> 6 1
The above function will query the database for helminth parasites of Gorilla gorilla that were captured in the wild, and will remove helminth parasites not identified to species. If the user wishes to query multiple host species at the same time, the user can do the following
hosts <- c('Gorilla gorilla', 'Peromyscus leucopus')
plyr::ldply(hosts,
function(x){
findHost(unlist(strsplit(x, ' '))[1],
unlist(strsplit(x,' '))[2])})
}
Given a helminth parasite genus (and optionally species, and location), this function returns a list of host-parasite records for that parasite. In the example below, I query the database for occurrences of the genus Strongyloides.
strongHosts <- findParasite(genus='Strongyloides')
dim(strongHosts)
#> [1] 516 3
head(strongHosts)
#> Host Parasite
#> 1 Ancistrus dolichopterus Capillostrongyloides ancistri
#> 2 Ancistrus sp. Capillostrongyloides ancistri
#> 3 Bagrus bayad Capillostrongyloides fritschi
#> 4 Bagrus docmac Capillostrongyloides fritschi
#> 5 Malapterurus electricus Capillostrongyloides fritschi
#> 6 Enchelyopus cimbrius Capillostrongyloides norvegica
#> ParasiteFull
#> 1 Capillostrongyloides ancistri Moravec & Rehulka, 1987
#> 2 Capillostrongyloides ancistri Moravec & Rehulka, 1987
#> 3 Capillostrongyloides fritschi (Travassos, 1914)
#> 4 Capillostrongyloides fritschi (Travassos, 1914)
#> 5 Capillostrongyloides fritschi (Travassos, 1914)
#> 6 Capillostrongyloides norvegica Moravec & Karlsbakk, 2000
data(locations)
and findLocation()
A data file containing all the location names that can be queried, along with putative latitude and longitude coordinates for the centroid of each location can be found in data(locations)
. Note that this will replace any object in the global environment named locations
. These names can be given to the findLocation()
function, which finds all host-parasite associations that have occurred in the given location. Below, I look at host-parasite associations recorded in France.
montanaOcc <- findLocation(location='Montana')
dim(montanaOcc)
head(montanaOcc)
Below, I provide an example of code for plotting the bipartite network of host-helminth interactions found in the state of Montana.
g <- igraph::graph.incidence(table(montanaOcc[,1:2]))
igraph::V(g)$name <- NA
igraph::E(g)$color <- 'black'
plot(g,
vertex.color=c("black","dodgerblue")[igraph::V(g)$type+1],
vertex.size=5
)