Learn R Programming

landsepi (version 1.1.2)

model_landsepi: Model for Landscape Epidemiology & Evolution

Description

Stochastic, spatially-explicit, demo-genetic model simulating the spread and evolution of a plant pathogen in a heterogeneous landscape.

Usage

model_landsepi(
  time_param,
  area_vector,
  rotation_matrix,
  croptypes_cultivars_prop,
  dispersal,
  inits,
  seed,
  cultivars_param,
  basic_patho_param,
  genes_param
)

Value

A set of binary files is generated for every year of simulation and every compartment:

  • H: healthy hosts,

  • Hjuv: juvenile healthy hosts,

  • L: latently infected hosts,

  • I: infectious hosts,

  • R: removed hosts,

  • P: propagules.

Each file indicates for every time-step the number of individuals in each field, and when appropriate for each host and pathogen genotypes).

Arguments

time_param

list of simulation parameters:

  • Nyears = number cropping seasons,

  • nTSpY = number of time-steps per cropping season.

area_vector

a vector containing areas of polygons (i.e. fields), in surface units.

rotation_matrix

a matrix containing for each field (rows) and year (columns, named "year_1", "year_2", etc.), the index of the cultivated croptype. Importantly, the matrix must contain 1 more column than the real number of simulated years.

croptypes_cultivars_prop

a matrix with three columns named 'croptypeID' for croptype index, 'cultivarID' for cultivar index and 'proportion' for the proportion of the cultivar within the croptype.

dispersal

list of dispersal parameters:

  • disp_patho = vectorised dispersal matrix of the pathogen,

  • disp_host = vectorised dispersal matrix of the host.

inits

list of initial conditions:

  • pI0 = initial probability for the first host (whose index is 0) to be infectious (i.e. state I) at t=0.

seed

seed (for random number generation).

cultivars_param

list of parameters associated with each host genotype (i.e. cultivars) when cultivated in pure crops:

  • initial_density = vector of host densities (per surface unit) at the beginning of the cropping season,

  • max_density = vector of maximum host densities (per surface unit) at the end of the cropping season,

  • growth rate = vector of host growth rates,

  • reproduction rate = vector of host reproduction rates,

  • death rate = vector of host death rates,

  • sigmoid_kappa_host = kappa parameter for the sigmoid invasion function (for host dispersal),

  • sigmoid_sigma_host = sigma parameter for the sigmoid invasion function (for host dispersal),

  • sigmoid_plateau_host = plateau parameter for the sigmoid invasion function (for host dispersal),

  • cultivars_genes_list = a list containing, for each host genotype, the indices of carried resistance genes.

basic_patho_param

list of pathogen aggressiveness parameters on a susceptible host for a pathogen genotype not adapted to resistance:

  • infection_rate = maximal expected infection rate of a propagule on a healthy host,

  • propagule_prod_rate = maximal expected reproduction_rate of an infectious host per timestep,

  • latent_period_exp = minimal expected duration of the latent period,

  • latent_period_var = variance of the latent period duration,

  • infectious_period_exp = maximal expected duration of the infectious period,

  • infectious_period_var = variance of the infectious period duration,

  • survival_prob = probability for a propagule to survive the off-season,

  • repro_sex_prob = probability for an infectious host to reproduce via sex rather than via cloning,

  • sigmoid_kappa = kappa parameter of the sigmoid contamination function,

  • sigmoid_sigma = sigma parameter of the sigmoid contamination function,

  • sigmoid_plateau = plateau parameter of the sigmoid contamination function.

genes_param

list of parameters associated with each resistance gene and with the evolution of each corresponding pathogenicity gene:

  • target_trait = vector of aggressiveness components (IR, LAT, IP, or PR) targeted by resistance genes,

  • efficiency = vector of resistance gene efficiencies (percentage of reduction of the targeted aggressiveness component: IR, 1/LAT, IP and PR),

  • time_to_activ_exp = vector of expected delays to resistance activation (for APRs),

  • time_to_activ_var = vector of variances of the delay to resistance activation (for APRs),

  • mutation_prob = vector of mutation probabilities for pathogenicity genes (each of them corresponding to a resistance gene),

  • Nlevels_aggressiveness = vector of number of adaptation levels related to each resistance gene (i.e. 1 + number of required mutations for a pathogenicity gene to fully adapt to the corresponding resistance gene),

  • fitness_cost = vector of fitness penalties paid by pathogen genotypes fully adapted to the considered resistance genes on hosts that do not carry this gene,

  • tradeoff_strength = vector of strengths of the trade-off relationships between the level of aggressiveness on hosts that do and do not carry the resistance genes.

