Skip to content

Commit

Permalink
Update allele_freq.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavia95 authored Oct 28, 2020
1 parent 35f1df2 commit 87f63ad
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions doc/allele_freq.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ pathx | 0 | 1 | 0
pathy | 0 | 1 | 1
pathz | 1 | 0 | 0

Where [number of sequences](/functions/utils.py#L9) is number of rows in a matrix and [number of segregation sites](/functions/utils.py#L15)number of the columns in a matrix.
The next step is calculate the total number of pairwise differences observed between all sequences.
Where [number of sequences](/functions/utils.py#L9) is number of rows in a matrix and [number of segregation sites](/functions/utils.py#L15) number of the columns in a matrix.

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

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

4. Return [allele_freq](/functions/utils.py#L21)
3. Return [allele_freq](/functions/utils.py#L21)

![f_A=\frac{n_occurencesallele}{{(totalnumber)}](https://latex.codecogs.com/svg.latex?\Large&space;f_A=\frac{n_occurencesallele}{{(totalnumber)})

0 comments on commit 87f63ad

Please sign in to comment.