ms609 / TreeDist

Calculate distances between phylogenetic trees in R
https://ms609.github.io/TreeDist/
28 stars 5 forks source link

Error with `VisualizeMatching` #103

Closed Sidduppal closed 10 months ago

Sidduppal commented 1 year ago

Hey Martin, thanks for building this amazing tool. I have been getting the following error when running VisualizeMatching. I tried running VisualizeMatching with the test data you use in the manual and it's running well so I know that the code is working. However, I'm unable to identify why my data is causing this error. Other functions (eg. TreeDistance) seems to be working. Any idea what I could be missing?

Error in if (any(DF[A, ] != DF[B, ])) { :
missing value where TRUE/FALSE needed

Thanks

ms609 commented 1 year ago

Hi @Sidduppal ,

Thanks for your interest in the package, glad it's proving useful!

To get to the bottom of this issue, it'd be helpful to know exactly what code you were running when the error arose. If you're also able to share the trees you are comparing (via e-mail if not publicly), that would help me to debug.

Thanks

Martin

Sidduppal commented 1 year ago

Hey @ms609 can you tell me the email to send to ?

ms609 commented 1 year ago

Thanks for sending the trees, which has helped me to pinpoint the error, which is arising because the code does not presently handle unrooted trees. I'll look into supporting this in the coming week or two.

In the meantime, you can try:

VisualizeMatching(ClusteringInfoDist, RootTree(tr1, 1), RootTree(tr2, 1))
ms609 commented 10 months ago

Sorry it's taken a while to get round to this. I think I have a fix in hand. Would you be able to test your trees against the patch? (Install with devtools::install_github("ms609/TreeDist", ref = "103-error-with-visualizematching"))