Git Product home page Git Product logo

Comments (4)

ms609 avatar ms609 commented on May 24, 2024

Hi, thanks for the query. From a first glance, my guess would be that the trees' tip labels are not labelled in the same sequence in all trees, and thus that your value of tips is a list (rather than a character vector).

trees <- RenumberTips(trees, TipLabels(trees[[1]]) would ensure that the tips are labelled in a consistent order in all trees. If this doesn't solve your issue, then sending your tree file (as an attachment here, or by e-mail) would help me to explore further.

Either way it looks like I could improve the documentation, or adapt the function to support a list format for tipLabels, so please let me know how you get on.

Thanks

Martin

from treetools.

jblandis avatar jblandis commented on May 24, 2024

Hi Martin,

Thank you so much for your fast response. I tried two things today, the first was your suggestion with the tip labels and the second was I first sorted each tree by tip, and then used that new tip label variable:

tips <- TipLabels(trees)
sorted <- SortTree(trees, how = "tip")
tips2 <- TipLabels(sorted)
possible <- as.TreeNumber(sorted, nTip=7, tipLabels=tips2)

Scanning thru the results it seems like your suggestion and this sorting method give the exact same score for all 299 trees. In most cases this is the same as my first attempt, but in many places they do differ.

While I was trying to figure this out, I did find some code on the phytools blog that finds unique topologies in a set of trees and gives them an arbitrary number. I'm looking to see if that also corresponds well to what I just recovered.

Thanks again for such a quick response.

from treetools.

ms609 avatar ms609 commented on May 24, 2024

Thanks for the update. To investigate this further, I think I'll need to see the trees themselves. If you can't post them here, please send to martin.smith at durham.ac. uk

from treetools.

ms609 avatar ms609 commented on May 24, 2024

I'm closing this issue for now as I can't reproduce the behaviour myself. If you're still seeing the issue, or if you are able to send me some sample trees, please do reopen the thread.

from treetools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.