[R-sig-phylo] problem dropping extinct taxa from large tree

2014-09-30 Thread Gabriel Yedid
Hello all,

I am trying to drop extinct taxa from a large phylogeny generated with
a non-R-based tree simulation program.  The tree was saved in a Nexus
file which was read in with read.nexus.  It's quite large--10911
leaves, but only 2055 are alive i.e. lineages that survived to the
end of the simulation.  It's these lineages I want to keep around for
further analysis.

I've tried both the drop.fossil (from APE) and drop.extinct(from
geiger) functions, but both of them give problems.  If I use the
customary low tolerance for either of these functions, drop.fossil
produces the following error:

 INTREE_EXTANT = drop.fossil(INTREE, tol=1e-6)
Error in xmat[, 1] : incorrect number of dimensions

Lowering the tolerance value to 1e-4 trims off some of the living tips
I wanted kept (the resulting tree is smaller than it's supposed to
be).

drop.extinct just seems to hang and doesn't return even after about 10
minutes, no matter what tolerance value I supply.

Is there some other way I can remove extinct lineages from a large
tree like this?

cheers,

Gabe

___
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] problem dropping extinct taxa from large tree

2014-09-30 Thread Liam J. Revell

Hi Gabriel.

You could try the following, which worked for me with a simulated tree 
containing 9898 tips, 7898 of which were extinct:


library(phytools)
obj-drop.tip(tree,getExtinct(tree))
obj

All the best, Liam

Liam J. Revell, Assistant 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 9/30/2014 6:44 AM, Gabriel Yedid wrote:

Hello all,

I am trying to drop extinct taxa from a large phylogeny generated with
a non-R-based tree simulation program.  The tree was saved in a Nexus
file which was read in with read.nexus.  It's quite large--10911
leaves, but only 2055 are alive i.e. lineages that survived to the
end of the simulation.  It's these lineages I want to keep around for
further analysis.

I've tried both the drop.fossil (from APE) and drop.extinct(from
geiger) functions, but both of them give problems.  If I use the
customary low tolerance for either of these functions, drop.fossil
produces the following error:


INTREE_EXTANT = drop.fossil(INTREE, tol=1e-6)

Error in xmat[, 1] : incorrect number of dimensions

Lowering the tolerance value to 1e-4 trims off some of the living tips
I wanted kept (the resulting tree is smaller than it's supposed to
be).

drop.extinct just seems to hang and doesn't return even after about 10
minutes, no matter what tolerance value I supply.

Is there some other way I can remove extinct lineages from a large
tree like this?

cheers,

Gabe

___
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/