Allele frequency is the relative frequency of an allele at a particular locus in a population.
Allele | A | a |
---|---|---|
Allele counts | ||
Allele Frequencies |
The allele frequency is the fraction of all the occurrences i of that allele and the total number of chromosome copies across the population.
Allele frequencies on Variation Graph:
I'm starting from the output that derived from bubblepop:
Paths | pos1 | pos2 | pos3 |
---|---|---|---|
pathx | 0 | 1 | 0 |
pathy | 0 | 1 | 1 |
pathz | 1 | 0 | 0 |
Where number of sequences is number of rows in a matrix and number of segregation sitesnumber of the columns in a matrix. The next step is calculate the total number of pairwise differences observed between all sequences.
-
For each row (sequence) I calculate number of occurences of allele, number of times an allele is found.
-
For each row I calculate the sum of number of occurences.
-
Return allele_freq