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 motif analyses of 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. K E Y W O R D Sbipartite networks, food web, matlab, motifs, pollination, Python, R, seed dispersal This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.
221. Bipartite networks are widely-used to represent a diverse range of species interactions, such as 23 pollination, herbivory, parasitism and seed dispersal. The structure of these networks is usually 24 characterised by calculating one or more metrics that capture different aspects of network architecture. 25While these metrics capture useful properties of networks, they only consider structure at the scale of 26 the whole network (the macro-scale) or individual species (the micro-scale). 'Meso-scale' structure 27 between these scales is usually ignored, despite representing ecologically-important interactions. 28Network motifs are a framework for capturing this meso-scale structure and are gaining in popularity. 29However, there is no software available in R, the most popular programming language among 30 ecologists, for conducting motif analyses in bipartite networks. Similarly, no mathematical 31 formalisation of bipartite motifs has been developed. 32 2. Here we introduce bmotif: a package for counting motifs, and species positions within motifs, in 33 bipartite networks. Our code is primarily an R package, but we also provide MATLAB and Python code 34 of the core functionality. The software is based on a mathematical framework where, for the first time, 35we derive formal expressions for motif frequencies and the frequencies with which species occur in 36 different positions within motifs. This framework means that analyses with bmotif are fast, making 37 motif methods compatible with the permutational approaches often used in network studies, such as 38 null model analyses. 39 3. We describe the package and demonstrate how it can be used to conduct ecological analyses, using 40 two examples of plant-pollinator networks. We first use motifs to examine the assembly and 41 disassembly of an Arctic plant-pollinator community, and then use them to compare the roles of native 42 and introduced plant species in an unrestored site in Mauritius. 43 4. bmotif will enable motif analyses of a wide range of bipartite ecological networks, allowing future 44 research to characterise these complex networks without discarding important meso-scale structural 45 detail. 46 47
String data are often disseminated to support applications such as location-based service provision or DNA sequence analysis. This dissemination, however, may expose sensitive patterns that model confidential knowledge (e.g., trips to mental health clinics from a string representing a user’s location history). In this article, we consider the problem of sanitizing a string by concealing the occurrences of sensitive patterns, while maintaining data utility, in two settings that are relevant to many common string processing tasks. In the first setting, we aim to generate the minimal-length string that preserves the order of appearance and frequency of all non-sensitive patterns. Such a string allows accurately performing tasks based on the sequential nature and pattern frequencies of the string. To construct such a string, we propose a time-optimal algorithm, TFS-ALGO. We also propose another time-optimal algorithm, PFS-ALGO, which preserves a partial order of appearance of non-sensitive patterns but produces a much shorter string that can be analyzed more efficiently. The strings produced by either of these algorithms are constructed by concatenating non-sensitive parts of the input string. However, it is possible to detect the sensitive patterns by “reversing” the concatenation operations. In response, we propose a heuristic, MCSR-ALGO, which replaces letters in the strings output by the algorithms with carefully selected letters, so that sensitive patterns are not reinstated, implausible patterns are not introduced, and occurrences of spurious patterns are prevented. In the second setting, we aim to generate a string that is at minimal edit distance from the original string, in addition to preserving the order of appearance and frequency of all non-sensitive patterns. To construct such a string, we propose an algorithm, ETFS-ALGO, based on solving specific instances of approximate regular expression matching. We implemented our sanitization approach that applies TFS-ALGO, PFS-ALGO, and then MCSR-ALGO, and experimentally show that it is effective and efficient. We also show that TFS-ALGO is nearly as effective at minimizing the edit distance as ETFS-ALGO, while being substantially more efficient than ETFS-ALGO.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2025 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.