Skip to content

Commit 57017b5

Browse files
hyanwongmergify[bot]
authored andcommitted
Temporarily disable --recombination-map in cli
1 parent 910e0eb commit 57017b5

2 files changed

Lines changed: 27 additions & 23 deletions

File tree

tests/test_cli.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def test_infer(self):
311311

312312
@pytest.mark.skip(
313313
reason="Ancestors not saving provenance:"
314-
"see https://github.com/tskit-dev/tsinfer/issues/743"
314+
"see https://github.com/tskit-dev/tsinfer/issues/753"
315315
)
316316
def test_ancestors(self):
317317
sd = tsinfer.load(self.sample_file)
@@ -357,9 +357,9 @@ def test_separate_calls(self):
357357
[
358358
"match-ancestors",
359359
self.sample_file,
360-
"--recombination_rate",
360+
"--recombination-rate",
361361
"0.001",
362-
"--mismatch_ratio",
362+
"--mismatch-ratio",
363363
"0.01",
364364
]
365365
)
@@ -372,9 +372,9 @@ def test_separate_calls(self):
372372
[
373373
"match-samples",
374374
self.sample_file,
375-
"--recombination_rate",
375+
"--recombination-rate",
376376
"10",
377-
"--mismatch_ratio",
377+
"--mismatch-ratio",
378378
"100",
379379
]
380380
)
@@ -386,9 +386,9 @@ def test_infer(self):
386386
command = [
387387
"infer",
388388
self.sample_file,
389-
"--recombination_rate",
389+
"--recombination-rate",
390390
"0.1",
391-
"--mismatch_ratio",
391+
"--mismatch-ratio",
392392
"10",
393393
]
394394
with mock.patch("tsinfer.infer") as infer:
@@ -397,6 +397,7 @@ def test_infer(self):
397397
assert kwargs["recombination_rate"] == 0.1
398398
assert kwargs["mismatch_ratio"] == 10
399399

400+
@pytest.mark.skip(reason="https://github.com/tskit-dev/tsinfer/issues/753")
400401
@pytest.mark.skipif(
401402
sys.platform == "win32", reason="windows simultaneous file permissions issue"
402403
)
@@ -409,14 +410,15 @@ def test_map(self):
409410
command = [
410411
"infer",
411412
self.sample_file,
412-
"--recombination_map",
413+
"--recombination-map",
413414
ratemap,
414415
]
415416
with mock.patch("tsinfer.infer") as infer:
416417
self.run_command(command)
417418
args, kwargs = infer.call_args
418419
assert isinstance(kwargs["recombination_rate"], msprime.RateMap)
419420

421+
@pytest.mark.skip(reason="https://github.com/tskit-dev/tsinfer/issues/753")
420422
@pytest.mark.skipif(
421423
sys.platform == "win32", reason="windows simultaneous file permissions issue"
422424
)
@@ -433,7 +435,7 @@ def test_fails_on_bad_map(self):
433435
command = [
434436
"infer",
435437
self.sample_file,
436-
"--recombination_map",
438+
"--recombination-map",
437439
ratemap,
438440
"-O",
439441
output_trees,

tsinfer/cli.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
resource = None # resource.getrusage absent on windows, so skip outputting max mem
3333

3434
import daiquiri
35-
import msprime # for the RateMap class
35+
3636
import tskit
3737
import humanize
3838
import time
@@ -89,8 +89,9 @@ def get_output_trees_path(path, input_path):
8989
def get_recombination_map(args):
9090
if args.recombination_rate is not None:
9191
return args.recombination_rate
92-
if args.recombination_map is not None:
93-
return msprime.RateMap.read_hapmap(args.recombination_map)
92+
# uncomment below when https://github.com/tskit-dev/tsinfer/issues/753 fixed
93+
# if args.recombination_map is not None:
94+
# return msprime.RateMap.read_hapmap(args.recombination_map)
9495
return None
9596

9697

@@ -354,25 +355,26 @@ def add_postprocess_argument(parser):
354355
def add_recombination_arguments(parser):
355356
group = parser.add_mutually_exclusive_group()
356357
group.add_argument(
357-
"--recombination_rate",
358+
"--recombination-rate",
358359
default=None,
359360
type=float,
360361
help="The recombination rate per unit genome",
361362
)
362-
group.add_argument(
363-
"--recombination_map",
364-
default=None,
365-
help=(
366-
"The path to a file containing recombination rates along the chromosome "
367-
"in HapMap format (see https://tskit.dev/msprime/docs/latest/api.html"
368-
"#msprime.RateMap.read_hapmap for details of the format)"
369-
),
370-
)
363+
# Uncomment below when https://github.com/tskit-dev/tsinfer/issues/753 fixed
364+
# group.add_argument(
365+
# "--recombination-map",
366+
# default=None,
367+
# help=(
368+
# "The path to a file containing recombination rates along the chromosome "
369+
# "in HapMap format (see https://tskit.dev/msprime/docs/latest/api.html"
370+
# "#msprime.RateMap.read_hapmap for details of the format)"
371+
# ),
372+
# )
371373

372374

373375
def add_mismatch_argument(parser):
374376
parser.add_argument(
375-
"--mismatch_ratio",
377+
"--mismatch-ratio",
376378
type=float,
377379
default=None,
378380
help=(

0 commit comments

Comments
 (0)