\documentclass[10pt]{article}

\usepackage{fullpage}
\usepackage{setspace}
\usepackage{parskip}
\usepackage{titlesec}
\usepackage[section]{placeins}
\usepackage{xcolor}
\usepackage{breakcites}
\usepackage{lineno}
\usepackage{hyphenat}





\PassOptionsToPackage{hyphens}{url}
\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@combinedblfloats{\box\@outputbox}{\unvbox\@outputbox}{}{%
  \errmessage{\noexpand\@combinedblfloats could not be patched}%
}%
\makeatother


\usepackage{natbib}




\renewenvironment{abstract}
  {{\bfseries\noindent{\abstractname}\par\nobreak}\footnotesize}
  {\bigskip}

\titlespacing{\section}{0pt}{*3}{*1}
\titlespacing{\subsection}{0pt}{*2}{*0.5}
\titlespacing{\subsubsection}{0pt}{*1.5}{0pt}


\usepackage{authblk}


\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\providecommand\citet{\cite}
\providecommand\citep{\cite}
\providecommand\citealt{\cite}
% You can conditionalize code for latexml or normal latex using this.
\newif\iflatexml\latexmlfalse
\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}%

\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}

\usepackage[utf8]{inputenc}
\usepackage[ngerman,greek,english]{babel}



\usepackage{float}








\begin{document}

\title{Network analyses reveal the role of large snakes in connecting feeding
guilds in a species-rich Amazonian snake community}



\author[1]{Daniela Coelho}%
\author[2]{Marcio Martins}%
\author[2]{Paulo Guimarães Jr.}%
\affil[1]{Universidade de São Paulo}%
\affil[2]{Universidade de Sao Paulo}%


\vspace{-1em}



  
  \date{May 24, 2024}


\begingroup
\let\center\flushleft
\let\endcenter\endflushleft
\maketitle
\endgroup





\selectlanguage{english}
\begin{abstract}
In ecological communities, interactions between consumers and resources
lead to the emergence of ecological networks and a fundamental problem
to solve is to understand which factors shape network structure.
Empirical and theoretical studies on ecological networks suggest
predator body size is a key factor structuring patterns of interaction.
Because larger predators consume a wider resource range, including the
prey consumed by smaller predators, we hypothesized that variation in
body size favors the rise of nestedness. In contrast, if resource
consumption requires specific adaptations, predators are expected to
consume distinct sets of resources, thus favouring modularity. We
investigate these predictions by characterising the trophic network of a
species-rich Amazonian snake community (62 species). Our results
revealed an intricate network pattern resulting from larger species
feeding on higher diversity of prey, promoting nestedness, and specific
lifestyles feeding on distinct resources, promoting modularity. Species
removal simulations indicated that the nested structure is favored
mainly by the presence of five species of the family Boidae, which
because of their body size and generalist lifestyles connect modules in
the network. Our study highlights the particular ways traits affect the
structure of interactions among consumers and resources at the community
level.%
\end{abstract}%



\sloppy


\textbf{Introduction}

Interactions between species are a key component for understanding
biodiversity (Abram 1987). In fact, individuals of all species rely upon
ecological interactions to obtain food, to breed, or to protect against
natural enemies (Thompson 2005). Ecological interactions form networks
that connect populations of different species in a locality (Bascompte
and Jordano 2013). The organisation of these networks may have important
conservation implications, potentially affecting the robustness of
ecological systems to species loss (Schmitz and Beckerman 2007). In this
context, it is essential to understand how factors that influence the
interactions between individuals affect the structure of networks at the
level of ecological communities.

The structure of several ecological networks generally deviates from
what is expected for networks in which individuals interact randomly,
i.e., the interaction is proportional to the product of species
abundances (Krishna et al. 2008). These deviations from expected network
structure suggest that factors such as the characteristics of
interacting individuals and environmental conditions influence the
structural patterns of ecological networks at the community level. Among
the traits that may affect network structure is body size, which is
directly associated with the ability of individuals to consume resources
(Stouffer et al. 2011). If the larger the predator individual, the
greater its ability to kill larger prey we should expect, at the species
level, larger average body sizes to be correlated with a larger number
of resource types consumed by predator species (Sinclair et al. 2003).
Furthermore, if only body size were influencing the capacity to consume
a wider range of resources, it is expected that the diet of the smaller
predator species will be a subset of the items of the larger predator
species's diet, leading to nested ecological networks (Sinclair et al.
2003, Woodward et al. 2005, Stouffer et al. 2011).

On the other hand, food resources are not homogeneously distributed in
environments and the degree of specialisation in the consumption of
distinct sets of prey may require distinct adaptations (Schoener 1968,
Covich and McDowell 1996). For instance, the \emph{Anolis} lizards of
South Bimini islands divide habitat and the food resources according to
lizard average size classes, in which larger lizard species usually eat
larger food items than smaller lizard species (see Schoener 1968). Thus,
we can expect that due to the restrictions related to prey handling,
prey detection, or nutritional yield, larger predators are predisposed
to disregard smaller prey (Mittelbach 1981, Arnold 1993, Arim et al.
2010). In this sense, deviations from the perfectly nested pattern are
expected, enabling the formation of semi-isolated groups (modules) in
the network. Networks with a modular structure have stimulated much
interest due to its possible evolutionary and ecological consequences
(Ings et al. 2009). For instance, modules may represent coevolutionary
units (Thompson 2005) and increase the stability of ecological networks,
thus providing a potential mechanism through which complexity arise and
persist in ecological communities (Krause et al. 2003, Ings et al.
2009).

