Skip to content

Commit 94e550f

Browse files
committed
v1.0.2, check changelog.md
1 parent 211876d commit 94e550f

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

22
# Opqua Changelog
33

4+
## v1.0.2
5+
Previous fix didn't cut it and I jumped the gun on the release. This works.
6+
47
## v1.0.1
58
Fixed recombination bug where one of the two progeny genomes was being lost
69
(thanks David Suárez!).

opqua/internal/host.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,12 @@ def recombine(self,rand):
324324
num_evts = np.random.poisson( self.population.num_crossover_host )
325325
loci = np.random.randint( 0, self.population.num_loci, num_evts )
326326

327-
parents = [ genomes[index_genome], genomes[index_other_genome] ]
328327
children = [ genomes[index_genome], genomes[index_other_genome] ]
329328

330329
for l in loci:
331-
children[0] = children[0][0:l] + parents[1][l:]
332-
children[1] = children[1][0:l] + parents[0][l:]
330+
temp_child_0 = children[0]
331+
children[0] = children[0][0:l] + children[1][l:]
332+
children[1] = children[1][0:l] + temp_child_0[l:]
333333

334334
children = [
335335
genome.split(self.population.CHROMOSOME_SEPARATOR)

opqua/internal/vector.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,12 @@ def recombine(self,rand):
325325
num_evts = np.random.poisson( self.population.num_crossover_vector )
326326
loci = np.random.randint( 0, self.population.num_loci, num_evts )
327327

328-
parents = [ genomes[index_genome], genomes[index_other_genome] ]
329328
children = [ genomes[index_genome], genomes[index_other_genome] ]
330329

331330
for l in loci:
332-
children[0] = children[0][0:l] + parents[1][l:]
333-
children[1] = children[1][0:l] + parents[0][l:]
331+
temp_child_0 = children[0]
332+
children[0] = children[0][0:l] + children[1][l:]
333+
children[1] = children[1][0:l] + temp_child_0[l:]
334334

335335
children = [
336336
genome.split(self.population.CHROMOSOME_SEPARATOR)

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name='opqua',
12-
version='v1.0.1',
12+
version='v1.0.2',
1313
description='An epidemiological modeling framework for population ' \
1414
+ 'genetics and evolution.',
1515
long_description='Opqua is an epidemiological modeling framework for ' \
@@ -21,7 +21,7 @@
2121
+ 'evolution and epidemiology. \n\n Visit ' \
2222
+ 'github.com/pablocarderam/opqua for more information.',
2323
url='https://github.com/pablocarderam/opqua',
24-
download_url='https://github.com/pablocarderam/opqua/archive/v1.0.1.tar.gz',
24+
download_url='https://github.com/pablocarderam/opqua/archive/v1.0.2.tar.gz',
2525
author='Pablo Cardenas',
2626
author_email='[email protected]',
2727
keywords=['epidemiology','evolution','biology'],

0 commit comments

Comments
 (0)