bmotif
is software for motif analyses of bipartite networks. It can
count occurrences of motifs in bipartite networks, as well as the number
of times each node or link appears in each unique node or link position
within motifs (a node or link’s structural role). bmotif
was intended
for use in ecology but its methods are general and can be applied to any
bipartite graph. As well as R, core functionality is also available in
MATLAB and
Python.
To install the released version from CRAN:
install.packages("bmotif")
To install the released version from GitHub:
install.packages("devtools") # install the devtools package
devtools::install_github("SimmonsBI/bmotif-release", build_vignettes = TRUE) # install bmotif
bmotif
considers all 44 unique bipartite motifs up to six nodes.
Within these motifs there are 148 unique node positions. All motifs and
node positions considered by bmotif
are shown in the Figure below.
This is the ‘dictionary’ used by bmotif: the canonical reference for all
motif and node position IDs used by the package and returned by the
functions.
Large numbers above and to the left of each motif represent the ID of a motif. Small numbers at the end of links represent node position IDs within motifs. Motif IDs and node position IDs can also be found in 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 (accepted). Node positions were defined following Baker et al (2015) Appendix 1 Figure A27.
Consider the example of motif 5:
We know this is motif 5 because the large number above and to the left of the motif gives the motif ID as 5. This motif contains four unique node positions, given by the numbers at the ends of each link: 9, 10, 11 and 12.
This dictionary can be accessed inside R by typing
vignette("bmotif-dictionary")
. If R says the vignette was not found,
download the package and run devtools::install(build_vignettes = TRUE)
bmotif
considers all 44 unique bipartite motifs up to six nodes.
Within these motifs there are 148 unique positions.
bmotif
has two functions: mcount
and positions
. mcount
counts
occurrences of motifs in a bipartite network. positions
counts the
number of times each node in a network occurs in each of the positions
within the motifs.
The code is released under the MIT license (see LICENSE file).
If you use the package in your work, please cite: 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 (accepted)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.