Generates evolutionary outputs from model simulations.

evol_output(
  types = "all",
  time_param,
  Npoly,
  cultivars_param,
  genes_param,
  thres_breakdown = 50000,
  writeTXT = TRUE,
  graphic = TRUE,
  path = getwd()
)

Arguments

types

a character string (or a vector of character strings if several outputs are to be computed) specifying the type of outputs to generate (see details):

  • "evol_patho": Evolution of pathogen genotypes

  • "evol_aggr": Evolution of pathogen aggressiveness (i.e. phenotype)

  • "durability": Durability of resistance genes

  • "all": compute all these outputs (default)

time_param

list of simulation parameters:

  • Nyears = number cropping seasons,

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

Npoly

number of fields in the landscape.

cultivars_param

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

  • name = vector of cultivar names,

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

genes_param

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

  • name = vector of names of resistance genes,

  • Nlevels_aggressiveness = vector containing the 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),

thres_breakdown

an integer (or vector of integers) giving the threshold (i.e. number of infections) above which a pathogen genotype is unlikely to go extinct and resistance is considered broken down, used to characterise the time to invasion of resistant hosts (several values are computed if several thresholds are given in a vector).

writeTXT

a logical indicating if the output is written in a text file (TRUE) or not (FALSE).

graphic

a logical indicating if graphics must be generated (TRUE) or not (FALSE).

path

a character string indicating the path of the repository where simulation output files are located and where .txt files and graphics will be generated.

Value

A list containing, for each required type of output, a matrix summarising the output. Each matrix can be written in a txt file (if writeTXT=TRUE), and illustrated in a graphic (if graphic=TRUE).

Details

For each pathogen genotype (evol_patho) or phenotype (evol_aggr, note that different pathogen genotypes may lead to the same phenotype on a resistant host), several computations are performed based on pathogen genotype frequencies:

  • appearance: time to first appearance (as propagule);

  • R_infection: time to first true infection of a resistant host;

  • R_invasion: time to invasion, when the number of infections of resistant hosts reaches a threshold above which the genotype or phenotype is unlikely to go extinct.

The value Nyears + 1 time step is used if the genotype or phenotype never appeared/infected/invaded. Durability is defined as the time to invasion of completely adapted pathogen individuals.

References

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

See also

Examples

if (FALSE) {
demo_landsepi()
}