Skip to content

Commit

Permalink
Update lshmm requirement to 0.0.5
Browse files Browse the repository at this point in the history
Also update changed parameter names
  • Loading branch information
jeromekelleher committed Aug 3, 2023
1 parent 4e58e87 commit 90a578a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion python/requirements/CI-complete/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ flake8==5.0.4
h5py==3.7.0
jsonschema==4.16.0
kastore==0.3.2
lshmm==0.0.4
lshmm==0.0.5
msgpack==1.0.4
msprime==1.2.0
networkx==2.6.3 # Held at 2.6.3 for Python 3.7 compatibility
Expand Down
4 changes: 2 additions & 2 deletions python/requirements/CI-tests-pip/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lshmm==0.0.4
lshmm==0.0.5
numpy==1.21.6; python_version < '3.11' # Held at 1.21.6 for Python 3.7 compatibility
numpy==1.24.1; python_version > '3.10'
pytest==7.1.3
Expand All @@ -12,4 +12,4 @@ dendropy==4.5.2
networkx==2.6.3 # Held at 2.6.3 for Python 3.7 compatibility
msgpack==1.0.4
newick==1.3.2
tszip==0.2.2
tszip==0.2.2
2 changes: 1 addition & 1 deletion python/requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ h5py>=2.6.0
jsonschema>=3.0.0
jupyter-book>=0.12.1
kastore
lshmm
lshmm>=0.0.5
matplotlib
meson>=0.61.0
msgpack>=1.0.0
Expand Down
20 changes: 10 additions & 10 deletions python/tests/test_haplotype_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ def verify(self, ts):
np.flip(H, axis=0),
np.flip(s, axis=1),
r_flip,
mutation_rate=np.flip(mu),
p_mutation=np.flip(mu),
scale_mutation_based_on_n_alleles=False,
)

Expand All @@ -952,7 +952,7 @@ def verify(self, ts):
H,
s,
r,
mutation_rate=mu,
p_mutation=mu,
scale_mutation_based_on_n_alleles=scale_mutation,
)
# Note, need to remove the first sample from the ts, and ensure
Expand All @@ -977,14 +977,14 @@ class TestForwardBackwardTree(FBAlgorithmBase):
def verify(self, ts):
for n, H, s, r, mu in self.example_parameters_haplotypes(ts):
F, c, ll = ls.forwards(
H, s, r, mutation_rate=mu, scale_mutation_based_on_n_alleles=False
H, s, r, p_mutation=mu, scale_mutation_based_on_n_alleles=False
)
B = ls.backwards(
H,
s,
c,
r,
mutation_rate=mu,
p_mutation=mu,
scale_mutation_based_on_n_alleles=False,
)

Expand Down Expand Up @@ -1017,7 +1017,7 @@ class TestTreeViterbiHap(VitAlgorithmBase):
def verify(self, ts):
for n, H, s, r, mu in self.example_parameters_haplotypes(ts):
path, ll = ls.viterbi(
H, s, r, mutation_rate=mu, scale_mutation_based_on_n_alleles=False
H, s, r, p_mutation=mu, scale_mutation_based_on_n_alleles=False
)
ts_check = ts.simplify(range(1, n + 1), filter_sites=False)
cm = ls_viterbi_tree(s[0, :], ts_check, r, mu)
Expand All @@ -1032,7 +1032,7 @@ def verify(self, ts):
s,
path_tree,
r,
mutation_rate=mu,
p_mutation=mu,
scale_mutation_based_on_n_alleles=False,
)
self.assertAllClose(ll, ll_check)
Expand All @@ -1055,7 +1055,7 @@ def check_viterbi(ts, h, recombination=None, mutation=None):
G,
h.reshape(1, m),
recombination,
mutation_rate=mutation,
p_mutation=mutation,
scale_mutation_based_on_n_alleles=False,
)
assert np.isscalar(ll)
Expand All @@ -1073,7 +1073,7 @@ def check_viterbi(ts, h, recombination=None, mutation=None):
h.reshape(1, m),
path_tree,
recombination,
mutation_rate=mutation,
p_mutation=mutation,
scale_mutation_based_on_n_alleles=False,
)
nt.assert_allclose(ll_check, ll)
Expand Down Expand Up @@ -1109,7 +1109,7 @@ def check_forward_matrix(ts, h, recombination=None, mutation=None):
G,
h.reshape(1, m),
recombination,
mutation_rate=mutation,
p_mutation=mutation,
scale_mutation_based_on_n_alleles=False,
)
assert F.shape == (m, n)
Expand Down Expand Up @@ -1154,7 +1154,7 @@ def check_backward_matrix(ts, h, forward_cm, recombination=None, mutation=None):
h.reshape(1, m),
forward_cm.normalisation_factor,
recombination,
mutation_rate=mutation,
p_mutation=mutation,
scale_mutation_based_on_n_alleles=False,
)

Expand Down

0 comments on commit 90a578a

Please sign in to comment.