Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.89 KB

allele_freq.md

File metadata and controls

35 lines (22 loc) · 1.89 KB

Allele frequency is the relative frequency of an allele at a particular locus in a population.

Allele A a
Allele counts n_A={7} n_a={13}
Allele Frequencies f_A=\frac{n_A}{{(2N)} f_a=\frac{n_a}{{(2N)}

f_A={0.35}

f_a={0.65}

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.

  1. For each row (sequence) I calculate number of occurences of allele, number of times an allele is found.

  2. For each row I calculate the sum of number of occurences.

  3. Return allele_freq

f_A=\frac{n_occurencesallele}{{(totalnumber)}