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
b046962e
Commit
b046962e
authored
3 years ago
by
Blaise Li
Browse files
Options
Downloads
Patches
Plain Diff
Allow imprecision in global codon proportions sum.
parent
3fbb71e9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide 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
+6
-1
6 additions, 1 deletion
libcodonusage/libcodonusage.py
with
7 additions
and
2 deletions
libcodonusage/__init__.py
+
1
−
1
View file @
b046962e
__copyright__
=
"
Copyright (C) 2022 Blaise Li
"
__licence__
=
"
GNU GPLv3
"
__version__
=
"
0.1
7
"
__version__
=
"
0.1
8
"
from
.libcodonusage
import
(
aa2colour
,
aa_usage
,
...
...
This diff is collapsed.
Click to expand it.
libcodonusage/libcodonusage.py
+
6
−
1
View file @
b046962e
...
...
@@ -384,7 +384,12 @@ in the global usage.
global_proportions
=
pd
.
Series
(
normalize
(
global_usage
.
values
.
reshape
(
1
,
-
1
),
norm
=
"
l1
"
).
flatten
(),
index
=
global_usage
.
index
)
assert
global_proportions
.
sum
()
==
1.
# Can be 0.999999999999...
# if global_proportions.sum() != 1.:
# display(global_proportions)
# display(global_proportions.sum())
assert
np
.
isclose
(
global_proportions
.
sum
(),
1.
)
# assert global_proportions.sum() == 1.
render_md
(
"""
Codon usage biases in genes can then be computed by subtracting
the corresponding global proportion to a codon
'
s proportion.
...
...
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