From c8e29f65c0033e697670ba648d30203b03fa5508 Mon Sep 17 00:00:00 2001
From: Blaise Li <blaise.li__git@nsup.org>
Date: Thu, 14 Apr 2022 12:14:54 +0200
Subject: [PATCH] Mention references.

---
 libcodonusage/libcodonusage.py | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/libcodonusage/libcodonusage.py b/libcodonusage/libcodonusage.py
index ad02e60..94d722f 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
-- 
GitLab