Skip to content

Commit

Permalink
Merge pull request #1796 from jeromekelleher/gc-arg-error
Browse files Browse the repository at this point in the history
Release 1.0.2
  • Loading branch information
jeromekelleher authored Jul 29, 2021
2 parents 2e756ad + b96f24e commit 56d2215
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
# Changelog

## [1.0.2] - 2021-06-XX
## [1.0.2] - 2021-06-29

Improved Demes support and minor bugfixes.

**New features**:

- Support for Demes input and logging in the msp simulate CLI
({pr}`1716`, {user}`jeromekelleher`).
- Add ``Demography.to_demes`` method for creating a Demes demographic model
from an msprime demography ({pr}`1724`, {user}`grahamgower`).
- Improved mapping of Demes models to Demography objects
({pr}`1758`, {pr}`1757`, {pr}`1756` {user}`apragsdale`).
- Improved numerical algorithms in DemographyDebugger ({pr}`1788`,
{user}`grahamgower`, {user}`petrelharp`).

**Bugfixes**:

- Raise an error if running full ARG simulations with gene conversion
({issue}`1774`).

## [1.0.1] - 2021-05-10

Expand Down
6 changes: 6 additions & 0 deletions msprime/ancestry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,12 @@ def __init__(
# https://github.com/tskit-dev/msprime/issues/1212
assert len(gene_conversion_map.rate) == 1
gene_conversion_rate = gene_conversion_map.rate[0]
if gene_conversion_rate > 0 and store_full_arg:
raise ValueError(
"The record_full_arg option is not currently supported for "
"simulations with gene conversion. See "
"https://github.com/tskit-dev/msprime/issues/1773"
)

start_time = -1 if start_time is None else start_time
super().__init__(
Expand Down
10 changes: 10 additions & 0 deletions tests/test_ancestry.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,16 @@ def test_gene_conversion_errors(self):
gene_conversion_tract_length=bad_type,
)

def test_gene_conversion_full_arg_unsupported(self):
with pytest.raises(ValueError, match="record_full_arg"):
ancestry._parse_sim_ancestry(
10,
sequence_length=100,
gene_conversion_rate=1,
gene_conversion_tract_length=5,
record_full_arg=True,
)

def test_discrete_genome(self):
# default is True
sim = ancestry._parse_sim_ancestry(10, sequence_length=10)
Expand Down

0 comments on commit 56d2215

Please sign in to comment.