DOI: 10.5061/dryad.rr4xgxdf2
title: The first arriving virus shapes within-host viral diversity during natural epidemics

description: Viral diversity has been discovered across scales from host individuals to
 populations. However, the drivers of viral community assembly are still
 largely unknown. Within-host viral communities are formed through
 coinfections, where the interval between the arrival times of viruses may
 vary. Priority effects describe the timing and order in which species
 arrive in an environment, and how early colonizers impact subsequent
 community assembly. To study the effect of the first-arriving virus on
 subsequent infection patterns of five focal viruses, we set up a field
 experiment using naïve Plantago lanceolata plants as sentinels during a
 seasonal virus epidemic. Using joint species distribution modelling, we
 find both positive and negative effects of early season viral infection on
 late season viral colonization patterns. The direction of the effect
 depends on both the host genotype and which virus colonized the host early
 in the season. It is well-established that co-occurring viruses may change
 the virulence and transmission of viral infections. However, our results
 show that priority effects may also play an important, previously
 unquantified role in viral community assembly. The assessment of these
 temporal dynamics within a community ecological framework will improve our
 ability to understand and predict viral diversity in natural systems.
description: # **ViralCommHmsc** This repository accompanies the manuscript **"The
 first arriving virus shapes within-host viral community assembly during
 natural epidemics"** by Maija Jokinen et al. and provides the R
 scripts and their initial input data that are required to reproduce the
 manuscript's Hmsc joint species distributional modelling results.
 **Variables:** * PLANT ID The plant individual that the community sample
 came from * Timepoint Sampling timepoints 1 = early season timepoint T1,
 2,3,4 = late season timeperiod, pooled for the analysis T2,T3,T4 * Plant
 ID The plant individual that the community sample came from * CLOSTERO
 Presence/absence (1/0) of Closterovirus * ENAMO Presence/absence (1/0) of
 Enamovirus * BETAPARTITI Presence/absence (1/0) of Betapartitivirus * PLV
 Presence/absence (1/0) of PLV * CAULIMO Presence/absence (1/0) of
 Caulimovirus * Transplant population Population the plant was kept for the
 experiment (1 = 877, 2 = 3302, 3 = 9031, 4 = 433) * Host genotype Name of
 the maternal plant used for cloning (1 = 511\_14, 2 = 609\_19, 3 =
 2818\_6, 4 = 4\_13) * Number of leaves Number of leaves at the beginning
 of the experiment * Lenght Length of the longest leaf * Width Width of the
 longest leaf * Leaf area A=pi\* ab, where a and b are half axis of the
 ellipse (i.e, a= Lenght/2 and b=Width/2) * Plant area Leaf area\*Leaves *
 Herbivory 1 if the plant had herbivory damage when sample was taken, 0 if
 not **Disclaimer**: The code in this repository may still undergo
 revisions. **Authors**: The scripts were adapted by Mirkka Jones from Hmsc
 course scripts 2020 written by Hmsc-developers Otso Ovaskainen, Jari
 Oksanen, and others, of which later versions are available at
 https://www.helsinki.fi/en/researchgroups/statistical-ecology/software/hmsc **Contacts:** Mirkka Jones at helsinki.fi. <br>