Description Usage Arguments Examples
View source: R/create.genotype.matrix.R
This function returns a matrix giving all the possible multilocus genotype. In column is given the different genotypes and in row the alleles.
1 | create.genotype.matrice(List_gene)
|
List_gene |
A list giving the number of loci and allele for each loci. The length of the list correspond to the number of loci, and each number indecates the number of alleles for this loci. |
index |
is a matrix calculated with the function genotype.index.multilocus, indicates the row of each genotype in the simulation. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | List_gene<-c(2,2) # example of two loci each with two alleles
index<-genotype.index.multilocus(List_gene)
create.genotype.matrix(List_gene,index)
1 2 1 2
A1B1/A1B1 1 1 1 1
A1B1/A2B1 1 2 1 1
A1B1/A1B2 1 1 1 2
A1B1/A2B2 1 2 1 2
A2B1/A2B1 2 2 1 1
A2B1/A1B2 2 1 1 2
A2B1/A2B2 2 2 1 2
A1B2/A1B2 1 1 2 2
A1B2/A2B2 1 2 2 2
A2B2/A2B2 2 2 2 2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.