Skip to content
Snippets Groups Projects
Commit c8e29f65 authored by Blaise Li's avatar Blaise Li
Browse files

Mention references.

parent 8ca17aef
No related branches found
No related tags found
No related merge requests found
......@@ -345,15 +345,23 @@ def save_counts_table(counts_table, table_path):
render_md(f"The table was saved at [{table_path}]({table_path}).")
# Codon usage calculations can be done in various ways.
# Some examples are given at page 6500 (2 of the pdf) of
# [Suzuki et al (2005)](https://doi.org/10.1016/j.febslet.2005.10.032)
SUZUKI_DOI = "10.1016/j.febslet.2005.10.032"
SUZUKI_LINK = f"[Suzuki et al (2005)](https://doi.org/{SUZUKI_DOI})"
def gene_wide_codon_usage(codon_counts, verbose=False):
"""
Compute codon usage biases "gene-wide" as the standardized
difference between a gene's codon proportions and global
codon proportions.
"""
render_md("""
render_md(f"""
We will compute codon usage "gene-wide" (i.e. not by amino-acid),
by looking at the proportion of codons within a gene's CDS.
(This corresponds to R1 in {SUZUKI_LINK})
""")
render_md("""
To compute codon proportions, we can divide each line by its sum,
......@@ -416,9 +424,10 @@ def by_aa_codon_usage(codon_counts, verbose=False):
codon proportions, where proportions are computed within
groups of same-amino-acid-coding codons instead of gene-wide.
"""
render_md("""
render_md(f"""
We will compute codon usage "by amino-acid", by looking at the
proportion of codons for each amino-acid within a gene's CDS.
(This corresponds to R2 in {SUZUKI_LINK})
""")
render_md("""
We first need to compute, for a given gene, the total number of codons
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment