bmotif: A Package for Motif Analyses of Bipartite Networks

Bipartite network motif patterns

Bipartite networks are widely used to represent diverse species interactions in ecology, including pollination, herbivory, parasitism, and seed dispersal. The structure of these networks is traditionally characterized by calculating metrics that capture different aspects of network architecture. However, these metrics typically only consider structure at two scales: the macro-scale (whole network) or the micro-scale (individual species).

This approach ignores meso-scale structure—patterns that exist between these extremes. Yet meso-scale structure represents ecologically important indirect interactions that can have profound effects on ecosystem dynamics, stability, and evolution. Network motifs provide a framework for capturing this meso-scale structure, and are gaining popularity in ecology and other fields.

Filling a Critical Software Gap

Despite the growing interest in motif analyses, no software was available in R—the most popular programming language among ecologists—for conducting such analyses in bipartite networks. This represented a significant barrier to adoption, as ecologists would need to learn new programming languages or develop custom code for each analysis.

We introduce bmotif, a comprehensive package for counting motifs and species' positions within motifs in bipartite networks. While our code is primarily an R package optimized for the ecology community, we also provide MATLAB and Python implementations of the core functionality, ensuring broad accessibility across different scientific communities and programming preferences.

The package enables researchers to identify recurring patterns of interactions at the meso-scale, revealing how indirect connections between species shape network structure.

Applications to Plant-Pollinator Networks

We demonstrate how bmotif can be used to conduct ecological analyses through two detailed examples of plant-pollinator networks, showcasing the package's versatility and practical utility.

In our first example, we use motifs to examine the assembly and disassembly of an Arctic plant-pollinator community over seasonal time scales. Arctic ecosystems experience dramatic seasonal changes in species composition, and motif analysis reveals how interaction patterns evolve as species enter and exit the community.

In our second example, we apply bmotif to compare the roles of native and introduced plant species in an unrestored site in Mauritius—a biodiversity hotspot where invasive species threaten native ecosystems. The motif analysis reveals whether introduced plants integrate into existing pollination networks or form distinct interaction patterns.

These examples illustrate how meso-scale motif analysis can address fundamental questions in community ecology that are difficult or impossible to answer using traditional whole-network or species-level metrics.

Research Metrics

Altmetric Attention

Citations

References

Simmons, B.I., Sweering, M.J.M., Schillinger, M., Dicks, L.V., Sutherland, W.J. & Di Clemente, R.

bmotif: a package for motif analyses of bipartite networks

Methods in Ecology and Evolution, 10(5), 695-701 (2019)

Multi-language implementation for bipartite network motif analysis

bmotif Package - Python, R and Matlab Implementation