diff --git a/libcodonusage/libcodonusage.py b/libcodonusage/libcodonusage.py index ad02e60892b6dfeaec8a54d7de4cb66704be35d0..94d722f40a86189a3541412d0175918388eb1000 100644 --- a/libcodonusage/libcodonusage.py +++ b/libcodonusage/libcodonusage.py @@ -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