Here, we explore the trophic network organisation of a community
Amazonian snakes. Snakes have been used as a model system in studies on
the effect of ecological interactions on diversity (Martins et al. 2001,
Colston et al. 2010, Alencar et al. 2013, Bellini et al. 2015, Klaczko
et al. 2016, Alencar et al. 2017). These studies explore how ecological
traits, interspecific interactions, habitat use, and evolutionary
history influence the current trophic interactions of different species
of snakes. As snakes evolved morphological and behavioral adaptations to
kill and ingest their prey whole (Greene 1983), traits related to
different dietary habits of species make snakes a model study system to
understand how trophic interactions organise community structure (Shine
and Bonnet 2000).

Motivated by understanding the trophic organisation pattern of snake
communities, we here use as a model a rich and well-studied community of
Amazonian snakes (Martins and Oliveira 1998). We characterised the
structure of the interaction network between snakes and their food
resources. We expected that if only snake body size were shaping network
patterns at the species level, the structure would be nested; on the
other hand, if specialization in resource consumption were driving
patterns of resource use across snakes, modularity would be expected. We
then evaluated the role of different snake species and the effect of
snakes' habitat use (referred to here as a lifestyle) in shaping the
network structure.

\textbf{Methods}

\emph{The network structure of interactions between snakes and their
food resources}

We analysed the snake diet derived from a long-term study carried out in
a Central Amazonia site on the natural history of forest snakes (Martins
and Oliveira 1998). We described the resource use by snakes as an
interaction matrix \textbf{A} in which if a snake \emph{i} feeds on a
given resource \emph{j} and zero otherwise. The matrix \textbf{A}defines
a bipartite network in which snakes and resource types depict two
distinct set of nodes and links describe interactions between snake
species and food resources. Our food resources are not described at
species level but at coarse categories such as small mammals, medium
mammals and big mammals. Similar approach led to insights in the study
of food webs (Cohen 1977) and individual-based networks (Ara\selectlanguage{ngerman}újo et al.
2008). In fact, there is no intrinsically correct level of description
when characterizing an ecological network (Guimarães 2020). We opted for
these coarse categories because they are in agreement with (i) the
evidence that snakes are specialized in broad categories of resources,
e.g., serpentiform organisms that include snakes, amphisbaenians, and
caecilians (see Martins and Oliveira 1998); (ii) the level of detail
available from the diet analyses of snakes. Having said that, to verify
if our level of network description affects our analyses we performed a
set of sensitivity analyses (details below)\emph{.}

We used four metrics to characterise the structure of the interactions
network analysed: (i) degree distribution, which is the description on
how the number of food resources a given snake can feed on (the degree)
varies across snake species; (ii) connectance (\emph{C} ), which is the
proportion of all possible interactions actually recorded in the
network. Connectance values range from 0 (non-connected network) to 1
(maximum connectance); (iii) modularity (\emph{M} ), a measure of the
extent to which the network is formed by groups (modules) of snake
species in which snake within a module overlap in much of their
resources, whereas snakes in different modules show no or weak resource
use overlap; and (iv) nestedness (\emph{N} ), which consists of an
interaction pattern in which the specialists interact with sets of
resources with which the generalists also interact. Detailed
descriptions of the metrics are available in the Supplementary material
Appendix 1.

We used \emph{Q\textsubscript{B}} metric, defined by Barber (2007), to
characterise modularity, with values ranging from 0 (non-modular
network) to 1 (completely modular). A simulated annealing algorithm
(Guimerà \& Amaral 2005) was used to optimise
the\emph{Q\textsubscript{B}} value. Modularity analyses were performed
using the Modular program (Marquitti et al. 2014). All the above and the
following analyses were performed using R version 3.5.1 (R Core Team
2018), with the exception of modularity. We performed a set of
sensitivity analyses to verify if our results are dependent on our
approach to compute modularity (Supplementary material Appendix 1).

The NODF metric was used to characterise the nestedness degree
(Almeida-Neto et al. 2008) and its values ranges from 0 (non-nested
network) to 100 (perfect nestedness). The degree of nestedness and
modularity were then compared with a theoretical benchmark provided by
the null model 2 of Bascompte et al. (2003) (see detailed description in
Supplementary material Appendix 1). We generated 1000 null model
matrices to estimate nestedness and modularity. If a network shows a
degree of nestedness or modularity larger than expected by the null
model 2, then there is evidence of ecological or evolutionary processes
acting on the network organisation that goes beyond those shaping the
degree of specialisation of the snake species (e.g, Bascompte et al.
2003).

\emph{The role of snake species in network structure}

If the network of interactions analysed follows the organisation pattern
structured by body mass (i.e. presenting higher nestedness \selectlanguage{english}\selectlanguage{english}than
expected by the null model 2), we hypothesized snake average body mass
to be positively correlated with the number of resources consumed by the
snake species. To explore this prediction, we investigate the
association between average body mass and the role of species in the
network structure. We recorded the estimates of the average body mass of
each snake species in our network (data available in Feldman et al.
2016). Average body mass was log-transformed prior to analysis
(Supplementary material Appendix 2 Table A1).

