@@ -754,9 +754,9 @@ of return statistics as expected by the user.
754754
755755Briefly, consider a pair of sites with {math}` n ` alleles at the first locus and
756756{math}` m ` alleles at the second. (Whether this includes the ancestral allele
757- depends on whether the statistic is polarised.) Write {math}` f_{i,j} ` as the statistic
758- computed for focal alleles {math}` A_i ` and {math}` B_j ` .
759- Then the weighting schemes are defined as:
757+ depends on whether the statistic is polarised.) Write {math}` f_{i,j} ` as the
758+ statistic computed for focal alleles {math}` A_i ` and {math}` B_j ` . Then the
759+ weighting schemes are defined as:
760760
761761- ` hap_weighted ` : {math}` \sum_{i=1}^{n}\sum_{j=1}^{m}p(A_{i}B_{j})f_{ij} ` ,
762762 where {math}` p(A_{i}B_{j}) ` is the frequency of haplotype {math}` A_{i}B_{j} ` .
@@ -847,12 +847,12 @@ matrix for each list of samples.
847847Some LD statistics can be computed between sample sets (two-way statistics are
848848specified below), in which case ` indexes ` must be specified that reference the
849849indexes of the ` sample_sets ` , which must be a list of lists of sample nodes.
850- This results in an LD matrix computed for each list of indexes.
851- The statistics are selected in the same way (with the ` stat `
852- argument), and these are limited to a handful of statistics (see
850+ This results in an LD matrix computed for each list of indexes. The statistics
851+ are selected in the same way (with the ` stat ` argument), and these are limited
852+ to a handful of statistics (see
853853{ref}` sec_stats_two_locus_summary_functions_two_way ` ). The dimension-dropping
854- rules for the result follow the rest of the tskit stats API in that a single list
855- or tuple will produce a single two-dimensional matrix, while list of these
854+ rules for the result follow the rest of the tskit stats API in that a single
855+ list or tuple will produce a single two-dimensional matrix, while list of these
856856will produce a three-dimensional array, with the first dimension of length
857857equal to the length of the list.
858858
@@ -910,10 +910,10 @@ set.
910910
911911##### One-way Statistics
912912
913- One-way statistics are summaries of two loci in a single sample set, using a
914- triple of haplotype counts {math}` \{w_ {Ab}, w_ {aB}, w_ {AB}\} ` and the size of
915- the sample set {math}` n ` , where the capitalized and lowercase letters in our notation
916- represent alternate alleles.
913+ One-way statistics are summaries of two loci in a single sample set, using
914+ a triple of haplotype counts {math}` \{n_ {Ab}, n_ {aB}, n_ {AB}\} ` and the size of
915+ the sample set {math}` n ` , where the capitalized and lowercase letters in our
916+ notation represent alternate alleles.
917917
918918(sec_stats_two_locus_sample_two_way_stats)=
919919
@@ -941,8 +941,8 @@ sets of samples (see also the note in {meth}`~TreeSequence.divergence`).
941941
942942##### One-way
943943
944- The two-locus summary functions all take haplotype counts and sample set size as
945- input. Each of our summary functions has the signature
944+ The two-locus summary functions all take haplotype counts and sample set size
945+ as input. Each of our summary functions has the signature
946946{math}` f(n_{Ab}, n_{aB}, n_{AB}, n) ` , converting to haplotype frequencies
947947{math}` \{p_{Ab}, p_{aB}, p_{AB}\} ` where appropriate by dividing by {math}` n ` .
948948
0 commit comments