Learn R Programming

landsepi (version 1.1.1)

setGenes: Set genes

Description

Updates a LandsepiParams object with parameters associated with resistance genes and pathogen adaptation.

Usage

setGenes(params, dfGenes)

Arguments

params

a LandsepiParams object

dfGenes

a data.frame containing gene parameters. It can be defined manually, or, alternatively, with loadGene.

Value

a LandsepiParams object.

Details

dfGenes is a data.frame of parameters associated with each resistance gene and with the evolution of each corresponding pathogenicity gene. Columns of the dataframe are:

  • geneName: names of resistance genes,

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

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

  • time_to_activ_exp: expected delays to resistance activation (for APRs),

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

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

  • Nlevels_aggressiveness: 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: fitness penalties paid by pathogen genotypes fully adapted to the considered resistance genes on host that do not carry these genes,

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

The data.frame must be defined as follow (example):

geneName efficiency time_to_activ_exp time_to_activ_var mutation_prob Nlevels_agressiveness fitness_cost tradeoff_strength target_trait
MG1 1 0 0 1e-07 2 0.5 1 IR
QTL1 0.5 0 0 0.0001 10 0.74 1 LAT

See Also

loadGene

Examples

Run this code
# NOT RUN {
simul_params <- createSimulParams()
gene1 <- loadGene(name = "MG 1", type = "majorGene")
gene2 <- loadGene(name = "MG 2", type = "majorGene")
genes <- data.frame(rbind(gene1, gene2), stringsAsFactors = FALSE)
simul_params <- setGenes(simul_params, genes)
simul_params@Genes
# }

Run the code above in your browser using DataLab