Details

See ?landsepi for details on the model and assumptions. Briefly, the model is stochastic, spatially explicit (the basic spatial unit is an individual field), based on a SEIR (‘susceptible-exposed-infectious-removed’, renamed HLIR for 'healthy-latent-infectious-removed' to avoid confusions with 'susceptible host') structure with a discrete time step. It simulates the spread and evolution of a pathogen in a heterogeneous cropping landscape, across cropping seasons split by host harvests which impose potential bottlenecks to the pathogen. A wide array of resistance deployment strategies can be simulated.

References

Rimbaud L., Papaïx J., Rey J.-F., Barrett L. G. and Thrall P. H. (2018). Assessing the durability andefficiency of landscape-based strategies to deploy plant resistance to pathogens. PLoS Computational Biology 14(4):e1006067.

Examples

Run this code
if (FALSE) {
#### Spatially-implicit simulation with 2 patches (S + R) during 3 years ####

## Simulation parameters
time_param <- list(Nyears=3, nTSpY=120)
Npoly=2
Npatho=2
area <- c(100000, 100000)
cultivars <- as.list(rbind(loadCultivar(name="Susceptible", type="growingHost")
, loadCultivar(name="Resistant", type="growingHost")))
names(cultivars)[names(cultivars)=="cultivarName"] <- "name"
cultivars <- c(cultivars, list(sigmoid_kappa_host=0.002, sigmoid_sigma_host=1.001,
 sigmoid_plateau_host=1, cultivars_genes_list=list(numeric(0),0)))
rotation <- data.frame(year_1=c(0,1), year_2=c(0,1), year_3=c(0,1), year_4=c(0,1))
croptypes_cultivars_prop <- data.frame(croptypeID=c(0,1), cultivarID=c(0,1), proportion=c(1,1))
genes <- as.list(loadGene(name="MG", type="majorGene"))
    
## run simulation
model_landsepi(seed=1,
               time_param = time_param,
               basic_patho_param = loadPathogen(disease = "rust"),
               inits = list(pI0=0.01), area_vector = area,
               dispersal = list(disp_patho=c(0.99,0.01,0.01,0.99),
               disp_host=c(1,0,0,1)),
               rotation_matrix = as.matrix(rotation),
               croptypes_cultivars_prop = as.matrix(croptypes_cultivars_prop),
               cultivars_param = cultivars, genes_param = genes)  

## Compute outputs
eco_param <- list(yield_perHa = cbind(H = as.numeric(cultivars$yield_H),
             L = as.numeric(cultivars$yield_L),
             I = as.numeric(cultivars$yield_I),
             R = as.numeric(cultivars$yield_R)),
             planting_cost_perHa = as.numeric(cultivars$planting_cost),
             market_value = as.numeric(cultivars$market_value))
            
evol_res <- evol_output(, time_param, Npoly, cultivars, genes)
epid_output(, time_param, Npatho, area, rotation
, croptypes_cultivars_prop, cultivars, eco_param)


#### 1-year simulation of a rust epidemic in pure susceptible crop in a single 1 ha patch ####
time_param <- list(Nyears=1, nTSpY=120)
Npoly=1
Npatho=1
area <- c(100000)
cultivars <- as.list(rbind(loadCultivar(name="Susceptible", type="growingHost")))
names(cultivars)[names(cultivars)=="cultivarName"] <- "name"
cultivars <- c(cultivars, list(sigmoid_kappa_host=0.002, sigmoid_sigma_host=1.001,
                               sigmoid_plateau_host=1, cultivars_genes_list=list(numeric(0))))
rotation <- data.frame(year_1=c(0), year_2=c(0))
croptypes_cultivars_prop <- data.frame(croptypeID=c(0), cultivarID=c(0), proportion=c(1))
genes <-   list(geneName = character(0) , fitness_cost = numeric(0)
, mutation_prob = numeric(0)
, efficiency = numeric(0) , tradeoff_strength = numeric(0)
, Nlevels_aggressiveness = numeric(0)
, time_to_activ_exp = numeric(0) , time_to_activ_var = numeric(0)
, target_trait = character(0))
    
## run simulation
model_landsepi(seed=1, time_param = time_param
, basic_patho_param = loadPathogen(disease = "rust"),
inits = list(pI0=0.01), area_vector = area, dispersal = list(disp_patho=c(1), disp_host=c(1)),
rotation_matrix = as.matrix(rotation),
croptypes_cultivars_prop = as.matrix(croptypes_cultivars_prop),
cultivars_param = cultivars,  genes_param = genes) 
}

Run the code above in your browser using DataLab