Skip to content

Commit

Permalink
larger images, troubleshoot multiline math
Browse files Browse the repository at this point in the history
  • Loading branch information
jykr committed Jun 21, 2024
1 parent 3667a28 commit 0df7cad
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions docs/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ as reference.
.. raw:: html

<figure>
<img src="assets/model_legend_pheno.png" alt="legend" width="500"/>
<img src="assets/model_legend_pheno.png" alt="legend" width="600"/>
</figure>

For the cells with a guide, their phenotype is modeled as a mixture of
Expand Down Expand Up @@ -74,7 +74,7 @@ to wild-type effect size of mean 0 and standard deviation 1.
.. raw:: html

<figure>
<img src="assets/model_mixture.png" alt="legend" width="250"/>
<img src="assets/model_mixture.png" alt="legend" width="350"/>
</figure>

Multiallelic outcome modeling in ``tiling`` mode
Expand Down Expand Up @@ -176,7 +176,7 @@ incomplete correlation between endogenous and reporter editing rates.
.. raw:: html

<figure>
<img src="assets/model_editing_rate.png" alt="legend" width="400"/>
<img src="assets/model_editing_rate.png" alt="legend" width="500"/>
</figure>

:math:`f\left( \pi \right)` is fitted from the data generated for
Expand Down Expand Up @@ -272,7 +272,7 @@ where the sample size factor is calculated as in DESeq2.
.. raw:: html

<figure>
<img src="assets/model_sorting.png" alt="legend" width="300"/>
<img src="assets/model_sorting.png" alt="legend" width="500"/>
</figure>

For sample :math:`j`,
Expand Down Expand Up @@ -382,7 +382,7 @@ accessibility.
.. raw:: html

<figure>
<img src="assets/model_acc.png" alt="legend" width="450"/>
<img src="assets/model_acc.png" alt="legend" width="600"/>
<figcaption>Fig 1f of the manuscript</figcaption>
</figure>

Expand Down Expand Up @@ -441,9 +441,16 @@ values using method-of-moments. For
.. math::
\mu^{(k)} = E\left\lbrack X^{(k)} \right\rbrack = np^{(k)} \\
\mu^{(k)} = E\left\lbrack X^{(k)} \right\rbrack = np^{(k)}
.. math::
V^{(k)} = Var\left( X^{(k)} \right) = np^{(k)}\ \left( 1 - p^{(k)} \right)\left( 1 + \frac{n - 1}{1 + \alpha^{\circ}} \right)\
Where
:math:`p^{(k)} = \frac{\alpha^{\left( k \right)}}{\alpha^{\circ}}`.
Given :math:`n`, we can get the method-of-moment estimates of
Expand All @@ -452,8 +459,16 @@ Given :math:`n`, we can get the method-of-moment estimates of
.. math::
\widehat{p^{(k)}} = \frac{\widehat{\mu^{(k)}}}{n} \\
\widehat{\alpha^{\circ}} = \left( \sum_{k \in \left\{ 1\ldots d \right\}}^{}{\frac{n - 1}{\frac{\widehat{V^{(k)}} - \widehat{\mu^{(k)}}}{n\widehat{p^{(k)}}\left( 1 - \widehat{p^{(k)}} \right)} - 1 + \frac{1}{1 - \widehat{p^{(k)}}}} - 1} \right)/d\
\widehat{p^{(k)}} = \frac{\widehat{\mu^{(k)}}}{n}
.. math::
\widehat{\alpha^{\circ}} = \left( \sum_{k \in \left\{ 1\ldots d \right\}}^{}{\frac{n - 1}{\frac{\widehat{V^{(k)}} - \widehat{\mu^{(k)}}}{n\widehat{p^{(k)}}\left( 1 - \widehat{p^{(k)}} \right)} - 1 + \frac{1}{1 - \widehat{p^{(k)}}}} - 1} \right)/d\
Next, as multiple observations from different replicates does not share
:math:`n` across replicates, we follow DESeq’s count normalization
Expand Down

0 comments on commit 0df7cad

Please sign in to comment.