Skip to content

Commit

Permalink
fixed the massive problem
Browse files Browse the repository at this point in the history
small modifications
  • Loading branch information
adelbke committed Mar 19, 2021
1 parent c757dd7 commit 7c9f503
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Binary file modified projetsysteme/__pycache__/components.cpython-38.pyc
Binary file not shown.
Binary file modified projetsysteme/__pycache__/dna.cpython-38.pyc
Binary file not shown.
5 changes: 4 additions & 1 deletion projetsysteme/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self, *args, **kwargs):


def action_creer_adn(self):
n,result = QInputDialog.getInt(QWidget(), "Input Dialog", "Entrer la longueur:",0,0)
n,result = QInputDialog.getInt(QWidget(), "Input Dialog", "Entrer la longueur:",min=1)
if result:
if n>0:
N=n
Expand Down Expand Up @@ -157,7 +157,10 @@ def __init__(self, *args, **kwargs):
textEdit.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
textEdit.setLineWrapMode(QTextEdit.NoWrap)
singleWidth = textEdit.fontMetrics().boundingRect('A').width()
singleHeight = textEdit.fontMetrics().boundingRect('A').height()

textEdit.setFixedWidth(singleWidth*element[2])
textEdit.setFixedHeight(singleHeight*3)


setattr(self,'label_'+element[1], label)
Expand Down
10 changes: 6 additions & 4 deletions projetsysteme/dna.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ def taux_codons(cls):
@classmethod
def masse(cls):
from .acid_mass import amino_acid_abr, mass_amino_acid
if (len(cls.protein_chain)>0):
prot = cls.protein_chain.replace(' ','')
if (len(prot)>0):
index = 0
l = []
while index <= len(cls.protein_chain)-1:
if(len(cls.protein_chain[index:index+3]) == 3):
l.append(amino_acid_abr[cls.protein_chain[index:index+3]])
while index <= len(prot)-1:
if(len(prot[index:index+3]) == 3):

l.append(amino_acid_abr[prot[index:index+3]])

index += 3
prot_abr = ""
Expand Down

0 comments on commit 7c9f503

Please sign in to comment.