Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcodonusage
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Blaise LI
libcodonusage
Commits
c8e29f65
Commit
c8e29f65
authored
3 years ago
by
Blaise Li
Browse files
Options
Downloads
Patches
Plain Diff
Mention references.
parent
8ca17aef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libcodonusage/libcodonusage.py
+11
-2
11 additions, 2 deletions
libcodonusage/libcodonusage.py
with
11 additions
and
2 deletions
libcodonusage/libcodonusage.py
+
11
−
2
View file @
c8e29f65
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment