locus-class: Create a locus

Description Arguments Details Examples

Description

A locus is a S4 class which define all the properties of a locus, like the various possible allele and genotype, related fitness and sex-determination system.

Arguments

allele1

The allele on the first chromosome

allele2

The allele on the second chromosome

fitness.male

Optional: The fitness of the males carrying this genotype

fitness.female

Optional: The fitness of the female carrying this genotype

sd

Optional: The proportion of individual with this genotype which are male (0 mean that it's always a female and 1 it's always a male)

recombination.modifier

Optional: indicate how this genotype modify the overall recombination rate of the chromosome

name

The name of the allele. Notice that this vector is of different size as the ones before.

Details

Notice that to create a locus, all possible genotype should be included. Expect for the parameter 'allele.name', all vector should have the same length, and more specifically, the length of the number of possible genotype at this locus. The reason it is like this, is that it allows to skip some genotypes (like yy) and specify easly the fitness of all genotype without using dominance factor.

Examples

1
2
3
4
5
6
locus1 = create.locus(allele1 = c(1,1),
                                allele2 = c(1,2),
                                    sd = c(0,1),
                          fitness.male = c(1,1),
                        fitness.female = c(1,1),
                           allele.name = c("x","y"))

frederic-michaud/hapex documentation built on May 15, 2019, 3:29 p.m.