question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tools for ancestry/inheritance calculation

See original GitHub issue

Here’s some closely related use cases that we’re seeing (e.g. #612). I’d like to collect them in one place so we can settle on a minimal number of useful methods and an API. So far:

  1. (ancestry painting) Given a list of nonoverlapping sets of nodes, the ancestors, and a collection of samples, return somehow an assignment for each sample of which set of nodes it inherits from on each part of the genome (if any).

  2. (ancestry proportions) Instead of the whole ancestry painting, return summaries of it in windows: what proportion of the samples’s genomes inherit from each set of ancestors, in each window.

  3. (number of descendants) Given a list of samples and a list of nonoverlapping sets “ancestral” nodes, return for each set of ancestors what proportion of the samples’ genomes that inherit from that set of nodes. (This should also be done in windows.)

The last two sound very similar, but one is indexed by ancestors; the other by descendants.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
gtsamboscommented, Sep 29, 2020

I reckon we can close it given various bits of progress over the last few years. Just looking at the issues in the OP: (1) has been addressed by link_ancestors (though some additional ‘wrapper’ that makes its uses more obvious might be good in the future too.) (2) sounds like a node statistic that would be fairly easy to code up if wanted (and if you haven’t done so already, @petrelharp).

(3) hasn’t been done to my knowledge, but now I’m reading over it again, I think some details would need to be ironed out before it was – for example, what would you do if the ancestral node only has extant ancestry in some of the window? I suspect that part of the reason why we dropped this is that there was no immediate use case for it, compared with these other things.

In general, I think we’ve done a lot of work making various tools that are useful for analyses of ancestry and inheritance, and any further work would be better to discuss in a more specific issue.

1reaction
petrelharpcommented, Jan 13, 2019

Something nonobvious I’ve discovered in working in that sandbox. It is sometimes natural to work with boolean arrays. But, we should not end up sometimes using boolean arrays and sometimes using arrays of indices, and translating boolean arrays to indices with np.where( ). It’s hard to keep track of what is what, and I just spent a while tracking down a bug because I applied np.where( ) to an array of indices, which produced no errors at all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Ways to Use the DNA Coverage Estimator - Legacy Tree
Five Ways to Use the New DNA Coverage Estimator Tool at DNA Painter · 1. Estimate Your Ancestor's Coverage in a Single Testing...
Read more >
Ethnicity Inheritance - Ancestry Support
Your ethnicity inheritance estimates which regions you inherited from each parent. Find it beneath your ethnicity estimate.
Read more >
Ancestry introduces new DNA tool that reveals the DNA you ...
Ancestry introduces new DNA tool that reveals the DNA you inherited from each parent. Ancestry's new SideView technology splits customers' ...
Read more >
Third party tools for DNA - DNA Painter
Third-party tools for DNA ; Admixture Studio, DNA Kit Studio. Wilhelm HO · Autosomal & X · WGS; Windows-only; Free + Paid ;...
Read more >
Concepts – Calculating Ethnicity Percentages - DNAeXplained
OK, but why “roughly?” We all know that we inherit 50% of each of our parents' DNA. So that means we receive half...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found