Commit 21a25909 authored by Lucianna Osucha's avatar Lucianna Osucha

-Added codon iterator for mRNA class.

-Added baseWeights and adjustedWeights lists to mRNA class.
parent cb7fb088
class mRNA :
def __init__(self,cd:str,og:str,pal:int):
......@@ -6,6 +9,7 @@ class mRNA :
self.originGene:str = og
self.polyALength:int = pal
self.baseWeights:list[float] = []
self.kozakStrengths:list[float] = []
self.leakyScanStrengths:list[float] = []
......@@ -14,9 +18,29 @@ class mRNA :
self.IREs:list[tuple] = []
self.uORFs:list[tuple] = []
self.adjustedWeights:list[float] = []
self.processedBy:list[str] = []
def getReadingFrame(self,start:int) -> str:
return self.code[start:]
\ No newline at end of file
class Iterable(codonString) :
def __init__(self, parent:mRNA, start:int, stop:int):
self.parent:mRNA = parent
self.loc:int = start
self.stop:int = stop
def __iter__(self):
return self
def next(self):
if self.loc >= stop:
raise StopIteration
value = parent.code[self.loc:(self.loc + 2)]
self.loc += 3
return value
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment