Mangal – a global ecological interactions database – serializes ecological interaction matrices into nodes (e.g. taxon, individuals or population) and interactions (i.e. edges). For each network, Mangal offers the opportunity to store study context such as the location, sampling environment, inventory date and informations pertaining to the original publication. For every nodes involved in the ecological networks, Mangal references unique taxonomic identifiers such as Encyclopedia of Life (EOL), Catalogue of Life (COL), Global Biodiversity Information Facility (GBIF) etc. and can extend nodes informations to individual traits.
rmangal is an R client to the Mangal database and provides various functions to explore his content through search functions. It offers methods to retrieve networks structured as
mgNetworksCollection S3 objects and methods to convert
mgNetwork to other class objects in order to analyze and visualize networks properties:
So far, only the development version is available and can be installed via the remotes 📦
R> mgs <- search_datasets("lagoon") Found 2 datasets
Once this first step achieved, networks found can be retrieved with the
R> mgn <- get_collection(mgs)
get_collection() returns an object
mgNetwork if there is one network returned, otherwise an object
mgNetworkCollection, which is a list of
R> class(mgn)  "mgNetworksCollection" R> mgn A collection of 3 networks * Network # from data set # * Description: Dietary matrix of the Huizache–Caimanero lagoon * Includes 189 edges and 26 nodes * Current taxonomic IDs coverage for nodes of this network: --> ITIS: 81%, BOLD: 81%, EOL: 85%, COL: 81%, GBIF: 0%, NCBI: 85% * Published in ref # DOI:10.1016/s0272-7714(02)00410-9 * Network # from data set # * Description: Food web of the Brackish lagoon * Includes 27 edges and 11 nodes * Current taxonomic IDs coverage for nodes of this network: --> ITIS: 45%, BOLD: 45%, EOL: 45%, COL: 45%, GBIF: 18%, NCBI: 45% * Published in ref # DOI:NA * Network # from data set # * Description: Food web of the Costal lagoon * Includes 34 edges and 13 nodes * Current taxonomic IDs coverage for nodes of this network: --> ITIS: 54%, BOLD: 54%, EOL: 54%, COL: 54%, GBIF: 15%, NCBI: 54% * Published in ref # DOI:NA
R> ig <- as.igraph(mgn[]) R> class(ig)  "igraph" R> library(tidygraph) R> tg <- as_tbl_graph(mgn[]) R> class(tg)  "tbl_graph" "igraph"
📖 Note that the vignette “Get started with rmangal” will guide the reader through several examples and provide further details about rmangal features.
We are working on that part. The networks publication process will be facilitated with structured objects and tests suite to maintain data integrity and quality.Comments and suggestions are welcome, feel free to open issues.
Those interested only in pairwise interactions among taxons may consider using
rglobi, an R package that provides an interface to the GloBi infrastructure. GloBi provides open access to aggregated interactions from heterogeneous sources. In contrast, Mangal gives access to the original networks and open the gate to study ecological networks properties (i.e. connectance, degree etc.) along large environmental gradients, which wasn’t possible using the GloBi infrastructure.
We are grateful to Noam Ross for acting as an editor during the review process. We also thank Anna Willoughby and Thomas Lin Petersen for reviewing the package. Their comments strongly contributed to improve the quality of rmangal.
Please note that the
rmangal project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.