DOI: 10.5061/dryad.pnvx0k72n
title: Data and code from: Spatially structured host genetic diversity leads to the evolution of local specialization

description: Host heterogeneity and spatial population structure each influence
 parasite evolution and may interact when space structures contacts between
 host types. Here, we experimentally evolve granulosis virus in microcosms
 of its natural Plodia interpunctella (Indian meal moth) host that differ
 in both spatial structure and host genetic diversity. We control spatial
 structure by manipulating the viscosity of the food that the larvae live
 within and host genetic diversity by adding larvae from either one or two
 non-evolving inbred lines to opposite microcosm ends. We preserve spatial
 structure across passages and assay virus from different positions within
 the microcosm on both host genotypes. We find that the lower contact rates
 between host genotypes resulting from spatial structure can lead to the
 evolution of locally specialized virus, even when the host population is
 genetically diverse overall. We also find that spatial structure changes
 how viruses specialize: viruses evolved in well-mixed environments had
 lower exploitation rates (proportion infected x virions) on the host they
 evolved with, while those in spatially structured environments exhibited
 higher exploitation of familiar hosts. These results demonstrate that
 spatial structure and host heterogeneity interact to shape pathogen
 specialization and that the evolutionary consequences of host diversity
 depend on population structure.
description: # Data and code from: Spatially structured host genetic diversity leads to
 the evolution of local specialization Dataset DOI:
 [10.5061/dryad.pnvx0k72n](https://doi.org/10.5061/dryad.pnvx0k72n) ##
 Description of the data and file structure READ ME : This file contains
 all the data associated with the Space x Diversity manuscript. Each tab
 has a different dataset that can be loaded into the R script as a .csv.
 Note: blanks or NA cells mean missing data or inapplicable. ```
 PassageEcology.csv : Contains the count of infected cavaders found in each
 grid square during serial passage. Therefore, it represents the spatial
 ecology of infections. Columns: Replicate = replicate of the treatment.
 Lines = Host lines used in the treatment. Note that 17and9 and 9and17 are
 different and represent the two different 'sides' of the host
 types. Food = Food type used in the treatment. S is sticky, L is loose.
 Position = Position within the microcosm. There are 15 positions labelled
 with letters from left to right and then down the grid. A is the top left,
 C is the top right, H is the center, M is bottom left, O is bottom right.
 Pass\_ = Columns that contain the counts at the different passage numbers
 (column name). Movement.csv : Contains the count data from the movement
 experiment. Line = Host line used (IL-17). Food = Food type used, sticky
 or loose. Position = position in the microcosm, same as above. Infected =
 count of infected individuals. Noninfected = count of not infected
 individuals. Added? = Whether larvae were added to that half of the
 microcosm (1) or not (0). 0.5 means it was the border row where half of it
 had larvae added. Distance = Distance (in grid squares) from where larvae
 were added. 0 means larvae were added to that square. Row and Column =
 Position in the microcosm translated into rows and columns.  AssayData.csv
 : Contains the results of infectivity and productivity assays. ID =
 anonymizing ID used to prevent experimental bias. Plate = plate number for
 the count. 2 plates were made for each assay. Infected = number of
 infected individuals in the plate. Uninfected =number of uninfected
 individuals in the plate. Set-up = set up date of the batch. VirusLine =
 numbered ID for the virus population used in the assay. Number before the
 decimal corresponds the the microcosm number. After the decimal is the
 position within the microcosm. Lines = Host lines used to set up the
 microcosm (as above note that 17and9 and 9and17 are separate).  Food =
 Food type for the evolution (as above).  Position = position of origin
 within the micocosm for the virus population. Each row is pooled so this
 is different than previous. t is top, tm is top middle, m is middle, mb is
 middle bottom, b is bottom.  AssayLine = Host line that the virus line is
 being assayed on. Replicate = Replicate of the evolution. AveCount = Count
 of virus particles per cadaver (counted all infecteds in a pool and then
 divided by number of infecteds). * and Note : notes of when data has been
 deleted / maniplated because of experimental errors.  HostLines.csv :
 Infectivity and Productivity of ancestral virus on the two host lines.
 Line = Host Line. Infecticity = proportion of larvae infected.
 Productivity = average count of virus per infected individual.
 Exploitation = composite score of infectivity x productivity. Assay Line =
 Host Line (used for graphing) TimetoKill : Data from a test of how long it
 takes the ancestral virus to kill 3rd instar larvae. Time to Kill (days):
 number of days after exposure that infected larvae died. Average Virus
 Count : Number of virus in the cadaver (averaged over multiple counts) ```
 ## Files and variables ### File: SpacexDiversity_DataFull.xlsx
 **Description:** Data ### File: SpacexDiversity_2025Sub.R
 **Description:** Code for analysis ## Code/software Excel and R