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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Blaise LI
libcodonusage
Commits
ad2d5a2e
Commit
ad2d5a2e
authored
3 years ago
by
Blaise Li
Browse files
Options
Downloads
Patches
Plain Diff
Option to return proportions too, not just biases.
parent
c8e29f65
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
libcodonusage/__init__.py
+1
-1
1 addition, 1 deletion
libcodonusage/__init__.py
libcodonusage/libcodonusage.py
+10
-4
10 additions, 4 deletions
libcodonusage/libcodonusage.py
with
11 additions
and
5 deletions
libcodonusage/__init__.py
+
1
−
1
View file @
ad2d5a2e
__copyright__
=
"
Copyright (C) 2022 Blaise Li
"
__copyright__
=
"
Copyright (C) 2022 Blaise Li
"
__licence__
=
"
GNU GPLv3
"
__licence__
=
"
GNU GPLv3
"
__version__
=
"
0.2
1
"
__version__
=
"
0.2
2
"
from
.libcodonusage
import
(
from
.libcodonusage
import
(
aa2colour
,
aa2colour
,
aa_usage
,
aa_usage
,
...
...
This diff is collapsed.
Click to expand it.
libcodonusage/libcodonusage.py
+
10
−
4
View file @
ad2d5a2e
...
@@ -352,7 +352,7 @@ SUZUKI_DOI = "10.1016/j.febslet.2005.10.032"
...
@@ -352,7 +352,7 @@ SUZUKI_DOI = "10.1016/j.febslet.2005.10.032"
SUZUKI_LINK
=
f
"
[Suzuki et al (2005)](https://doi.org/
{
SUZUKI_DOI
}
)
"
SUZUKI_LINK
=
f
"
[Suzuki et al (2005)](https://doi.org/
{
SUZUKI_DOI
}
)
"
def
gene_wide_codon_usage
(
codon_counts
,
verbose
=
False
):
def
gene_wide_codon_usage
(
codon_counts
,
verbose
=
False
,
return_props
=
False
):
"""
"""
Compute codon usage biases
"
gene-wide
"
as the standardized
Compute codon usage biases
"
gene-wide
"
as the standardized
difference between a gene
'
s codon proportions and global
difference between a gene
'
s codon proportions and global
...
@@ -414,10 +414,12 @@ across genes) so that they are more comparable between codons.
...
@@ -414,10 +414,12 @@ across genes) so that they are more comparable between codons.
# standardized_codon_usage_biases.style.hide(axis="index")
# standardized_codon_usage_biases.style.hide(axis="index")
if
verbose
:
if
verbose
:
display
(
standardized_codon_usage_biases
.
head
(
3
))
display
(
standardized_codon_usage_biases
.
head
(
3
))
if
return_props
:
return
(
standardized_codon_usage_biases
,
codon_proportions
)
return
standardized_codon_usage_biases
return
standardized_codon_usage_biases
def
by_aa_codon_usage
(
codon_counts
,
verbose
=
False
):
def
by_aa_codon_usage
(
codon_counts
,
verbose
=
False
,
return_props
=
False
):
"""
"""
Compute codon usage biases
"
by amino-acid
"
as the standardized
Compute codon usage biases
"
by amino-acid
"
as the standardized
difference between a gene
'
s codon proportions and global
difference between a gene
'
s codon proportions and global
...
@@ -495,10 +497,12 @@ across genes) so that they are more comparable between codons.
...
@@ -495,10 +497,12 @@ across genes) so that they are more comparable between codons.
# standardized_codon_usage_biases.style.hide(axis="index")
# standardized_codon_usage_biases.style.hide(axis="index")
if
verbose
:
if
verbose
:
display
(
standardized_codon_usage_biases
.
head
(
3
))
display
(
standardized_codon_usage_biases
.
head
(
3
))
if
return_props
:
return
(
standardized_codon_usage_biases
,
codon_proportions
)
return
standardized_codon_usage_biases
return
standardized_codon_usage_biases
def
aa_usage
(
codon_counts
,
verbose
=
False
):
def
aa_usage
(
codon_counts
,
verbose
=
False
,
return_props
=
False
):
"""
"""
Compute amino-acid usage biases as the standardized
Compute amino-acid usage biases as the standardized
difference between a gene
'
s amino-acid proportions
difference between a gene
'
s amino-acid proportions
...
@@ -563,6 +567,8 @@ across genes) so that they are more comparable between amino-acids.
...
@@ -563,6 +567,8 @@ across genes) so that they are more comparable between amino-acids.
# standardized_aa_usage_biases.style.hide(axis="index")
# standardized_aa_usage_biases.style.hide(axis="index")
if
verbose
:
if
verbose
:
display
(
standardized_aa_usage_biases
.
head
(
3
))
display
(
standardized_aa_usage_biases
.
head
(
3
))
if
return_props
:
return
(
standardized_aa_usage_biases
,
aa_proportions
)
return
standardized_aa_usage_biases
return
standardized_aa_usage_biases
...
...
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