Skip to content
Snippets Groups Projects
Commit 7dcbab36 authored by Kappes Marques Rodrigo's avatar Kappes Marques Rodrigo
Browse files

added orta

parent e19fa434
Branches
No related tags found
No related merge requests found
...@@ -24,20 +24,20 @@ class RotTable: ...@@ -24,20 +24,20 @@ class RotTable:
"TT": [35.62, 7.2, -154, 0.06, 0.6, 0]\ "TT": [35.62, 7.2, -154, 0.06, 0.6, 0]\
} }
# get the angles in each axis (x, y, z), considering a deviation
def __init__(self): def __init__(self):
self.rot_table = {} self.rot_table = {}
for dinucleotide in RotTable.__ORIGINAL_ROT_TABLE: for dinucleotide in RotTable.__ORIGINAL_ROT_TABLE:
self.rot_table[dinucleotide] = RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][:3] self.rot_table[dinucleotide] = RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][:3]
self.alea() self.alea()
# considering the errors (last 3 columns of __ORIGINAL_ROT_TABLE),
# add random error to the "mean value" of the angles of each axis
def alea(self): def alea(self):
for dinucleotide in RotTable.__ORIGINAL_ROT_TABLE: for dinucleotide in RotTable.__ORIGINAL_ROT_TABLE:
for i in range(2): 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]) self.rot_table[dinucleotide][i] += numpy.random.uniform(low = -RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][i+3], high= RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][i+3])
def orta(self):
return self.__ORIGINAL_ROT_TABLE
################### ###################
# WRITING METHODS # # WRITING METHODS #
...@@ -61,4 +61,5 @@ class RotTable: ...@@ -61,4 +61,5 @@ class RotTable:
################### ###################
table1 = RotTable() table1 = RotTable()
print(table1.rot_table["AA"]) print(table1.orta())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment