Data and code from: Urbanization drives patterns of individual specialization but not dietary diversity among coyotes
Data files
Jul 29, 2026 version files 4.83 MB
-
Kreling_EaE_Code.zip
4.73 MB
-
Meta_Data_Sheet.pdf
68.71 KB
-
README.md
12.53 KB
-
ReadMe.Rmd
11.75 KB
Abstract
Niche partitioning and resource specialization can lead to spatial heterogeneity in trophic dynamics, but little is known about how these dynamics may change across landscapes of varying complexity. Urban ecosystems are characterized by a wider array of both natural and anthropogenic food sources, which can increase predator densities compared to exurban/rural and wildland areas. Urbanization could thus intensify intraspecific competition and facilitate individual specialization, or relax intraspecific competition if resources are not limited, leading to more generalized diets. To investigate how urbanization affects dietary niche breadth and individual specialization, we used fecal metabarcoding to analyze vertebrate and plant dietary components of 50 coyotes (Canis latrans) across three landscapes in Washington, USA: the Seattle metropolitan area, Bainbridge Island, and two wildland study sites. Population level dietary richness was similar between urban and island coyotes (x̄ = 51 and 49 taxa, respectively), but considerably lower for wildland coyotes (x̄ = 33 taxa). Across sites, coyotes ate a variety of Rosaceae plants, voles, and rabbits. Deer were an important food source for wildland coyotes, but not for urban or island coyotes. Despite variation in population-level richness, individual dietary richness was surprisingly consistent within individuals across regions. Urban and exurban island coyotes had the lowest degrees of individual specialization, whereas wildland coyotes exhibited the highest degree of individual specialization. Specialization and dietary diversity may be constrained by home range size and the diversity of prey types available to an individual coyote, highlighting the importance of landscape and prey heterogeneity across landscapes. These findings suggest that urbanization can relax intraspecific competition among predators, whereas individual dietary specialization may have a greater influence on predator-prey dynamics and human-wildlife conflict in more natural ecosystems with less anthropogenic influence.
Dataset DOI: 10.5061/dryad.44j0zpcxg
Description of the data and file structure
title: "ReadMe"
output: html_document
date: "2026-05-26"
knitr::opts_chunk$set(echo = TRUE)
# Contents
Below are the major folders you will find in this directory. Each folder has a brief definition here. Each script is commented to facilitate understanding of what scripts are doing.
Please note that original sequencing files are available upon request (40+gb of data), but that scripts to clean this data are present within the file itself. All other files are present within this directory.
RCode - all scripts necessary to take sequencing data from sequencing center to final end analyses.
Sequence_Data - Files created from the processing of sequencing data and individual identification files that allow samples to be assigned to individual coyotes.
Kreling_EaE_Code.Rproj - an R project file that will help anyone be able to run the code without having to set up custom file paths.
ReadMe.Rmd - The readme file that you are currently looking at that explains and defines each script and file located within the parent directory
BarGraph.pdf - Figure 5
Individual8plus_Season_Urban_Wildland.csv - distribution of samples by indvidiual coyote with at least 8 scat samples across study sites by season
# RCode
Located within the 'RCode' folder, there are two main folders
1. CleanSequenceData: This folder holds scripts that process and clean the data from the sequencing center
*Step_1-Bash:* This folder holds the first scripts used in the pipeline to clean sequence data in Bash/Shell/Terminal
a. Clean_From_SequencingCenter.docx: A document with code chunks meant to trim and quality control reads from the sequencing center
*Step_2-DADA:* This folder holds the second set of scripts used in the pipeline and should be run after the scripts in Step 1. These scripts process the output from Step 1, complete further trimming and quality control steps, merge forward and reverse reads, and remove bimeras. There is a script for each study area and each sequencing run we got data back for from that study area
a. DADA2_Bainbridge_NGS2.Rmd: DADA pipeline for the sequences from the island study area (Bainbridge Island) for the second sequencing run
b. DADA2_Extraction_Blanks3.Rmd: DADA pipeline for the sequences from the extraction and PCR blanks for the third sequencing run
c. DADA2_ExtractionBlanks_NGS2.Rmd: DADA pipeline for the sequences from the extraction and PCR blanks for the second sequencing run
d. DADA2_ExtractionBlanks_NGSFull.Rmd: DADA pipeline for the sequences from the extraction and PCR blanks for the first sequencing run
e. DADA2_MV_NGSFull.Rmd: DADA pipeline for the sequences from the Methow Valley rural area for the first sequencing run
f. DADA2_NE_NGSFull.Rmd: DADA pipeline for the sequences from the Northeast rural area for the first sequencing run
g. DADA2_Rural_NGS2.Rmd: DADA pipeline for the sequences for both rural areas for the second sequencing run
h. DADA2_Rural_NGS3.Rmd: DADA pipeline for the sequences for both rural areas for the third sequencing run
i. DADA2_SE_NGS2.Rmd: DADA pipeline for the sequences for the urban Seattle area for the second sequencing run
j. DADA2_SE_NGS3.Rmd: DADA pipeline for the sequences for the urban Seattle area for the third sequencing run
k. DADA2_Seattle_NGSFull.Rmd: DADA pipeline for the sequences for the urban Seattle area for the first sequencing run
*Step_3-R:*
In this file are four folders - 1 for each study area and 1 for the extraction/PCR blanks. There is also the Combine Runs script which should be used to combine information for each study area across sequencing runs after they have been through the previous Bash and DADA pipelines. The scripts in the 'Blanks' folder should be run next as outputs from this are used to remove any contamination from the subsequent study area sequences.
Blanks: This folder holds scripts for removing contamination from the Blanks
a. Blanks_R1_DataProcessing.Rmd: Averages the number of reads (contamination) across each replicate for the first sequencing run
b. BlanksR2_Processing.Rmd: Averages the number of reads (contamination) across each replicate for the last two sequencing runs
Island: This folder holds scripts for removing contamination and generating FOO from the Island samples
a. SEB01_DataProcessing.Rmd: This script averages the reads for each sequence for each sample across replicates
b. SEB02_RemoveContamination.Rmd: This script removes contamination found in each extraction blank that was associated with a given sample from that sample. It also adds individual coyote information to the dataset and sequence taxonomy
c. SEB03_Remove_CanidHuman_Cutoff.Rmd: This Script splits the dataset into plant and vertebrate diet items, identifies any samples not likely to be of coyote origin (# of other carnivore reads > # of canid read), removes human contamination, and aggregates the number of reads per taxon
Rural: This folder holds scripts for removing contamination and generating FOO from the Rural samples
a. RC01_Data_Processing.Rmd: This script averages the reads for each sequence for each sample across replicates for the first 2 sequencing runs
b. RC1_NGS3.Rmd: "" for the 3rd sequencing run
c. RC02_080723_Remove_Contamination.Rmd: This script removes contamination found in each extraction blank that was associated with a given sample from that sample. It also adds individual coyote information to the dataset and sequence taxonomy
d. RC03_Remove_Cutoff.Rmd: : This script averages the reads for each sequence for each sample across replicates for the first 2 sequencing runs
e. RC3_NGS3.Rmd: "" for the 3rd sequencing run
Urban: This folder holds scripts for removing contamination and generating FOO from the urban Seattle samples
a. SE01_Data_Processing_ .Rmd: These 3 scripts averages the reads for each sequence for each sample across replicates each for one seqeuncing run
b. SE02_ .Rmd: This script removes contamination found in each extraction blank that was associated with a given sample from that sample. It also adds individual coyote information to the dataset and sequence taxonomy. A script for each sequencing run
c. SE03_Remove_CanidHuman_Cutoff.Rmd: This script averages the reads for each sequence for each sample across replicates for combined data across sequencing runs
2. Analyses: This folder contains scripts that conduct post-cleaning analyses
a. SE04_Bainbridge_FOO.Rmd: Generates individual and population-level FOO, basic stats, diversity metrics, for Island samples
b. SE04_Rural_Coyote_FOO.Rmd: Generates individual and population-level FOO, basic stats, diversity metrics, for rural samples
c. SE04_GreaterSeattle_FOO.Rmd: Generates individual and population-level FOO, basic stats, diversity metrics, for urban samples
d. RarifiedRichness.Rmd: Calculates rarified richness across study area samples
e. ANOVA_Tests.Rmd: test for differences among study areas for e index and levins niche breadth across individuals, calcualtes 95% CIs for diet diveristy and richness metrics
f. WinSumDietDiversity.Rmd: Looks at diversity differences between winter and summer collection (Supplemental information)
g. BarPlot.Rmd: Script used to create figure 5
# Sequence_Data
1. Blanks_NGSFull3_080724.csv: Input to Blanks_R1_DataProcessing.Rmd, output of DADA pipeline
2. Blanks_Cleaned_Averaged_080724.csv: Output of Blanks_R1_DataProcessing.Rmd, Input to
3. SE_Cleaned_Averaged_080724.csv: Input to SE02_121322_Remove_Contamination.Rmd; Output of SE01_Data_Processing_Run3_080724.Rmd
4. SE_Cleaned_Averaged_121322.csv: Input to SE02_.Rmd; Output of SE01_Data_Processing_Run3_121322Samples.Rmd
5. SE_NGS_121322_No_Contam.csv: Intermediary output from SE02_121322_Remove_Contamination.Rmd
6. All_Sequences.csv: Taxonomic assignments per sequence with quality and identity scores from blast - used to assign taxonomy to sequences in sample sets. Input to multiple scripts
7. NGS_Individual_ID.csv: Used to assign individual coyote information and collection information to each scat sample ID
8. NGS3_Blanks_PCR_Plate_Info.csv: Blanks information for sequencing run 3
9. RC_Plant_Combined_2Runs.csv: Combined plant diet information for both wildland study areas across both sequencing runs. Input to SEO4_Rural_Coyote_Foo.Rmd
10. RC_Vert_Combined_2Runs.csv: Combined vert diet information for both wildland study areas across both sequencing runs. Input to SEO4_Rural_Coyote_Foo.Rmd
11. Plant_Diet_Classification.csv: Classification of plants reads as food categories. Input into all *FOO.Rmd files
12. Plant_food_modeling_taxa.csv: Relates taxa to highest confidence level. Input to all *FOO.Rmd files
13. SE_Plant_Runs_Combined_All3Runs.csv: Combined plant diet information for Urban study areas across three sequencing runs. Input to SE04_GreaterSeattle_FOO.Rmd
14. SE_Vert_Runs_Combined_All3Runs.csv: Combined vert diet information for Urban study areas across three sequencing runs. Input to SE04_GreaterSeattle_FOO.Rmd
15. Individual_nonRural_ID.csv: Individual coyote IDs related to scat samples for non wildland study areas. Input to SE04_GreaterSeattle_FOO.Rmd
16. GreaterSeattle8_IndividualFOO2.csv: Results of FOO loop so that this does not have to be run every time given the larger number of samples/individuals than in other study areas. Input to SE04_GreaterSeattle_FOO.Rmd
17. Bain_Eindex.csv: e index of specializtion values for each coyote in bainbridge island study area. Input to ANOVA_Tests.Rmd
18. urban_eindex.csv: e index of specializtion values for each coyote in urban study area. Input to ANOVA_Tests.Rmd
19. Rural_e.csv: e index of specializtion values for each coyote in wildland study area. Input to ANOVA_Tests.Rmd
20. Levins_Bain.csv:levins niche breadth values for each coyote in bainbridge island study area. Input to ANOVA_Tests.Rmd
21. Urban_Levins.csv:levins niche breadth values for each coyote in urban study area. Input to ANOVA_Tests.Rmd
22. rural_levins.csv:levins niche breadth values for each coyote in wildland study area. Input to ANOVA_Tests.Rmd
23. Values_For_BarGraph.csv: The values of metrics generated throughout the study and organized for bar plot graphing in R using the BarPlot.Rmd script
24: Urban_HillD.csv: Hill Shannon diversity values for urban coyotes; for use in ANOVA
25: Urban_HillRich.csv: Hill-Shannon richness values for uban coyotes; for use in AnOVA
26. BainbridgeHillDiv.csv: Hill-Shannon diversity values for bainbridge coytoes
27: BainbridgeHillRich.csv: Hill-Shannon richness values for bainbridge coytoes
38: RuralHillD.csv: Hill-Shannon diversity values for wildland coytoes
29: RuralHillRich.csv: Hill-Shannon richness values for wildland coyotes
## Run_1
1. SE_NGSFull_121322.csv: Input to SE01_Data_Processing_121322Samples.Rmd
2. SE_121322_Processed_Final: SE03_Remove_CanidHuman_Cutoff.Rmd; Output of SE02_121322_Remove_Contamination
## Run_2
1. Blanks_NGSFull2_061223.csv: Input to BlanksR2_Processing.Rmd, output of DADA pipeline
2. Blanks_Run2_Cleaned_Averaged_080323.csv: Output to BlanksR2_Processing.Rmd
3. Extraction_Blank_NGSPlate.csv: Contamination sequences from the PCR Blanks
4. SE_Run2_Cleaned_Averaged_080323.csv: Input to SE02_NGS2_080723_Remove_Contamination.Rmd
5. SE_NGS2_080423_No_Contam.csv: Intermiediete output of SE02_NGS2_080723_Remove_Contamination.Rmd
6. SE_NGS2_080723_Processed_Final: SE03_Remove_CanidHuman_Cutoff.Rmd; Output of SE02_NGS2_080723_Remove_Contamination.Rmd
## Run_3
1. SE_NGSFull_Run3_080724.csv: Input to SE01_Data_Processing_Run3_080724.Rmd
2. SE_NGS3_080724_No_Contam.csv: Intermediary output of SE02_NGS3_080724.Rmd
3. SE_NGS3_080724_Processed_Final.csv: Input to SE03_Remove_CanidHuman_Cutoff.Rmd; Output of SE02_NGS3_080724.Rmd
Files and variables
File: Kreling_EaE_Code.zip
Description: Folder containing all files
File: Meta_Data_Sheet.pdf
Description: Meta data describing each column across all .csv files used in the analyses
File: ReadMe.Rmd
Description: read me file
Code/software
R
Shell
Access information
Data was derived from the following sources:
- Coyote scats collected from 3 study areas across Washington State, USA
