@@ -86,7 +86,7 @@ print(f"Average diversity per unit sequence length = {d:e}")
8686The above result tells us the average diversity across the samples and
8787their whole sequence (that is their genomes), returning a single number.
8888Note the emphasis on "average" in the above print statement.
89- See the {ref}` Span normalisation<tskit:sec_stats_span_normalise > ` sub-section
89+ See the {ref}` Span normalisation<sec_span_normalise > ` sub-section
9090below for more details on this point.
9191
9292#### Windows
@@ -118,8 +118,8 @@ the output dimensions of statistics are determined by the ``windows`` argument.
118118#### Sample sets
119119
120120Suppose we wanted to compute average diversity within a specific subset of samples,
121- instead of all samples. We can do this using the {ref} ` tskit:sec_stats_sample_sets `
122- argument:
121+ instead of all samples.
122+ We can do this using the {ref} ` sample_sets<tskit:sec_stats_sample_sets> ` argument:
123123
124124``` {code-cell} ipython3
125125A = ts.samples()[:100]
@@ -169,8 +169,8 @@ Above we referred to the *average* diversity per unit sequence length,
169169either for the whole sequence or within windows.
170170To facilitate comparison, tskit by default normalises statistics
171171by the sequence length, returning average of a statistic.
172- When this is not what you want, you can use the {ref} ` tskit:sec_stats_span_normalise `
173- argument:
172+ When this is not what you want,
173+ you can use the {ref} ` span_normalise<tskit:sec_stats_span_normalise> ` argument:
174174
175175``` {code-cell} ipython3
176176davg = ts.diversity()
@@ -226,7 +226,7 @@ ts.diversity(mode="branch") being 40534.4...)?
226226Above we have computed statistics based on site mutations in the tree sequence.
227227In tskit, these statistics are hence called "site-based". This "mode" of statistics
228228is computed by default, but we can also compute "branch-based" and "node-based"
229- statistics using the {ref}` tskit:sec_stats_mode ` argument:
229+ statistics using the {ref}` mode< tskit:sec_stats_mode> ` argument:
230230
231231``` {code-cell} ipython3
232232ds = ts.diversity()
@@ -283,7 +283,7 @@ set A and B in each window.
283283
284284A powerful feature of tskit's statistics API is that we can compute
285285multi-way statistics between multiple sets of samples simultaneously
286- using the {ref}` indexes<tskit:sec_stats_sample_sets_multi_way ` argument:
286+ using the {ref}` indexes<tskit:sec_stats_sample_sets_multi_way> ` argument:
287287
288288``` {code-cell} ipython3
289289d = ts.divergence(sample_sets=[A, B, C], indexes=[(0, 1), (0, 2)])
0 commit comments