This folder contains all the datasets and R scripts used in the study "Improving species abundance information from river eDNA metabarcoding data"

Authors: Eva Cereghetti, Florian Altermatt, Luca Carraro 
Year: 2026
R version: 4.3.3



-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
"eDITH_analysis_script.R"

Main script for the analysis of the study. All the data necessary for the script to run are contained in the "data" folder.

-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------



-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
"data" folder contains the following files and associated metadata


---------------------------------
"20250519_kicknet_clean.csv"

site_ID: unique site ID (character)
site_no: unique site ID (numeric)
week_number: week number associated to the sampling date
taxon: ID of the organism at the highest taxonomic resolution available
species: taxonomic rank, species
genus: taxonomic rank, genus
family: taxonomic rank, family
order: taxonomic rank, order 
presence: presence (= 1) or absence (= 0) of the specimen. Only presences are reported here.
nr_individuals: number of individuals collected in the kick-net sample


---------------------------------
"20250519_eDNA_clean.csv"

site_ID: unique site ID (character)
site_no: unique site ID (numeric)
week_number: week number associated to the sampling date
taxon: ID of the organism at the highest taxonomic resolution available
species: taxonomic rank, species
genus: taxonomic rank, genus
family: taxonomic rank, family
order: taxonomic rank, order 
presence: presence (= 1) or absence (= 0) of the specimen. Only presences are reported here.


---------------------------------
"sites_Necker_w_nodes.csv"

site_ID: unique site ID (character)
Location: name of the location
X: recorded longitude coordinates (CH1903 system)
Y: recorded latitude coordinates (CH1903 system)
Xedit: edited longitude coordinates (CH1903 system) such that attribution of sites to the river network is topologically correct
Yedit: edited latitude coordinates (CH1903 system) such that attribution of sites to the river network is topologically correct
Notes: details regarding the sampling location
AGnode: AG node of the extracted river network (generated within "extract_necker.R")
RNnode: RG node of the extracted river network (generated within "extract_necker.R")


---------------------------------
"taxa.samples.PCRpooled.rda"

Data containing the eDNA read counts for all samples collected (pooled PCR replicates). 
Row names indicate the taxon and column names are IDs indicating the sampling site, season and replicate

Column name ID structure, e.g., "1054":
First position indicates season (1 = spring, 4 = summer). Second and third positions indicate site_ID (1-25). Fourth position indicates field replicate number (1-5)  


---------------------------------
"Necker.rda"

River network data containing spatial and hydrological information about the Necker. See "extract_necker.R" for extraction procedure. 


---------------------------------
"results_dA_AEM25"

This folder contains the outputs of the eDITH model, generated within the "eDITH_analysis_script.R" script.

-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------





-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
"rivnet_extraction" folder contains the following files and associated metadata


---------------------------------
"extract_necker.R"

Script used to extract and generate the Necker river network ("data/Necker.rda") and the nodes associated to the sampling sites ("data/sites_Necker_w_nodes")


---------------------------------
"sites_Necker.csv"

site_ID: unique site ID (character)
Location: name of the location
X: recorded longitude coordinates (CH1903 system)
Y: recorded latitude coordinates (CH1903 system)
Xedit: edited longitude coordinates (CH1903 system) such that attribution of sites to the river network is topologically correct
Yedit: edited latitude coordinates (CH1903 system) such that attribution of sites to the river network is topologically correct
Notes: details regarding the sampling location

-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------