In order to understand the individual contribution of each species of
snake to nestedness, we used a jackknife resampling approach in which we
removed a snake species and recomputing the degree of nestedness. We
repeated the procedure for all snake species in the network and then we
computed a change in nestedness: \selectlanguage{greek}\emph{ΔN\textsubscript{i} = N -
N\textsubscript{i},}\selectlanguage{english} in which \emph{N} is the degree of nestedness of
the complete network and \emph{N\textsubscript{i}} is the degree of
nestedness after the removal of a snake species \emph{i} . If body size
is shaping the contribution to nestedness, we should expect that
the\selectlanguage{greek}\emph{ΔN\textsubscript{i}}\selectlanguage{english} will assume increasingly positive values
as larger snakes are removed from the network, indicating that
nestedness is higher in the presence of these larger snake species.

\emph{The relationship between lifestyles and network structure}

Because dietary specialisation in snakes can be related to habitat
occupation (see Martins et al. 2002, Alencar et al. 2017), we expect
snake lifestyles to affect the degree of dietary specialisation (e.g.,
an aquatic snake would rely upon aquatic prey). If this is true, the
distribution of lifestyles in the different modules will not be random.
We evaluated this prediction using two analyses. First, we analysed the
frequency of snake lifestyles in different modules. We estimated the
probability of the observed number of species of a given lifestyle in a
given module be reproduced by randomly assigning species across modules,
but preserving the number of snake species in each lifestyle and the
number of snake species in each module (n = 1000 randomisations). Then,
we analysed the dissimilarity on lifestyles between modules. To do so,
we used the Bray-Curtis index, available in vegan package in R (Oksanen
et al. 2018) (see detailed description in Supplementary material
Appendix 1). Dissimilarity between a pair of modules range from 0
(modules are identical in the composition of lifestyles) to 1 (no
lifestyle occurs in both modules).

\emph{Sensitivity analyses}

Sampling effects may affect the description of network patterns.
Therefore, we performed a sensitivity analysis to explore how robust is
the description of network patterns to changes in our dataset. We add
information to the use of resources by snakes by using data from other
Amazonian regions, based on evidence that there is no significant
intraspecific variation on the snake's diet across different localities
in Amazonia (Martins and Oliveira, 1998; Supplementary material Appendix
1 and Appendix 2 Table A1).

Snake diet often include food resources that are main consumed and
resources that are only eventually consumed. We performed a sensitivity
analysis to check if the patterns reported in our study are robust
enough when considering the presence or absence of secondary resources
in the snake diet. We described two matrices of interactions: (1) a
matrix in which only main resources were considered; (2) and a matrix in
which both main and secondary resources were considered. We defined if a
resource is main or secondary according to information about snake diet
preferences available in Martins and Oliveira (1998). Then, we calculate
the nestedness and modularity values in the presence and absence of
secondary resources. The nestedness values of the two networks were
compared with a null model generated with 5,000 random removals of food
resources from each of the analysed networks. Finally, we calculated
whether there was a significant difference between the nestedness of the
network in the presence and absence of secondary resources.

Because taxonomic resolution might influence the detection of patterns
in the network (Rezende et al. 2009), we performed another sensitivity
analysis to check if the type of resource categorization could affect
the network patterns. Thus, we described two other matrices of
interaction with different degrees in the resources taxonomic
resolution: less specific network (Supplementary material Appendix 1
Figure A2 and Appendix 3 Table A1) and more specific network
(Supplementary material Appendix 1 Figure A3 and Appendix 4 Table A1).

\textbf{Results}

\emph{Network structure}

We recorded 163 interactions between 62 snake species and 26 food
resources (Figure 1 and Supplementary material Appendix 1 Figure A6)
that were heterogeneously distributed among snake species, where most of
them had few interactions (56.45\% snake species interacted with one or
two resource categories) and few species had many interactions (6.45\%
interacted with more than five resources; Supplementary material
Appendix 1 Figure A1). The network structure show moderate connectance
(C = 0.101) (Table 1), indicating that, from the variety of food items
consumed by snakes, the species analysed use, on average, 2-3 resources.
The snake-resource network also show significant nestedness (N = 33.14,
p \textless{} 0.01), indicating that 1/3 of the interactions of the less
connected species represent a subset of the interactions of the most
connected species. Finally, the network also show significant modularity
(M = 0.51, p = 0.03), indicating that the number of interactions within
each modules is 51\% larger than what is expected for a network with the
same number of modules, the same number of interactions per species, but
with random interactions between species.

Some snake species showed extreme specialisation, such as
\emph{Dipsas}spp., which feed exclusively on mollusks, and
\emph{Drepanoides anomalus} that rely upon eggs of squamate reptiles.
Other species, such as \emph{Atractus} spp., although specialist in the
consumption of earthworms, may also feed on insects. Similarly,
\emph{Micrurus surinamensis} primarily consume fish but secondarily
consume lizards and snakes. On the other hand, we found very generalist
species, such as\emph{Boa constrictor} and \emph{Epicrates cenchria} ,
which interacted with six resource types, \emph{Corallus hortulanus} ,
which interacted with eight resources and \emph{Eunectes murinus} , the
largest species of the network, which interacted with 11 resources.
Among the food resources consumed by many snake species were lizards
(24\% of all interactions), anurans (16\%), and small mammals (9\%),
comprising rodents and marsupials. Among the least consumed resources
were large mammals (such as cervids), turtles and alligators, only
consumed by\emph{Eunectes murinus} , onychophorans only consumed by
\emph{Micrurus hemprichii} , gymnophiona only consumed by \emph{M.
lemniscatus} , and salamanders, which were only consumed by
\emph{Chironius fuscus}(Supplementary material Appendix 2 Table A1).

