JosephCrispell / homoplasyFinder

A tool to identify and annotate homoplasies on a phylogeny and sequence alignment
GNU General Public License v3.0
19 stars 3 forks source link

How does HomoplasyFinder handle polytomies/multifurcations? #18

Closed Jonathan-Abrahams closed 3 years ago

Jonathan-Abrahams commented 3 years ago

Hi Joseph,

How does homoplasyfinder handle polytomies?

For example, if there are 10 isolates in a polytomy and 3 of them have the same SNP whilst the others do not, how does this get handled by homoplasyfinder? EDIT: I am not sure what it does when i encounter htis in my own datasets...

I am also unsure how this SHOULD be interpreted anyway, but I think that you cant really infer anything from this situation?

Jonathan

JosephCrispell commented 3 years ago

Hi Jonathan,

Thanks for using homoplasyFinder and for asking such an interesting question! I must admit I haven't properly worked on homoplasyFinder for over a year, aside from fixing minor bugs so I've spent a bit of time exploring the source code. Essentially the possible nucleotides for a site at each sub-node are compared 1 by 1 in the order that the nodes are recorded in the phylogeny. The rule for the comparison is:

I've created a diagram that hopefully explains this: DealingWithPolytony Unfortunately, as the diagram above illustrates, the order of the nodes within a the polytomy will impact whether or not the site is treated as being inconsistent or not.

Would be really interested to hear your thoughts on the above - I seem to remember at the time not finding much information about how to deal with polytomies and so I landed on the above simplistic solution.

Jonathan-Abrahams commented 3 years ago

That's a clear answer. I will remove polytomies from my tree before using homoplasyfinder! Thanks so much for your help!

JosephCrispell commented 3 years ago

That's great, I'm glad my explanation makes sense 👍 . I've a short section into the wiki to flag this issue for others.

Thanks again for using homoplasyFinder and for asking such an interesting question!