Description Usage Arguments Value Examples
View source: R/create.probability.matrix.R
Function giving the probability of each gamete type for each parental genotype.
1 | create.probability.matrix(genotype.index, List_gene, r=0.5, List_mu)
|
genotype.index |
The output of the function genotype.index.multilocus, giving the index (order) of each genotype in the simulation. |
List_gene |
A vector of length |
r |
Parameter defining the recombination probability in simulations with two loci. |
List_mu |
A vector giving the mutation probability of one allele into an other existing allele for each locus |
A square symmetric matrix whose [i,j] element gives the probability of having a gamete of type i knowing that the parent is of genotype j.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # With two loci with two alleles each; linked loci
# There are 4 possible gametes: A1B1, A2B1, A1B2, A2B2
# There are 10 possible genotypes:
# A1B1/A1B1, A1B1/A2B1, A1B1/A1B2, A1B1/A2B2,
# A2B1/A2B1, A2B1/A1B2, A2B1/A2B2,
# A1B2/A1B2, A1B2/A2B2,
# A2B2/A2B2
List_gene <- c(2,2)
genotype.index <- genotype.index.multilocus(List_gene)
List_mu <- c(1e-06,1e-06)
r <- 0.2
create.probability.matrix(genotype.index, List_gene, r, List_mu)
# With 4 loci of respectively 2,3,2 and 5 alleles
List_gene <- c(2,3,2,5)
genotype.index <- genotype.index.multilocus(List_gene)
List_mu <- c(1e-06,1e-06)
create.probability.matrix(genotype.index, List_gene, List_mu=List_mu)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.