View source: R/UserFunctions.R
setSelectNeutral | R Documentation |
Generation of a neutral class Selection
object. It can be used as a
basis for adding selection layers with the setSelectOnInds
,
setSelectOnGametes
or setSelectOnGametesProd
functions, or
if the model is neutral.
setSelectNeutral(genomeObj)
genomeObj |
a |
An object of type Selection
is an object which describes the set of
fitnesses which will be taken into account in the simulations. The
selection according to these fitnesses can be applied at three levels:
at the level of the individual, at the level of the production of
gametes and at the level of the gametes themselves.
Selection is therefore genotypic in the first two cases (each genotype
is associated with a fitness value) and haplotypic in the third (each
haplotype is associated with a fitness value).
a Selection
object
Ehouarn Le Faou
### Example with two loci, each with two alleles ### # Definition of the diploid locus DL <- list(dl = c("A", "a")) # Definition of the haploid locus HL <- list(hl = c("B", "b")) # Definition of the object of Genome class genomeObj <- setGenome(listHapLoci = HL, listDipLoci = DL) genomeObj ### Exemple with more diploid loci ### # Definition of the diploid loci DL <- list( dl1 = c("A", "a"), dl2 = c("B", "b"), dl3 = c("C", "c") ) # Definition of the haploid locus HL <- list(hl = c("D", "d")) # Definition of the object of Genome class, with in addition the necessary # definition of recombination rates between loci: genomeObj <- setGenome( listHapLoci = HL, listDipLoci = DL, recRate = c(0.1, 0.5) ) # Here we have a 0.1 recombination rate between dl1 and dl2 and a 0.5 # recombination rate between dl2 and dl3. It is as if dl1 and dl2 were linked, # for example on the same chromosome, and that dl2 (and dl1 by consequence) # and dl3 were independent, for example on different chromosomes. genomeObj
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.