Skip to content

Commit

Permalink
chore: use mathjax instead of mdbook-katex
Browse files Browse the repository at this point in the history
  • Loading branch information
matchy233 committed Mar 5, 2024
1 parent bdea565 commit 4141d84
Showing 3 changed files with 20 additions and 25 deletions.
5 changes: 0 additions & 5 deletions book.toml
Original file line number Diff line number Diff line change
@@ -5,8 +5,6 @@ multilingual = false
src = "src"
title = "Notes @ ETH Zürich"

[output.katex]

[output.html]
additional-js = ["mermaid.min.js", "mermaid-init.js"]
mathjax-support = true
@@ -21,9 +19,6 @@ command = "python3 ../../scripts/autogen-toc.py"
[preprocessor.mermaid]
command = "mdbook-mermaid"

[preprocessor.katex]
renderers = ["html"]

[preprocessor.toc]
command = "mdbook-toc"
renderers = ["html"]
2 changes: 1 addition & 1 deletion src/23fs/fg/01_modern_genomics_i.md
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ graph LR
Efficient sequencing technology arrived rather late. Initially the sequencing process was cumbersome and radioactive.

- 1975: "dideoxy" DNA sequencing (Sanger)
- 1977: first genome (<u>bacteriophage $\phi X 174$</u>)
- 1977: first genome (<u>bacteriophage \\( \phi X 174 \\) </u>)
- 1995: first <u>cell</u> (Haemophilus influenzae)
- 1998: first animal (Caenorhabditis elegans)
- 2001: Homo sapiens
38 changes: 19 additions & 19 deletions src/23fs/fg/02_modern_genomics_ii.md
Original file line number Diff line number Diff line change
@@ -8,58 +8,58 @@ I cannot understand his accent...

### Linkage disequilibrium (LD)

#### Coefficient of linkage disequilibrium $D$
#### Coefficient of linkage disequilibrium \\( D \\)

Given two loci $A$ and $B$ (can have allele $A$ or $a$, $B$ or $b$), the coefficient of linkage disequilibrium $D$ is defined as
Given two loci \\(A\\) and \\(B\\) (can have allele \\(A\\) or \\(a\\), \\(B\\) or \\(b\\)), the coefficient of linkage disequilibrium \\(D\\) is defined as

$$
\\[
D = \frac{P_{AB} - P_A P_B}{P_A P_B}
$$
\\]

Below shows two examples of $D$ calculation.
Below shows two examples of \\(D\\) calculation.

![LD example 1](./img/02-ld-example1.png)

$$
\\[
D = \frac{P_{AB} - P_{A} P_{B}}{P_{A} P_{B}} = \frac{5}{12} - \frac{8}{12}\times\frac{6}{12} = \frac{1}{12}
$$
\\]

A and B are linked to some extent.

![LD example 2](./img/02-ld-example2.png)

$$
\\[
D = \frac{P_{AB} - P_{A} P_{B}}{P_{A} P_{B}} = \frac{6}{12} - \frac{8}{12}\times\frac{9}{12} = 0
$$
\\]

Here A and B are not linked at all.

Basically we are testing whether P(A) and P(B) are <u>independent</u>.

### Relative measures of LD

1. $r^2 = \frac{D}{P_A P_a P_B P_b}$
2. $D' = \frac{D}{D_{\max}}$ if $D$ is positive, $D' = \frac{D}{D_{\min}}$ if $D$ is negative
1. \\(r^2 = \frac{D}{P_A P_a P_B P_b}\\)
2. \\(D' = \frac{D}{D_{\max}}\\) if \\(D\\) is positive, \\(D' = \frac{D}{D_{\min}}\\) if \\(D\\) is negative

### Nucleotide diversity $\pi$
### Nucleotide diversity \\(\pi\\)

<span style="color:gray">Average proportion of pairwise differences between the sequences</span>

Give a multiple sequence alignment, $\pi$ is defined as
Give a multiple sequence alignment, \\(\pi\\) is defined as

$$
\\[
\pi = \sum_{i < j} \frac{\pi_{ij}}{n_c}
$$
\\]

where $n_c = \frac{n(n-1)}{2}$ is the number of pairwise comparisons, and $\pi_{ij}$ is the proportion of differences between the $i$th and $j$th sequences.
where \\(n_c = \frac{n(n-1)}{2}\\) is the number of pairwise comparisons, and \\(\pi_{ij}\\) is the proportion of differences between the \\(i\\)th and \\(j\\)th sequences.

Below shows an example of $\pi$ calculation.
Below shows an example of \\(\pi\\) calculation.

![Nucleotide diversity example](./img/02-nt-diversity.png)

$$
\\[
\pi = \sum_{i < j} \frac{\pi_{ij}}{n_c} = \frac{\pi_{12} + \pi_{13} + \pi_{23}}{3} = 0.2
$$
\\]

Basically just calculating the average number of differences in the matrix.

0 comments on commit 4141d84

Please sign in to comment.