@@ -295,8 +295,8 @@ def infer(
295
295
and ``path_compression``.
296
296
297
297
.. note::
298
- For finer grained control over inference, for example to set different mismatch
299
- ratios when matching ancestors versus samples, run
298
+ For finer grained control over inference, for example to set mismatch
299
+ ratios when matching ancestors as well as when matching samples, run
300
300
:func:`tsinfer.generate_ancestors`, :func:`tsinfer.match_ancestors` and
301
301
:func:`tsinfer.match_samples` separately.
302
302
@@ -305,14 +305,14 @@ def infer(
305
305
:param recombination_rate: Either a floating point value giving a constant rate
306
306
:math:`\\ rho` per unit length of genome, or an :class:`msprime.RateMap`
307
307
object. This is used to calculate the probability of recombination between
308
- adjacent sites. If ``None``, all matching conflicts are resolved by
309
- recombination and all inference sites will have a single mutation
310
- (equivalent to mismatch_ratio near zero)
308
+ adjacent sites in the match_samples stage . If ``None``, all matching
309
+ conflicts are resolved by recombination and all inference sites will have
310
+ a single mutation (equivalent to mismatch_ratio near zero).
311
311
:type recombination_rate: float, msprime.RateMap
312
312
:param float mismatch_ratio: The probability of a mismatch relative to the median
313
313
probability of recombination between adjacent sites: can only be used if a
314
314
recombination rate has been set (default: ``None`` treated as 1 if
315
- ``recombination_rate`` is set).
315
+ ``recombination_rate`` is set). This is only applied in the match_samples stage.
316
316
:param bool path_compression: Whether to merge edges that share identical
317
317
paths (essentially taking advantage of shared recombination breakpoints).
318
318
:param bool post_process: Whether to run the :func:`post_process` method on the
@@ -348,13 +348,13 @@ def infer(
348
348
progress_monitor = progress_monitor ,
349
349
record_provenance = False ,
350
350
)
351
+ # NB: do not pass or encourage use of the mismatch ratio / recombination rate in
352
+ # the ancestor matching phase. See https://github.com/tskit-dev/tsinfer/issues/980
351
353
ancestors_ts = match_ancestors (
352
354
sample_data ,
353
355
ancestor_data ,
354
356
engine = engine ,
355
357
num_threads = num_threads ,
356
- recombination_rate = recombination_rate ,
357
- mismatch_ratio = mismatch_ratio ,
358
358
precision = precision ,
359
359
path_compression = path_compression ,
360
360
progress_monitor = progress_monitor ,
0 commit comments