To assess whether there was a difference in network structure based only
on the presence of primary resources in the snake diet, we removed all
non-primary resources and reanalysed the network. Even after removing
the secondary resources, network average degree and connectance remained
within the same range values (Table 1). The results also indicated that
there was no significant difference between the network nestedness
values with and without the presence of secondary resources (p = 0.147).
Even after the removal of non-primary items, the network remained
significantly nested (N = 29.46, p \textless{} 0.01). In contrast, the
modular structure was nonsignificant after removal of non-primary
resources (M = 0.47, p = 0.44). Similarity, to check if the type of food
resource categorization could affect the network patterns, we used the
same metrics to analyse the more specific and the less specific
networks. Our results hold even with different levels of detail on
resource description and all networks remained significantly nested and
modular (Supplementary material Appendix 1 Table A2).

Our results supported the prediction that there is a positive
association between the number of resources consumed and average body
size (slope = 1.41, R\textsuperscript{2} = 0.46, p \textless{} 0.01,
Figure 2), indicating that in general the largest species of snakes
showed a greater number of food interactions. Exceptions to this pattern
were \emph{Corallus caninus} (k = 3) and \emph{Lachesis muta} (k = 1),
both specialists in the consumption of mammals. Among the seven largest
snake species, five of them (\emph{Eunectes murinus, Boa constrictor,
Epicrates cenchria, Corallus hortulanus,} and \emph{Corallus caninus} )
belong to the family Boidae. Thus, this family is over-represented among
the set of heavier snakes in the network and our analysis may be biased
by the confounding factors generated by all other traits shared by boid
species. To circumvent this problem we explored if the correlation
between average body mass and degree holds within speciose snake
families. We performed correlation analyses between degree and average
body mass for species of the family Colubridae and for those of the
family Dipsadidae, the two largest snake families in the network. The
results indicated that a positive correlation between average body mass
and the number of resources consumed hold even for non-boid snakes and
partially controlling for phylogenetic effects, there was (see
Supplementary material Appendix 1 Figure A4 and A5).

\emph{The role of different species of snakes in network structure}

The correlation between degree and average body mass suggest nestedness
was driven by body size. In fact, there is a positive correlation
between delta nestedness and average body mass, indicating that the
largest snakes have a greater contribution to nestedness (slope = 0.4,
R\textsuperscript{2} = 0.37, p \textless{} 0.01, Figure 3). We performed
an removal analysis to further explore this pattern. We removed species
with more outlier values of average body mass and recalculated the
nestedness value. They were the seven largest snake species in the
network (\emph{Eunectes murinus, Boa constrictor, Lachesis muta,
Epicrates cenchria, Corallus hortulanus, Corallus caninus}
and\emph{Spilotes pullatus} ). If the largest snakes are key components
contributing to nestedness, we expected that nestedness after removal of
these species would be smaller than those generated by a null model in
which we randomly remove any seven species from the network and
recalculate the nestedness. Our results supported this prediction,
indicating that the nestedness values were smaller after the removal
of the seven largest snake species (N = 30.23, p \textless{} 0.01, n =
1,000 simulations of species removal).

\emph{The relationship between modularity and snake lifestyle}

The network also presented a modular structure, in which the consumption
of different resources divided the network into six different food
modules (Table 1 and Supplementary material Appendix 1 Table A3). We
expected that if the snake lifestyle was related to the formation of
food modules, the distribution of lifestyles in the different modules
would not be random. In fact, modules were associated with particular
lifestyles, as indicated by significant or marginally significant
probability values present in all modules but module 3 (Table 2). Module
3, was composed of species with the greatest variety in diet and
lifestyle, such as boid snakes. Modules with more specific combinations
of lifestyle and diet showed all significant or marginally significant
probability values (Figure 4). Moreover, the formation of groupings
based on diet and lifestyle occurred by species that specialise in the
consumption of certain food resources, probably associated with their
lifestyle. For example, the smallest module (number 5) was formed by
only two arboreal species of the genus \emph{Dipsas} that feed
exclusively on mollusks; another module grouped species of terrestrial
habits, such as \emph{Drepanoides anomalus, Drymoluber dichrous} ,
and\emph{Mastigodryas boddaerti} , which feed on squamate eggs, whereas
another module grouped fossorial species, such as \emph{Atractus} spp.
that are specialists in preying upon earthworms. On the other hand, the
remaining modules grouped species with varied lifestyles and generalist
diets.

As a consequence of the association between lifestyles and modular
structure, modules often show dissimilar combinations of lifestyles.
Dissimilarity values ranged from 0.33 to 1 (Table 2). The most
dissimular module (Module 0) was composed exclusively of snakes with the
fossorial lifestyle, such as the \emph{Atractus} species, specialists in
the consumption of earthworms. The most similar modules were modules 1
and 3, which as well as module 2 have the largest variety of lifestyles
and food resources consumed by the snakes (Supplementary material
Appendix 1 Table A3).

\textbf{Discussion}

Our results indicated that the network of interactions between snakes
and their resources in a species-rich Amazonian community presented a
combination of both nested and modular structure. Nestedness was related
to average body mass of snakes, in which boid snakes connect food
modules in the trophic network. The modular pattern, in turn, is
associated to the different snake lifestyles, in which snakes that share
similar habits usually consume similar resources available in their
shared microhabitats.

