Re: [R-sig-phylo] extracting sister taxon pairs from phylo object in APE R package

2020-01-10 Thread Max Shpak
Thank you all for your replies. I will give these a try. Best Regards, Max On Fri, Jan 10, 2020 at 1:59 AM Klaus Schliep wrote: > > Hi Max, > there is also a function called Siblings in phangorn: > library(phangorn) > tree <- rcoal(10) > Siblings(tree, 1:10, include.self=TRUE) # Siblings for all

Re: [R-sig-phylo] extracting sister taxon pairs from phylo object in APE R package

2020-01-10 Thread Klaus Schliep
Hi Max, there is also a function called Siblings in phangorn: library(phangorn) tree <- rcoal(10) Siblings(tree, 1:10, include.self=TRUE) # Siblings for all the tips Siblings(tree, include.self=TRUE) # all pairs Regards, Klaus On Fri, Jan 10, 2020 at 3:27 AM Liam Revell wrote: > Peter's functio

Re: [R-sig-phylo] extracting sister taxon pairs from phylo object in APE R package

2020-01-09 Thread Liam Revell
Peter's function works but it only returns sister pairs in which both of the sisters are tips. Here's another alternative that uses phangorn & gives you a list of all the sister pairs in which at least one of the sisters is a tip (and it also works for terminal multifurcations). parents<-uniqu

Re: [R-sig-phylo] extracting sister taxon pairs from phylo object in APE R package

2020-01-09 Thread Peter Cowman
HI Max, Not entirely sure if this is what you want but i did come across a script to extract direct sister pairs (tips) in a tree >From the dryad supplement of Grossenbacher D, Briscoe Runquist R, Goldberg >EE, Brandvain Y (2015) Geographic range size is predicted by plant mating >system. Eco

[R-sig-phylo] extracting sister taxon pairs from phylo object in APE R package

2020-01-09 Thread Max Shpak
If I have an object of class "phylo" in the ape, with attributes edge, Nnode, node.label, and tip.label, is there some straightforward way for me to extract a list of sister taxon pairs (whether the sister taxa are two edges or an edge and a node)? I wrote to E. Paradis (the author of ape), and he