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 loadGene.

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:

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

loadGene

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)

[Package landsepi version 1.4.0 Index]