Skip to content

population identity in VCF #1472

Answered by benjeffery
k-lamb asked this question in Q&A
May 26, 2021 · 3 comments · 2 replies
Discussion options

You must be logged in to vote

Hi @k-lamb! Thanks for your question.

It seems that half your sample nodes are from each population as expected:

>>>  pops = node.population for node in ts.nodes() if node.is_sample()
>>> list(pops)
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
>>> collections.Counter(pops)
Counter({0: 50, 1: 50})

What is happening is that for your VCF you have specified a ploidy of 2 so (as you say in your comment) VCF sample 0 is a combination of tree s…

Replies: 3 comments 2 replies

Comment options

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

Answer selected by benjeffery
Comment options

You must be logged in to vote
0 replies
Comment options

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

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