setGenes {landsepi} | R Documentation |
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 |
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),
age_of_activ_mean: expected delays to resistance activation (for APRs),
age_of_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),
adaptation_cost: fitness penalties paid by pathogen genotypes fully adapted to the considered resistance genes on all hosts,
relative_advantage: fitness advantages of pathogen genotypes fully adapted to the resistance genes on hosts carrying these genes, relative to those 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.
recombination_sd: standard deviation of the normal distribution used for recombination of quantitative traits during sexual reproduction (infinitesimal model)
The data.frame must be defined as follow (example):
geneName | efficiency | age_of_activ_mean | age_of_activ_var | mutation_prob | Nlevels_agressiveness | adaptation_cost | relative advantage | tradeoff_strength | target_trait | recombination_sd |
MG1 | 1 | 0 | 0 | 1e-07 | 2 | 0.5 | 0.5 | 1 | IR | 0.27 |
QTL1 | 0.5 | 0 | 0 | 0.0001 | 10 | 0.74 | 0.74 | 1 | LAT | 0.27 |
Value
a LandsepiParams object.
See Also
Examples
## 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
## End(Not run)