This repository contains all the compiled data, code and further generated data from the work "A trait-based approach to assess niche overlap and functional distinctiveness between non-indigenous and native species" authored by Antoni Vivó-Pons, Mats Blomqvist, Anna Törnroos and Martin Lindegren.
IMPORTANT: ALL the plots and figure panels shown in the manuscript were post-processed in Adobe Illustrator, therefore the "raw" versions of the plots obtained with the following code might have different variable names or not be gathered in the same way as they appear in the manuscript. Additionally, the NIS illustrations shown within some figures were also created using Adobe Illustrator. In any case, the provided code allows for obtaining identical, but raw versions of all the figures included in the manuscript.
The folder Raw_data contains the original data files from which all the other databases included in the Data folder are derived.
- env_data.txt; contains all the environmental data extracted from the ice-ocean NEMO nordic model.
- sp_status.txt; accounts for the name, phylum and origin (native or NIS) from all the included taxa.
- sp_traits_raw.txt; trait information for all species.
- species_AFDW_2005_2020.txt; species abundance measures (n individuals, wet weight, AFDW) and details for all the specific sampling events
- species_site_AFDW_2005.txt; site x species biomass (AFDW) matrix
- Di_metrics_station.txt; several metrics obtained at local scale, in each sampling event, including NIS local distinctiveness, species richness and Shannon index, among others.
- Trait_modalities; list with all the trait and corresponding modalities.
- dist_matrix_ovrll.txt; overall pairwise matrix of functional distances between species.
- sp_traits.txt; cleaned species traits used in the analysis.
- spe_index.txt; distinctiveness values for all species in the regional pool.
- traits.effects.txt; effect of each trait on regional distinctiveness for each species.
Libraries. List of required libraries.
Functions. List of needed functions.
01_Descriptive_figures. This script contains the code related to the descriptive figures of the data used in the study.
02_Distinctiveness_regional (Step I & II). This script corresponds to the 1st and 2nd steps from the proposed framework, related to the computation of functional distinctiveness of NIS and natives at a regional scale (regional species pool).
03_Distinctiveness_local (Step III). This script corresponds to the 3rd step from the proposed framework, related to the computation of functional distinctiveness of NIS together with other community metrics at a local scale (local species pools).
04_Statistical_analysis (Step III). This script contains all the code related with the multi- and single modeling approaches included in the study to detect potential drivers of NIS distinctiveness at a local scale.
Env_data_extraction. Example of extracting environmental data from several .NC files, downloaded from the Copernicus Marine Service.