Repository navigation
Inconsistent mutation numbers between true trees and tsinferred trees #801
Unanswered
Proteios1998
asked this question in
Q&A
Replies: 3 comments 2 replies
|
One shouldn't expect that the inferred tree sequence will be the same as the true tree, only that the resulting genotypes of the samples will be the same. As such the number of mutations can differ, as if the topology of the tree is different a different set of mutations might be needed. There can also be back mutations depending on your tsinfer settings. See https://tskit.dev/tsinfer/docs/stable/inference.html#matching-ancestors-samples |
2 replies
|
Did you infer with a recombination rate or recombination map? If so, then for s in inferred_ts.sites():
if len(s.mutations) > 1:
print(s) # you might get a lot of sites printed here! |
0 replies
|
Did you ever manage fo figure out what was going on here, @Proteios1998 ? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, I tried to use tsinfer to infer a tree sequence given the .samples file generated from the true simulated tree. I use
tsinfer.SampleData.from_tree_sequence(ts, path=out, num_flush_threads=10)to get the .samples file. I usedtsinfer ls *.samplesto check the number of sites in the .samples file and the number is the same as the number of sites in the original tree sequence. However, after using tsinfer to get the inferred tree, I found the number of mutations in the inferred tree (581937) is different from that in the true tree (578231). Could you help explain why?The information of the .samples file:

The information of the inferred tree:

The information of the true tree:

All reactions