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

added the rot_table to master

parent eb0982cc
No related branches found
No related tags found
No related merge requests found
...@@ -25,23 +25,23 @@ class RotTable: ...@@ -25,23 +25,23 @@ class RotTable:
} }
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()
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])
################### ###################
# WRITING METHODS # # WRITING METHODS #
################### ###################
#table = RotTable() #table = RotTable()
#table.__Rot_Table["AA"] --> [35.62, 7.2, -154] #table.rot_table["AA"] --> [35.62, 7.2, -154]
################### ###################
# READING METHODS # # READING METHODS #
...@@ -59,4 +59,4 @@ class RotTable: ...@@ -59,4 +59,4 @@ class RotTable:
################### ###################
table1 = RotTable() table1 = RotTable()
print(table1.Rot_Table["AA"]) print(table1.rot_table["AA"])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment