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 | A | T | A |
pathy | A | T | T |
pathz | - | - | A |
Where number of sequences is number of rows in a matrix and number of segregation sites number of the columns in a matrix.
-
For each column (sequence) I calculate number of occurences of allele, number of times an allele is found.
-
I use function number of paths
-
Return allele_freq