diff --git a/__pycache__/RotTable.cpython-37.pyc b/__pycache__/RotTable.cpython-37.pyc index d0d2bee9e71c849781de9a96c497f02788ecaaf7..871a676fa8235c0400b419269ae9e4181252734d 100644 Binary files a/__pycache__/RotTable.cpython-37.pyc and b/__pycache__/RotTable.cpython-37.pyc differ diff --git a/__pycache__/Traj3D.cpython-37.pyc b/__pycache__/Traj3D.cpython-37.pyc index 9f5f20ef7c01a060943e03ea5beaee567c92ae7e..dea944e68cade651c52da0042ac2d62a176dc023 100644 Binary files a/__pycache__/Traj3D.cpython-37.pyc and b/__pycache__/Traj3D.cpython-37.pyc differ diff --git a/__pycache__/individu.cpython-37.pyc b/__pycache__/individu.cpython-37.pyc index 83b7aac12df9ffd210cc807f63745df4b2a39629..96ed7d90f93ff50da4b4f4476bc9f4ce8555ea0f 100644 Binary files a/__pycache__/individu.cpython-37.pyc and b/__pycache__/individu.cpython-37.pyc differ diff --git a/croisement.py b/croisement.py index 96f85a8a89e1dcaa97cbed0f06233942ee36f211..f582b97adf677ee8b286e66fed052044192acd48 100644 --- a/croisement.py +++ b/croisement.py @@ -27,7 +27,8 @@ def croisement_un_point(parent1, parent2): enfant2 = Individu(RotTable()) comp = 0 point_crois= numpy.random.random_integers(0,8) - for doublet in ROT_TABLE: + list_dinucleotides = sorted(ROT_TABLE) + for doublet in list_dinucleotides: if doublet == "GA": break if comp < point_crois: @@ -62,7 +63,8 @@ def croisement_deux_points(parent1, parent2): comp = 0 point_crois1= numpy.random.random_integers(0,8) point_crois2= numpy.random.random_integers(0,8) - for doublet in ROT_TABLE: + list_dinucleotides = sorted(ROT_TABLE) + for doublet in list_dinucleotides: if comp < min(point_crois1,point_crois2) or comp > max(point_crois1,point_crois2): enfant1.table.rot_table[doublet] = parent1.table.rot_table[doublet] correspondent_doublet1 = enfant1.table.corr()[doublet]