@@ -751,7 +751,7 @@ by [Zhao (2007)](https://doi.org/10.1017/S0016672307008634).
751751
752752Briefly, consider a pair of sites with {math}` n ` alleles at the first locus and
753753{math}` m ` alleles at the second. (Whether this includes the ancestral allele
754- depends on whether the statistic is polarised.) Write {math}` f_{i,j } ` as the
754+ depends on whether the statistic is polarised.) Write {math}` f_{ij } ` as the
755755statistic computed for focal alleles {math}` A_i ` and {math}` B_j ` . Then the
756756weighting schemes are defined as:
757757
@@ -838,6 +838,8 @@ prod_branch_lengths = np.outer(total_branch_lengths, total_branch_lengths)
838838print(ld / prod_branch_lengths[0:4, 0:4])
839839```
840840
841+ To compute the average {math}` r^2 ` for a uniformly chosen pair of mutations, we also
842+ weight by tree span:
841843As with the ` "site" ` mode above, we can specify the row and column trees
842844separately.
843845
@@ -933,7 +935,19 @@ One-way statistics are summaries of two loci in a single sample set, using
933935a triple of haplotype counts {math}` \{n_{AB}, n_{Ab}, n_{aB}\} ` and the size of
934936the sample set {math}` n ` , where the capitalized and lowercase letters in our
935937notation represent alternate alleles.
936-
938+ ::::{warning}
939+ This means there are two common situations in which many or all LD values will be nan.
940+ These are:
941+
942+ 1 . A branch-mode ratio statistic computed on less than the full set of samples
943+ will always be nan, since part of the trees are ancestral to none of the samples.
944+ 2 . A site-mode ratio statistic will be nan at any sites at which there are alleles found
945+ in the entire set of samples that are not seen in the provided sample set.
946+
947+ This behavior ** may change in the future** ,
948+ because possibly more natural behavior not currently implemented
949+ would be to ignore the branches/alleles not ancestral
950+ to any of the provided samples.
937951(sec_stats_two_locus_sample_two_way_stats)=
938952
939953#### Two-way Statistics
0 commit comments