GitHub repository for the manuscript On the structure of species-function participation in multilayer ecological networks and its supplementary information. Here, you'll find all the necessary materials to reproduce all results contained in the manuscript (https://doi.org/10.1101/2023.07.02.547400), including input data stored in the 'data/input' folder and output results stored in the 'data/output' folder.
All computational analysis was made using Python 3.10.8 running in a Linux desktop (version 22). Dependencies are listed at the beginning of each file. python3_enviroment contains the requirements.txt and enviroment_droplet.yml files needed to recreate a python environment with all libraries adn dependencies needed. To install the environment with conda, run conda env create -f environment_droplet.yml.
1- P_processing
is a folder that contains the necessary material to reproduce most of the results shown in the main manuscript and in the Suplementary Information.
2- FullCode.ipynb
is the notebook, and functions used are stored in FullCodeFunctions.py
.
3- Two very resource consuming plots have been separated from the rest. They are in the folder MFENplot
, wchich contains two python scripts to depict the Multifunctional Ecological Network (MFEN) (Print_MultiGraphs.py
generates Figure 2 from the main manusccripy and Print_MultiGraphs_info_multi.py
Figure 1a from SI) and a third one with the functions used in both (Plot_Mcomm_Lib.py
) using Netgraph.
In P_analytics.ipynb
:
1- Import the resource-function matrix FullCode.ipynb
.
2- Visualize
3- Build nestedness-based rankings (ordering species and functions in terms of their participation strength in
4- Build and plot
5- Look into hierarchical clustering properties of
6- Compute the conditioned
7- Build a null model for the keystonness scores.
NODF_WNODF
contains all the necessary material to reproduce NODF and WNODF results and null models from the main text using fortran90 using the resource-function matrix FullCode.ipynb
.
For NODF compile using:
f95 -O3 read_n.f nest_nodf.f dranxor.f90 -o nest_n.x
and run using:
./nest_n.x
For WNODF compile using:
f95 -O3 read_w.f nest_wnodf.f dranxor.f90 -o nest_w.x
and run using:
./nest_w.x
The random number generator used is: https://ifisc.uib-csic.es//raul/CURSOS/Stochastic_Simulation_Methods/dranxor.f90
Study site, Field sampling and Data curation:
- Sandra Hervı́as-Parejo
- Anna Traveset
- Isabel Donoso
- Ruben Heleno
- Manuel Nogales
- Susana Rodrı́guez-Echeverrı́a
Data analysis, Mathematical modelling, Network analysis and Simulations:
- Mar Cuevas-Blanco (P processing)
- Lucas Lacasa (P analytics)
- Victor M. Eguiluz (NODF_WNODF)
- Carlos J. Melian (provided guidance and advice)