The observed connectance of the network indicated that, given the
variety of resources available in the environment, snake species
consumed only a subset of these resources. This result suggests that
most food resources may not be accessible to most species, suggesting
forbidden interactions (Olesen et al. 2010) associated with possible
restrictions related to lifestyle (see Savitzky 1983), as well as body
size (Sinclair et al 2003, Woodward et al. 2005, Stouffer et al. 2011).
For instance, arboreal snakes have morphological adaptations, such as a
slender body and long tail, which may represent limitations to the
consumption of large prey such as mammals (Martins et al. 2001, Alencar
et al. 2013, Alencar et al. 2017). The analysis of network structure
revaled that the patterns of resource use by different species lead, at
the community level, to nestedness and modularity. Our results contrast
with some studies on antagonistic networks that indicate opposite trends
between nestedness and modularity (Th\selectlanguage{ngerman}ébault and Fontaine 2010, Pires and
Guimarães 2012). Having said that, other studies simultaneously show
levels of nestedness and modularity (Bellay et al. 2011, Flores et al.
2013, Pinheiro et al. 2019). The emergence of these combined network
patterns is possible due to the low connectivity of the network
(Lewinsohn et al. 2006, Fortuna et al. 2010) and resource heterogeneity
(Pinheiro et al. 2019) in Amazonian forests.

Several processes may explain the nested patterns, such as variations in
species abundances (Lewinsohn et al. 2006). One of the explanations for
the nested pattern found in our study was the large size variation among
species present in the network. The variation in snake body mass has led
to a trophic hierarchy in which larger predators prey upon more resource
items than smaller predators. This hierarchy was detected in several
predator-prey interaction networks found in nature (Woodward et al.
2005, Smith and Mills 2008, Arim et al. 2010). This pattern indicates
that predators have the potential to add resources sequentially as they
increase in size, although this increment of larger resources may lead
to the rejection of smaller, less nutritious or difficult to handle
resources (Mittelbach 1981, Arnold 1993, Arim et al. 2010, Woodward et
al. 2010). In addition to body size, skull morphology is also an
important feature associated with diet and snake lifestyle (Pough and
Groves 1983, Savitzky 1983, Klaczko et al. 2016). The larger the head of
a snake, the greater the prey consumed (King 2002). Thus, future
research that investigates emerging patterns arising from the
association of both body size and skull morphology with the structure of
trophic interaction networks could predict the processes, at the
community-level, involved in the relationships between snakes and their
food resources.

When analysing the contribution of each species to nestedness, we found
that average body mass has a phylogenetic signal, with large species
concentrated in a few clades. After removing larger species, mostly
boids, the nestedness value decreases 8.78\% although it still remains
significant. The maintance of nestedness after the removal of large
snakes might be a consequence of the number of resource - body mass
association holds for smaller snake species, such colubrid and dipsadid
snakes. Boids are efficient constrictors with generalist diets, that
occupy diverse microhabitats, which allow them to consume a wide variety
of food resources (Pizzato et al. 2009, Henderson and Pauers 2012). This
combination of features may simultenouly explain why (i) boids act as
hubs (species with many interactions) in the analysed network, and (ii)
the decrease in nestedness when boids are removed from the network.
Large predators, such as sharks, killer whales, lions, and birds of
prey, often prey on diverse array of species (Sinclair et al. 2003),
potentially connecting modules in networks (e.g., Rezende et al. 2009).
Future research could test whether the presence of such large predators
can also promote nestedness on predator-prey interaction networks.

The modular structure in ecological networks may be associated to
factors such as the degree of specialisation among interacting species
(Prado and Lewinsohn 2004, Lewinsohn et al. 2006), habitat heterogeneity
(Pimm and Lawton 1980), the phylogenetic relationship between species
(Lewinsohn et al. 2006), the convergence in a set of species traits
(Olesen et al. 2007) or by a combination of factors (Donatti et al.
2011). We found that the consumption of specific resources is associated
with more peculiar lifestyles. For instance, morphological adaptations
to fossorial habit (e.g. less cranial mobility) hinder the consumption
of prey larger than the snake's head size (Greene 1983, Savitzky 1983,
Martins and Oliveira 1993). Accordingly, arboreal habits impose physical
limitations on snake morphology and may restrict the consumption of
larger prey, such as small mammals, favoring a diet based on lizards
and/or frogs (Lillywhite and Henderson 1993, Martins et al. 2001,
Martins et al. 2002, Alencar et al. 2013). Thus, we suggest that the
modularity of the network we studied has emerged from the relationship
between the lifestyles of snakes and the consumption of resources
restricted to the habitats used by the species.

To sum up, we integrate network structure analyses with species removal
simulations to evaluate the role of different snake species in the
structure of a rich Amazonian snake community, and the mechanisms
underlying the patterns found. We encourage future studies to focus on
understanding how community phylogenetic diversity may be associated
with the modular structure (Rezende et al. 2009), as well as how the
combination of traits associated with predator diet (e.g. its
correlation with body size and skull shape) may contribute to the nested
pattern and if geographic variation (environment type) can modify
network structure (Pimm and Lawton 1980, Kortsch et al. 2019). This
study points to the joint importance of the evolutionary history of
lineages, body size, and their interacting resources to determine the
structure, at the community scale, of the interactions between consumers
and their resources.

\textbf{Data Accessibility Statement}

