Skip to content
Snippets Groups Projects
Commit 8c88b58d authored by Santos Garcia Carlos's avatar Santos Garcia Carlos
Browse files

Merge branch 'master' of...

parents 897c1c29 b85fe195
Branches
No related tags found
No related merge requests found
*.pyc
\ No newline at end of file
...@@ -75,13 +75,13 @@ class RotTable: ...@@ -75,13 +75,13 @@ class RotTable:
################### ###################
def getTwist(self, dinucleotide): def getTwist(self, dinucleotide):
return RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][0] return self.rot_table[dinucleotide][0]
def getWedge(self, dinucleotide): def getWedge(self, dinucleotide):
return RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][1] return self.rot_table[dinucleotide][1]
def getDirection(self, dinucleotide): def getDirection(self, dinucleotide):
return RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][2] return self.rot_table[dinucleotide][2]
################### ###################
......
File deleted
File deleted
No preview for this file type
File deleted
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -29,11 +29,13 @@ def main(N,tmax,pmutation, proportion,brin="plasmid_8k.fasta"): ...@@ -29,11 +29,13 @@ def main(N,tmax,pmutation, proportion,brin="plasmid_8k.fasta"):
best=individu best=individu
max=individu.score max=individu.score
L.append(max) L.append(max)
print(L) #print(L)
plt.plot([i for i in range(tmax)], L) plt.plot([i for i in range(tmax)], L)
plt.show() plt.show()
return(individu) return(best)
main(100,50,0.015,50)
main(100,50,0.015,2)
...@@ -18,7 +18,7 @@ ROT_TABLE = {\ ...@@ -18,7 +18,7 @@ ROT_TABLE = {\
"TA": [36, 0.9, 0, 1.1, 2, 0],\ "TA": [36, 0.9, 0, 1.1, 2, 0],\
"TC": [36.9, 5.3, -120, 0.9, 6, 0],\ "TC": [36.9, 5.3, -120, 0.9, 6, 0],\
"TG": [34.5, 3.5, 64, 0.9, 34, 0],\ "TG": [34.5, 3.5, 64, 0.9, 34, 0],\
"TT": [35.62, 7.2, -154, 0.06, 0.6, 0]\ "TT": [35.62, 7.2, 154, 0.06, 0.6, 0]\
} }
......
...@@ -32,7 +32,7 @@ class Individu(): ...@@ -32,7 +32,7 @@ class Individu():
# print(rot_computed) # print(rot_computed)
#diff_angle = sum(abs(rot_computed - rot_traj)) #diff_angle = sum(abs(rot_computed - rot_traj))
self.score = 1/(distance) self.score = 1/distance
def mutation(self, proba = P1): def mutation(self, proba = P1):
......
...@@ -55,7 +55,7 @@ class Population: ...@@ -55,7 +55,7 @@ class Population:
y=self.indiv[t] y=self.indiv[t]
vu.add(t) vu.add(t)
vu.add(m) vu.add(m)
if x.score<=y.score: if x.score>=y.score:
newself.append(x) newself.append(x)
else: else:
newself.append(y) newself.append(y)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment