Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EI Jeux Evolutionnaires
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Santos Garcia Carlos
EI Jeux Evolutionnaires
Commits
cc8dfec3
Commit
cc8dfec3
authored
5 years ago
by
Busson Loic
Browse files
Options
Downloads
Patches
Plain Diff
rottable lien
parent
043b1c32
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
RotTable.py
+18
-5
18 additions, 5 deletions
RotTable.py
with
18 additions
and
5 deletions
RotTable.py
+
18
−
5
View file @
cc8dfec3
...
...
@@ -40,9 +40,21 @@ class RotTable:
"
TA
"
:
"
TA
"
,
\
"
TC
"
:
"
GA
"
,
\
"
TG
"
:
"
CA
"
,
\
"
TT
"
:
"
AA
"
,
\
"
TT
"
:
"
AA
"
\
}
__SOUS_CORRESPONDANCE
=
{
\
"
AA
"
:
"
TT
"
,
\
"
AC
"
:
"
GT
"
,
\
"
AG
"
:
"
CT
"
,
\
"
AT
"
:
"
AT
"
,
\
"
CA
"
:
"
TG
"
,
\
"
CC
"
:
"
GG
"
,
\
"
CG
"
:
"
CG
"
,
\
"
GA
"
:
"
TC
"
,
\
"
GC
"
:
"
GC
"
,
\
"
TA
"
:
"
TA
"
\
}
# get the angles in each axis (x, y, z), considering the deviation
def
__init__
(
self
):
self
.
rot_table
=
{}
...
...
@@ -53,9 +65,11 @@ class RotTable:
# get a random deviation, considering the "limits" given in the last 3 columns
# of __ORIGINAL_ROT_TABLE
def
alea
(
self
):
for
dinucleotide
in
RotTable
.
__
ORIGINAL_ROT_TABL
E
:
for
dinucleotide
in
RotTable
.
__
SOUS_CORRESPONDANC
E
:
for
i
in
range
(
2
):
self
.
rot_table
[
dinucleotide
][
i
]
+=
numpy
.
random
.
uniform
(
low
=
-
RotTable
.
__ORIGINAL_ROT_TABLE
[
dinucleotide
][
i
+
3
],
high
=
RotTable
.
__ORIGINAL_ROT_TABLE
[
dinucleotide
][
i
+
3
])
delta
=
numpy
.
random
.
uniform
(
low
=
-
RotTable
.
__ORIGINAL_ROT_TABLE
[
dinucleotide
][
i
+
3
],
high
=
RotTable
.
__ORIGINAL_ROT_TABLE
[
dinucleotide
][
i
+
3
])
self
.
rot_table
[
dinucleotide
][
i
]
+=
delta
self
.
rot_table
[
RotTable
.
__SOUS_CORRESPONDANCE
[
dinucleotide
]][
i
]
+=
delta
# return __ORIGINAL_ROT_TABLE
def
orta
(
self
):
...
...
@@ -86,6 +100,5 @@ class RotTable:
###################
table1
=
RotTable
()
print
(
table1
.
orta
())
print
(
table1
.
rot_table
[
"
AA
"
]
)
print
(
table1
.
rot_table
)
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