Skip to content
Snippets Groups Projects
Commit a4780a14 authored by Nihama Sandra Ayumi's avatar Nihama Sandra Ayumi
Browse files

private instance changed

parent e2fd5d8e
Branches
No related tags found
No related merge requests found
import mathutils import mathutils
import math import math
import numpy
class RotTable: class RotTable:
"""Represents the rotation table""" """Represents the rotation table"""
...@@ -24,17 +25,16 @@ class RotTable: ...@@ -24,17 +25,16 @@ 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])
################### ###################
...@@ -58,5 +58,5 @@ class RotTable: ...@@ -58,5 +58,5 @@ 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