Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trivial cases with big trees run very slowly #22

Open
wcornwell opened this issue Oct 1, 2015 · 6 comments
Open

trivial cases with big trees run very slowly #22

wcornwell opened this issue Oct 1, 2015 · 6 comments

Comments

@wcornwell
Copy link
Collaborator

sp <- c("Pinus_nigra", "Quercus_agrifolia", "Poa_annua","Vanilla_planiflolia", "Aa_fiebrigii")
tre <- read.tree("PhylogeneticResources//Vascular_Plants_rooted.dated.tre")
angio_spp <- unique(c(tre$tip.label, sp))
angio_tax <- lookup_table(angio_spp, by_species=TRUE)
angio_tax <- angio_tax[,c("genus", "family", "order")]
angio_phyndr <- phyndr_taxonomy(tre, sp, angio_tax)

Seems like might be a way to limit the scope of the tree traversal to speed things up?

@wcornwell
Copy link
Collaborator Author

If there are species in the tree that are in orders that have no data, can't we just drop all those tips at the beginning?

@mwpennell
Copy link
Collaborator

this is an interesting problem. while i certainly see your point and your suggestion of dropping tips early in the tree would work well here, i am not sure there is a general heuristic that would allow us to make this call without going through the algorithm. (indeed, if this was the case, then it would suggest that we reconsider the phyndr algorithms from scratch...).

could be wrong tho

@wcornwell
Copy link
Collaborator Author

What about we find the MRCA of the orders (or whatever the highest level is in the taxonomy) and then drop the unmatched tips that are not in that subtree?

@mwpennell
Copy link
Collaborator

this is a pretty good idea. we should do this. (though of course it only works for the taxonomy case; in the topology case, the deepest possible swap is a node up from the root)

@wcornwell
Copy link
Collaborator Author

ping @richfitz ?

@richfitz
Copy link
Member

richfitz commented Oct 8, 2015

I'll look at this next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants