From 1d2d2c1ff53c55353ca92aaab6b6992ea232a17c Mon Sep 17 00:00:00 2001 From: Miles Roberts <69371202+milesroberts-123@users.noreply.github.com> Date: Mon, 30 Jun 2025 15:22:14 -0400 Subject: [PATCH] Update diversity definition Just updating the documentation of the diversity() function in popgen.py to clarify that diversity is the mean number of differences between a pair of sequences, as opposed to other diversity estimators. --- sgkit/stats/popgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgkit/stats/popgen.py b/sgkit/stats/popgen.py index e201dfc98..af9884aa8 100644 --- a/sgkit/stats/popgen.py +++ b/sgkit/stats/popgen.py @@ -29,7 +29,7 @@ def diversity( cohort_allele_count: Hashable = variables.cohort_allele_count, merge: bool = True, ) -> Dataset: - """Compute diversity from cohort allele counts. + """Compute diversity as the average number of differences between a pair of sequences from cohort allele counts. By default, values of this statistic are calculated per variant. To compute values in windows, call :func:`window_by_position` or :func:`window_by_variant` before calling