Skip to content

Analyzing ancestry on females only #158

Answered by petrelharp
Mduranton asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, Maud! Let's see. Simplification won't change where coalescence happens; but it will remove everything above the MRCA of the samples. If I understand correctly, the problem is that, for instance, the females have a MRCA who is in the hybrid population, so after simplification you can't trace back their ancestry to population 0 or 1? If so, the solution is easy: use the "keep_input_roots=True" option to simplify, and those initial nodes will be still there after simplification. So, just

female_ts = ts.simplify(female_nodes, keep_input_roots=True) 

Let me know if that solves your problem? If not I think I'll need some more information about how you're calling ancestry.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Mduranton
Comment options

Answer selected by petrelharp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants