Skip to content

Commit fd6e6f7

Browse files
committed
Address comments from Jerome
1 parent 51ab754 commit fd6e6f7

2 files changed

Lines changed: 6 additions & 14 deletions

File tree

docs/stats.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -700,12 +700,11 @@ statistics methods in that it provides a unified API with an argument to
700700
specify different two-locus summaries of the data. It otherwise behaves
701701
similarly to most other functions with respect to `sample_sets` and `indexes`.
702702

703-
Two-locus statistics can be computed using two modes, either `sites` or
703+
Two-locus statistics can be computed using two modes, either `site` or
704704
`branch`, and these should be interpreted in the same way as these modes in the
705-
single-site statistics. Site statistics allow for multi-allelic data, while
706-
branch statistics assume an infinite sites model. Within this framework, we
707-
also implement polarisation, but do not expose it to the user, opting to
708-
provide statistics that are polarised where appropriate.
705+
single-site statistics. Within this framework, we also implement polarisation,
706+
but do not expose it to the user, opting to provide statistics that are
707+
polarised where appropriate.
709708

710709
(sec_stats_two_locus_site)=
711710

@@ -762,7 +761,7 @@ each tree.
762761

763762
Similar to the single-site statistics computed in `branch` mode, this results
764763
in a statistic that is proportional to the expected statistic under an infinite
765-
sites model (which mutation rate 1), conditioned on the pair of trees.
764+
sites model (with mutation rate 1), conditioned on the pair of trees.
766765

767766
The time complexity of this method is quadratic, due to the pairwise
768767
comparisons of branches from a pair of trees. By default, this method computes
@@ -931,13 +930,6 @@ Where {math}`D` is defined above.
931930
And `D2_unbiased`, which can be found in [Ragsdale and Gravel
932931
(2020)](https://doi.org/10.1093/molbev/msz265).
933932

934-
:::{todo}
935-
Document statistics that use information about correlation between sites, such as
936-
LdCalculator (and perhaps reference {ref}`sec_identity`). Note that if we have a general
937-
framework which has the same calling conventions as the single site stats,
938-
we can rework the sections above.
939-
:::
940-
941933

942934
(sec_stats_notes)=
943935

python/tskit/trees.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10956,7 +10956,7 @@ def ld_matrix(
1095610956
1095710957
Similarly, in the branch mode, the ``positions`` argument specifies
1095810958
loci for which the expectation for the two-locus statistic is computed
10959-
over pairs of trees at those positions. LD statis are computed between
10959+
over pairs of trees at those positions. LD stats are computed between
1096010960
trees whose ``[start, end)`` contains the given position (such that
1096110961
repeats of trees are possible). Similar to the site mode, a nested list
1096210962
of row and column positions can be specified separately (resulting in a

0 commit comments

Comments
 (0)