We declare that all data supporting the conclusions of this study
(dataset, and supplementary information) are uploaded in Dryad ( DOI
https://doi.org/10.5061/dryad.f1vhhmgvt.) and will be available by the
time the paper is accepted.

\textbf{References}

Abram, P. A. 1987. On classifying interactions between populations. -
Oecologia 73: 272-281.

Alencar, L. R. V. et al. 2013. The Evolution of Diet and Microhabitat
Use in Pseudoboine Snakes. -- South Am. J. Herpetol. 8: 60--66.

Alencar, L. R. V. et al. 2017. Arboreality constrains morphological
evolution but not species diversification in vipers. - Proc. Royal Soc.
B 284: 20171775.

Almeida-Neto, M. et al. 2008. A consistent metric for nestedness
analysis in ecological systems: reconciling concept and measurement. -
Oikos 117: 1227--1239.

Araújo, M. S. et al. 2008. Network analysis reveals contrasting effects
of intraspecific competition on individual vs. population diets. -
Ecology 89: 1981--1993.

Arim, M. et al. 2010. Food web structure and body size: trophic position
and resource

Acquisition. - Oikos 119: 147-153.

Arnold, S. J. 1993. Foraging theory and prey size----predator-size
relations in snakes. - In Seigel, R. A. and Collins, J. T. (eds.),
Snakes: Ecology and Behavior. McGraw-Hill, New York, pp. 87--115.

Barber, M. J. 2007. Modularity and community detection in bipartite
networks. -- Phys. Rev. E 76: 066102.

Bascompte, J. et al. 2003. The nested assembly of plant-animal
mutualistic networks. - PNAS 100: 9383--9387.

Bascompte, J. and Jordano, P. 2013. Mutualistic Networks. - Princeton:
Princeton University Press.

Bellay, S. et al. 2011. A host-endoparasite network of Neotropical
marine fish: are there organizational patterns? - Parasitology 138:
1945--1952.

Bellini, G. P. et al. 2015. Temperate Snake Community in South America:
Is Diet Determined by Phylogeny or Ecology? - Plos One 10: 1-15.

Cohen, J. E. 1977. Food Webs and Niche Space. Princeton University
Press, Princeton, New Jersey, USA.

Colston, T. J. et al. 2010. Snake diets and the deep history hypothesis.
-- Biol. J. Linn. Soc. 101: 476--486.

Covich, A. P. and McDowell, W. H. 1996. The stream community. - In
Reagan D. P. and Waide, R. B. (eds), The food web of a tropical
rainforest. University of Chicago Press, Chicago, Illinois, pp.
433--459.

Donatti, C. I. et al. 2011. Analysis of a hyper-diverse seed dispersal
network: modularity and underlying mechanisms. -- Ecol. Letters 14:
773--781.

Feldman, A. et al. 2016. Body sizes and diversification rates of
lizards, snakes, amphisbaenians and the tuatara. - Global Ecol.
Biogeogr. 25: 187--197.

Flores, C. O. et al. 2013. Multi-scale structure and geographic drivers
of cross-infection within marine bacteria and phages. - ISME J. 7:
520--532.

Fortuna, M. A. et al. 2010. Nestedness versus modularity in ecological
networks: two sides of the same coin? - J. Anim. Ecol. 79: 811--817.

Greene, H. W. 1983. Dietary correlates of the origin and radiation of
snakes. - Amer. Zool. 23: 431--441.

Guimarães, P. R. 2020. The structure of ecological networks across
levels of organization. - Annual Review of Ecology, Evolution, and
Systematics (in press).

Guimera\selectlanguage{english}, R. and Amaral, L. A. 2005. Functional cartography of complex
metabolic networks. Nature 433: 895--900.

Henderson, R. W. and Pauers, M. J. 2012. On the diets of neotropical
treeboas (Squamata: Boidae: \emph{Corallus} ). -- South Am. J. Herpetol.
7: 172-180.

Ings, T. C. et al. 2009. Ecological networks -- beyond food webs. - J.
Anim. Ecol. 78: 253- 269.

King, R. B. 2002. Predicted and observed maximum prey size-snake size
allometry. - Funct. Ecol. 16: 766-772.

Klaczko, J. et al. 2016. Are Diet Preferences Associated to Skulls Shape
Diversification in Xenodontine Snakes? - PLoS One 11: 1-12.

Kortsch, S. et al. 2019. Food-web structure varies along environmental
gradients in a high-latitude marine ecosystem. - Ecography 42: 295--308.

Krause, A. E. et al. 2003. Compartments revealed in food-web structure.
- Nature 426: 282--285.

Krishna, A. et al. 2008. A neutral-niche theory of nestedness in
mutualistic networks. - Oikos 117: 1609--1618.

Lewinsohn, T. M. et al. 2006. Structure in plant-animal interaction
assemblages. - Oikos 113: 174--184.

Lillywhite, H. B. and Henderson, R. W. 1993. Behavioral and functional
ecology of arboreal snakes. -- In: Seigel, R. A. and Collins, J. T.
(eds.), Snakes: ecology and behavior. New York: McGraw-Hill, pp. 1-48.

Marquitti, F. M. D. et al. 2014. MODULAR: Software for the autonomous
computation of modularity in large network sets. - Ecography 37:
221--224.

Martins, M. and Oliveira, M. E. 1993. The snakes of the genus Atractus
Wagler (Reptilia: Squamata: Colubridae) from the Manaus region, central
Amazonia, Brazil. -- Zool. Meded. 67: 21-40.

Martins, M. and Oliveira, M. E. 1998. Natural history of snakes in
forests of the manaus region, Central Amazonia, Brazil. -- Herpetol.
Nat. History 6: 78-150.

Martins, M. et al. 2001. Diversity and evolution of macrohabitat use,
body size and morphology in a monophyletic group of Neotropical
pitvipers (Bothrops). -- J. Zool. 254: 529-538.

Martins, M. et al. 2002. Ecological and phylogenetic correlates of
feeding habits in Neotropical pitvipers (Genus \emph{Bothrops} ). -- In:
Schuett, G. W. et al. (eds.), Biology of the vipers. Eagle Mountain
Publishing, Eagle Mountain, pp. 307-328.

Mittelbach, G. G. 1981. Foraging efficiency and body size: a study of
optimal diet and habitat use by Bluegills. - Ecology 62: 1370--1386.

Oksanen, J. et al. 2018. vegan: Community Ecology Package. R package
version 2.5-2. https://CRAN.R-project.org/package=vegan.

Olesen, J. M. et al. 2007. The modularity of pollination networks. -
PNAS. 104: 19891--19896.

Olesen, J. M. et al. 2010. Missing and forbidden links in mutualistic
networks. -- Proc. Royal Soc. B 278: 725-732.

Pimm, S. L. and Lawton, J. H. 1980. Are food webs compartmented? -- J.
Anim. Ecol. 49, 879--898.

Pinheiro, R. B. P. et al. 2019. A new model explaining the origin of
different topologies in interaction networks. - Ecology 100: e02796.

Pires, M. M. and Guimara\selectlanguage{english}es, P. R. 2012. Interaction intimacy organizes
networks of antagonistic interactions in different ways. -- J. R. Soc.
Interface 10: 20120649.

Pizzatto, L. et al. 2009. Food habits of Brazilian boid snakes: overview
and new data, with special reference to \emph{Corallus hortulanus} . -
Amphibia-Reptilia 30: 533-544.

Pough, H. and Groves, J. D. 1983. Specializations of the Body Form and
Food Habits of Snakes. - Am. Zool. 23: 443-454.

Prado, P. I. and Lewinsohn, T. M. 2004. Compartments in insect-plant
associations and their consequences for community structure. - J. Anim.
Ecol. 74: 1168-1178.

R Core Team. 2018. R: A language and environment for statistical
computing. R Foundation for Statistical Computing, Vienna, Austria. URL
https://www.R-project.org/.

Rezende, E. L. et al. 2009. Compartments in a marine food web associated
with phylogeny, body mass, and habitat structure. - Ecol. Lett. 12:
779--788.

Savitzky, A. H. 1983. Coadapted Character Complexes Among Snakes:
Fossoriality, Piscivory, and Durophagy. - Am. Zool. 23: 397-409.

Schmitz, O. J. and Beckerman, A. P. 2007. Food Webs. Encyclopedia of
Life Sciences, John Wiley \& Sons.

Schoener, T. W. 1968. The Anolis Lizards of Bimini: Resource
Partitioning in a Complex Fauna. - Ecology 49: 704-726.

Shine, R. and Bonnet, X. 2000. Snakes: a new `model organism' in
ecological research? - TREE 15: 221--222.

Sinclair, A. R. E. et al. 2003. Patterns of predation in a diverse
predator--prey system. - Nature 425: 288-290.

Smith, N. O. and Mills, M. G. L. 2008. Predator--prey size relationships
in an African large-mammal food web. J. Anim. Ecol. 77: 173--183.

Stouffer, D. B. et al. 2011. The role of body mass in diet contiguity
and food-web structure. - J. Anim. Ecol. 80: 632--639.

The\selectlanguage{english}bault, E. and Fontaine, C. 2010. Stability of Ecological Communities
and the Architecture of Mutualistic and Trophic Networks. - Science 329:
853-856.

Thompson, J. N. 2005. The Geographic Mosaic of Coevolution. University
of Chicago Press, Chicago.

Woodward, G. et al. 2005. Body size in ecological networks. - TREE 20:
402-409.

Woodward, G. et al. 2010. Individual-based foodwebs: Species identity,
body size and sampling effects. -- Adv. Ecol. Res. 43: 211--266.

\textbf{Captions of the main text figures:}

Figure 1: Network describing the interactions (lines) between species of
Amazonian snakes (circles) and their food resources (triangle).

Figure 2: The number of categories of food resources consumed by
different snake species is positively associated with the snake average
body mass (slope = 1.41, R2 = 0.46, p \textless{} 0.01) in a network of
interactions between Amazonian snakes and their resources. Each point
represents a species and the colors represent the different snake
families. To avoid overlap, some points have been slightly offset from
their original position on the x-axis.

Figure 3: In simulations of species removal, changes in the level of
nestedness are positively associated with the snake average body mass of
the removed species (slope = 0.40, R2 = 0.37, p \textless{} 0.01). Note
the stronger, negative changes on nestedness are associated with Boidae
snakes (red).

Figure 4: The probability of the observed number of species of a given
lifestyle in a given module of being reproduced randomly. Red color
indicates higher frequency, with a 95\% confidence interval.

Table 1: Relationship of the network structure analysis of interactions
between Amazonian snakes and their food resources. S = snake species
richness in the network; R = food resources richness (Note that with the
removal of species from the network occurs the loss of interactions,
which may reduce the number of resources); SD = average degree; C =
connectivity; N = nestedness; Nrel = relative nestedness; M =
modularity; Mrel = relative modularity; nM = number of food modules.\selectlanguage{english}
\begin{longtable}[]{@{}llllllllllll@{}}
\toprule
\textbf{Web} & \textbf{S} & \textbf{R} & \textbf{SD} & \textbf{C} &
\textbf{N} & \textbf{p N} & \textbf{Nrel} & \textbf{M} & \textbf{p M} &
\textbf{nM} & \textbf{Mrel}\tabularnewline
\midrule
\endhead
Complete web & 62 & 26 & 2.62 & 0.10 & 33.14 & p\textless{}0.01 & 0.94 &
0.51 & p=0.03 & 6 & 0.11\tabularnewline
Without secondary resources & 62 & 24 & 2.34 & 0.09 & 29.46 &
p\textless{}0.01 & 0.93 & 0.48 & p=0.44 & 7 & 0.03\tabularnewline
Without the 7 largest species & 55 & 18 & 2.23 & 0.12 & 30.23 &
p\textless{}0.01 & 0.69 & 0.53 & p=0.06 & 7 & 0.12\tabularnewline
Without species of Boidae & 57 & 19 & 2.26 & 0.12 & 30.42 &
p\textless{}0.01 & 0.74 & 0.53 & p=0.01 & 7 & 0.13\tabularnewline
\bottomrule
\end{longtable}

Table 2: Comparison between the real interaction matrix, the
dissimilarity matrix, and the likelihood matrix of the lifestyle by food
module of the network of interactions between Amazonian snakes and their
food resources. Lines represent the six (0-5) food modules and columns
represent the lifestyles of the snakes. Asterisks represent significant
or marginally significant values of probability.

\textbf{Real matrix}\selectlanguage{english}
\begin{longtable}[]{@{}llllllll@{}}
\toprule
\textbf{Modules} & \textbf{Aquatic} & \textbf{Arboreal} &
\textbf{Fossorial} & \textbf{Semi-arboreal} & \textbf{Semi-fossorial} &
\textbf{Terrestrial} & \textbf{n species}\tabularnewline
\textbf{0} & 0 & 0 & 10 & 0 & 0 & 0 & 10\tabularnewline
\textbf{1} & 1 & 9 & 0 & 0 & 2 & 11 & 23\tabularnewline
\textbf{2} & 2 & 0 & 3 & 1 & 3 & 2 & 11\tabularnewline
\textbf{3} & 1 & 5 & 0 & 1 & 0 & 6 & 13\tabularnewline
\textbf{4} & 0 & 0 & 0 & 0 & 0 & 3 & 3\tabularnewline
\textbf{5} & 0 & 2 & 0 & 0 & 0 & 0 & 2\tabularnewline
\textbf{n species} & 4 & 16 & 13 & 2 & 5 & 22 & 62\tabularnewline
\textbf{Dissimilarity matrix} & \textbf{Dissimilarity matrix} &
\textbf{Dissimilarity matrix} & \textbf{Dissimilarity matrix} &
\textbf{Dissimilarity matrix} & \textbf{Dissimilarity matrix} &
\textbf{Dissimilarity matrix} &\tabularnewline
\textbf{Modules} & \textbf{0} & \textbf{1} & \textbf{2} & \textbf{3} &
\textbf{4} & \textbf{5} &\tabularnewline
\textbf{0} & 0 & 1 & 0.714 & 1 & 1 & 1 &\tabularnewline
\textbf{1} & 1 & 0 & 0.706 & 0.333 & 0.769 & 0.840 &\tabularnewline
\textbf{2} & 0.714 & 0.706 & 0 & 0.667 & 0.714 & 1 &\tabularnewline
\textbf{3} & 1 & 0.333 & 0.667 & 0 & 0.625 & 0.733 &\tabularnewline
\textbf{4} & 1 & 0.769 & 0.714 & 0.625 & 0 & 1 &\tabularnewline
\textbf{5} & 1 & 0.840 & 1 & 0.733 & 1 & 0 &\tabularnewline
\textbf{Probability matrix} & \textbf{Probability matrix} &
\textbf{Probability matrix} & \textbf{Probability matrix} &
\textbf{Probability matrix} & \textbf{Probability matrix} &
\textbf{Probability matrix} &\tabularnewline
\textbf{Modules} & \textbf{Aquatic} & \textbf{Arboreal} &
\textbf{Fossorial} & \textbf{Semi-arboreal} & \textbf{Semi-fossorial} &
\textbf{Terrestrial} &\tabularnewline
\textbf{0} & 1 & 1 & 0* & 1 & 1 & 1 &\tabularnewline
\textbf{1} & 0.839 & 0.06* & 1 & 1 & 0.622 & 0.121 &\tabularnewline
\textbf{2} & 0.152 & 1 & 0.41 & 0.303 & 0.035* & 0.969 &\tabularnewline
\textbf{3} & 0.647 & 0.197 & 1 & 0.386 & 1 & 0.276 &\tabularnewline
\textbf{4} & 1 & 1 & 1 & 1 & 1 & 0.027* &\tabularnewline
\textbf{5} & 1 & 0.078* & 1 & 1 & 1 & 1 &\tabularnewline
\bottomrule
\end{longtable}\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/Figure-1/Figure-1}

\end{center}
\end{figure}\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/Figure-2/Figure-2}

\end{center}
\end{figure}\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/Figure-3/Figure-3}

\end{center}
\end{figure}\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/Figure-4/Figure-4}

\end{center}
\end{figure}

\selectlanguage{english}
\FloatBarrier
\end{document}

