bmotif: A package for motif analyses of bipartite networks

Benno I. Simmons, Michelle J.M. Sweering, Maybritt Schillinger, Lynn Dicks, William J. Sutherland, Riccardo Di Clemente

Research output: Contribution to journalArticlepeer-review

30 Citations (Scopus)
16 Downloads (Pure)


1. Bipartite networks are widely-used to represent a diverse range of species interactions, such as pollination, herbivory, parasitism and seed dispersal. The structure of these networks is usually characterised by calculating one or more indices that capture different aspects of network architecture. While these indices capture useful properties of networks, they are relatively insensitive to changes in network structure. Consequently, variation in ecologically-important interactions can be missed. Network motifs are a way to characterise network structure that is substantially more sensitive to changes in pairwise interactions, and is gaining in popularity. However, there is no software available in R, the most popular programming language among ecologists, for conducting motif analyses in bipartite networks. Similarly, no mathematical formalisation of bipartite motifs has been developed.
2. Here we introduce bmotif: a package for counting motifs, and species positions within motifs, in bipartite networks. Our code is primarily an R package, but we also provide MATLAB and Python code of the core functionality. The software is based on a mathematical framework where, for the first time, we derive formal expressions for motif frequencies and the frequencies with which species occur in different positions within motifs. This framework means that analyses with bmotif are fast, making motif methods compatible with the permutational approaches often used in network studies, such as null model analyses.
3. We describe the package and demonstrate how it can be used to conduct ecological analyses, using two examples of plant-pollinator networks. We first use motifs to examine the assembly and disassembly of an Arctic plant-pollinator community, and then use them to compare the roles of native and introduced plant species in an unrestored site in Mauritius.
4. bmotif will enable motif analyses of a wide range of bipartite ecological networks, allowing future research to characterise these complex networks without discarding important meso-scale structural detail.
Original languageEnglish
Pages (from-to)695-701
Number of pages7
JournalMethods in Ecology and Evolution
Issue number5
Early online date12 Jan 2019
Publication statusPublished - May 2019


  • Python
  • R
  • bipartite networks
  • food web
  • matlab
  • motifs
  • pollination
  • seed dispersal

Cite this