add individual statistics (eg heterozygosity)
See original GitHub issueSomething like
def individual_heterozygosity(ts, ind):
ts.pairwise_diversity(ind.nodes)
should do it - very simple, but we want to make it easy and natural for people to deal with individuals.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:23 (23 by maintainers)
Top Results From Across the Web
Pop Ecol Lect 35
Heterozygosity is one of the best ways to approach the analysis of differences among populations. We will use heterozygosities as the basis for...
Read more >21 Genetic Structure - Applied Population Genetics
This is the expected heterozygosity if all the data were merged and mating as a single panmictic population. This parameter is estimated as...
Read more >Heterozygosity Ratio, a Robust Global Genomic Measure of ...
CHARACTERIZING genetic diversity across individuals and populations is ... Data set. To examine the population diversity of the heterozygosity ratio, ...
Read more >Statistical Analysis of Heterozygosity Data - JSTOR
certain of detecting them. In addition, it is emphasized that, for small numbers of loci (<25), the statistical detection of differences of interesting ......
Read more >Measures of genetic diversity
of our molecular study with other types of data (e.g. geographical). In the slide, Ind1, Ind2, … may represent, instead of individuals, populations...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So wrapping up on the scope of this:
With @petrelharp’s
observed_heterozygosity
Python example, I’ve got a great specification for A), thanks! The name is unambiguous and matches nicely and in an analogous way to all the other stats functions.Handling sex chromosomes is way out of scope right now. There are challenging issues in trying to deal with this and I’ll not worry about.
“observed heterozygosity” has a consistent meaning in the field (I think, I hope!) and @petrelharp’s clatification is a totally logical extension of it and NaN is the value for monoploids. (As a side note, this definition of heterozygosity seems sensible for diploids, because it has a max value of 1. But it seem wonky to me to use it rather than ‘gene diversity’ (see #961), as a statistic to use across many types of ploidy. Just a sort of esthetic personal reaction.)
Hammer out the details in (or after) #858 and make a separate GitHub issue to track implementing F_IT and F_IS.
This is too hard to hash out now in Github issues. More appropriate for brainstorming face-(to-screen-to-)face and/or after all this other stuff become more clear.
As this is showing up in the SLiM list, here’s how to compute individual heterozygosities: