Comments (4)
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.
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.
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.
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)
- `as.MixedBase()` hangs (in `sort.multiPhylo()`)
- Tree balance index
- NexusTokens() shiny interaction
- `ClusterTable` memory requirements
- Quality of a dataset
- demo() HOT 1
- Unsupported NEXUS file HOT 1
- GH Actions templates
- Replace `.C` with `.Call`
- using WriteTNTcharacters() with continuous matrix HOT 5
- Custom directory for caching HOT 3
- Error: This many leaves cannot be supported HOT 13
- Will not install on Rstudio HOT 2
- DropTip will not remove tip on tree HOT 2
- Random Trees don't match balance HOT 1
- Simulation of Birth-Death trees
- str method for relevant classes HOT 1
- If tree has defined node.labels AddTips() will not change them HOT 2
- Remove `ape_node_depth`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from treetools.