Re: [R-sig-phylo] Extracting a clade for LTT

2017-05-08 Thread Liam J. Revell
Just to add to Joseph's totally correct comment, if your object is of 
class "multiPhylo" (that is, a list of trees) you can run:


outgroup<-c("outgroup_A","outgroup_B") ## change to your outgroup(s)
ingroup<-lapply(trees,drop.tip,tip=outgroup)
class(ingroup)<-"multiPhylo"

For some "multiPhylo" objects, for instance those read from a NEXUS 
file, you may also want to first run:


trees<-.uncompressTipLabel(trees)

All the best, Liam

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 5/8/2017 7:01 AM, Joseph W. Brown wrote:

Hi David.

Sounds like you want drop.tip from ape to get rid of the outgroup. You need 
only pass in the tree and the outgroup(s) name(s).

extract.clade will so something similar, but you need to calculate the mrca for 
each tree first to pass in the node id.

HHT.
JWB

Joseph W. Brown
Post-doctoral Researcher, Smith Laboratory
University of Michigan
Department of Ecology & Evolutionary Biology
Room 2071, Kraus Natural Sciences Building
Ann Arbor MI 48109-1079
josep...@umich.edu




On 8 May, 2017, at 07:31, David Buckley  wrote:

Probably a very easy question, but I could’t find a straightforward answer for 
it…
I have a posterior distribution of trees all rooted with a 
not-so-closely-related outgroup. I’d like to perform some diversification 
analyses (LTT, etc.) just for the ingroup, obviating the outgroup. Is there an 
easy way to extract the ingroup (or remove the outgroup) from all the trees 
before performing the analyses? I have tried to do it ‘manually’, deleting the 
outgroup taxa in Mesquite, but it looks to me that the LTT plots are still 
considering some branch lengths from the ingroup to the outgroup clade (kind of 
considering a stem-origin, not a crown-origin for the ingroup clade…).

Sorry if the question is too naïve…

best

david



David Buckley
Dpt. Biodiversity and Evolutionary Biology
Museo Nacional de Ciencias Naturales, MNCN-CSIC
c/José Gutiérrez Abascal 2
28006-Madrid
Spain
Phone: +34 91 411 13 28 ext. 1126
dbuck...@mncn.csic.es
https://www.researchgate.net/profile/David_Buckley4 

http://scholar.google.com/citations?user=qEFTmfkJ=en 














[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/



[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/



___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Re: [R-sig-phylo] Extracting a clade for LTT

2017-05-08 Thread Joseph W. Brown
Hi David.

Sounds like you want drop.tip from ape to get rid of the outgroup. You need 
only pass in the tree and the outgroup(s) name(s).

extract.clade will so something similar, but you need to calculate the mrca for 
each tree first to pass in the node id.

HHT.
JWB

Joseph W. Brown
Post-doctoral Researcher, Smith Laboratory
University of Michigan
Department of Ecology & Evolutionary Biology
Room 2071, Kraus Natural Sciences Building
Ann Arbor MI 48109-1079
josep...@umich.edu



> On 8 May, 2017, at 07:31, David Buckley  wrote:
> 
> Probably a very easy question, but I could’t find a straightforward answer 
> for it…
> I have a posterior distribution of trees all rooted with a 
> not-so-closely-related outgroup. I’d like to perform some diversification 
> analyses (LTT, etc.) just for the ingroup, obviating the outgroup. Is there 
> an easy way to extract the ingroup (or remove the outgroup) from all the 
> trees before performing the analyses? I have tried to do it ‘manually’, 
> deleting the outgroup taxa in Mesquite, but it looks to me that the LTT plots 
> are still considering some branch lengths from the ingroup to the outgroup 
> clade (kind of considering a stem-origin, not a crown-origin for the ingroup 
> clade…).
> 
> Sorry if the question is too naïve…
> 
> best
> 
> david
> 
> 
> 
> David Buckley
> Dpt. Biodiversity and Evolutionary Biology
> Museo Nacional de Ciencias Naturales, MNCN-CSIC
> c/José Gutiérrez Abascal 2
> 28006-Madrid
> Spain
> Phone: +34 91 411 13 28 ext. 1126
> dbuck...@mncn.csic.es
> https://www.researchgate.net/profile/David_Buckley4 
> 
> http://scholar.google.com/citations?user=qEFTmfkJ=en 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   [[alternative HTML version deleted]]
> 
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/