emmanuelparadis / ape

analysis of phylogenetics and evolution

Home Page:http://ape-package.ird.fr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preserve Multiple Node Labels When Using drop.tip()

simone-says opened this issue · comments

commented

I can't seem to find a way to keep multiple node labels. Is there a way to change my Newick file so it preserves multiple labels or is there a different way to prune my tree? This is a time tree from treePL with branch lengths and divergence time estimates.
It stores BLs as node.label attribute and divergence times as edge.length

E.g.,

((((Alligator_mississippiensis:247.000000,Gallus_gallus:247.000000)0.0:13.208018,Chrysemys_picta:260.208018)0.5652703018918337:9.634239,(Sphenodon_punctatus:238.000000,(Dibamus_bouretti:210.000000,((Correlophus_ciliatus:167.025468,(Eublepharis_macularius:126.990743,((Paroedura_picta:55.482422,(Gekko_japonicus:27.715439,Gekko_badenii:27.715439)1.1642182432072183:27.766983)0.9477173979815781:38.433578,(Gonatodes_ferrugineus:61.425966,(Sphaerodactylus_notatus:36.664874,(Sphaerodactylus_nicholsi:17.904572,Sphaerodactylus_townsendi:17.904572)

Can you give an example of what ape does, and explain what you expect instead?

commented

I got it working! I think the tree file I was reading in had two nodes with 3 labels and the rest had 2, probably some formatting error from a different program. Fixed that and it works as expected, thank you!