Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/ibd.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,13 @@ of what's stored in the tree sequence.
As discussed in
[Fritze et al](https://doi.org/10.1093/genetics/iyaf198),
most tree sequence simulators (at time of writing)
will produce this tree sequence even if node ``2``
will produce this tree sequence by default, even if node ``2``
does in fact inherit from ``3`` over the entire sequence.
Using {meth}`.TreeSequence.extend_haplotypes` will
"put the unary nodes back":
For the [msprime](https://tskit.dev/msprime/) simulator, intermediate
nodes can be retained using
{ref}`coalescing_segments_only=False<msprime:sec_additional_nodes_cso>`.
More generally, {meth}`.TreeSequence.extend_haplotypes` will
attempt to "put the unary nodes back":
```{code-cell}
ets = ts.extend_haplotypes()
SVG(ets.draw_svg())
Expand Down
14 changes: 9 additions & 5 deletions docs/stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,19 @@ Here are the statistics that can be computed using `tskit`,
grouped by basic classification and type. Single-site statistics are ones that are
averages across sites in windows of the genome, returning numpy arrays whose
dimensions are determined by the parameters (see {ref}`sec_stats_output_dimensions`).
Multi-site statistics summarize relationships between different sites along the genome,
such as linkage disequilibium (LD).

{ref}`sec_stats_sample_sets_one_way` are defined over a single sample set,
whereas {ref}`sec_stats_sample_sets_multi_way` compare 2 or more sets of samples.
Both single and multi-site approaches require specifying the sample genomes on which
a statistic is based. {ref}`sec_stats_sample_sets_one_way` are defined over a single
sample set, whereas {ref}`sec_stats_sample_sets_multi_way` compare 2 or more sets
of samples.

Some of the methods below benefit from a little extra discussion, provided in the
{ref}`sec_stats_notes` section at the end of this chapter: if so, a link to the note
appears beside the listed method.

* Single site
* {ref}`Single site<sec_stats_single_site>`
* One-way
* {meth}`~TreeSequence.allele_frequency_spectrum` (see {ref}`notes<sec_stats_notes_afs>`)
* {meth}`~TreeSequence.diversity`
Expand All @@ -86,8 +90,8 @@ appears beside the listed method.
(see {ref}`sec_stats_notes_y`)
* {meth}`~TreeSequence.genealogical_nearest_neighbours` (see {ref}`sec_stats_notes_gnn`)
* {meth}`~TreeSequence.Fst` (see {ref}`sec_stats_notes_derived`)
* Multi site
* {meth}`~LdCalculator` (note this is soon to be deprecated)
* {ref}`Multi site<sec_stats_multi_site>`
* {meth}`~TreeSequence.ld_matrix` (see {ref}`sec_stats_two_locus`)

:::{note}
There is a general framework provided for calculating additional single site
Expand Down
Loading