[R-sig-phylo] bug in read.nexus -- ape 2.7

2011-03-17 Thread Emmanuel Paradis

Dear all,

ape 2.7 has been on CRAN since yesterday. A bug has been introduced in 
read.nexus. You can find how to fix it on ape's web site:


http://ape.mpl.ird.fr/

You don't need this fix if you don't use read.nexus, or if you have not 
updated to ape 2.7 and can wait until version 2.7-1 (around next week).


Best,

Emmanuel
--
Emmanuel Paradis
IRD, Jakarta, Indonesia
http://ape.mpl.ird.fr/

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


Re: [R-sig-phylo] Help Interpreting Phylogenetic ANOVA Results

2011-03-17 Thread tgarland
Dear Daniel,

OK, then I think your results make sense.  You have, in fact, designed 
a comparative study in which the power to detect a statistical effect of 
Habitat (i.e., a group difference) will be higher if analyzed phylogenetically 
than if analyzed in the conventional fashion assuming a stat phylogeny.  This 
point has been made in various places, including:

Garland, T., Jr., A. W. Dickerman, C. M. Janis, and J. A. Jones. 1993. 
Phylogenetic analysis of covariance by computer simulation. Systematic Biology 
42:265-292.
Vanhooydonck, B., and R. Van Damme. 1999. Evolutionary relationships between 
body shape and habitat use in lacertid lizards. Evolutionary Ecology Research 
1:785-805.
Garland, T., Jr. 2001. Phylogenetic comparison and artificial selection: two 
approaches in evolutionary physiology. Pages 107-132 in R. C. Roach, P. D. 
Wagner, and P. H. Hackett, eds. Hypoxia: From Genes to the Bedside. Advances in 
Experimental Biology and Medicine, volume 502. Kluwer Academic/Plenum 
Publishers, New York.
 
In addition, you have made the within-species (and hence between 
habitat) branch lengths arbitrarily very short relative to the among-species 
branches in the rest f your tree.  Hence, if you do have a Habitat effect, it 
would be very unlikely to have occurred via Brownian motion character 
evolution.  So, you phylogenetic P values becomes (much) lower than your 
non-phylogenetic P value.

As a reality check, I would run your analyses on a star phylogeny (a 
giant hard polytomy) and see if you get P values that are the same (actually, 
just very close to unless you do a lot of simulations) as for a nonphylogenetic 
analysis.

Cheers,
Ted

   

Theodore Garland, Jr.
Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Wet Lab Phone:  (951) 827-5724
Dry Lab Phone:  (951) 827-4026
Home Phone:  (951) 328-0820
Facsimile:  (951) 827-4286 = Dept. office (not confidential)
Email:  tgarl...@ucr.edu

Main Departmental page:
http://www.biology.ucr.edu/people/faculty/Garland.html

List of all Publications:
http://www.biology.ucr.edu/people/faculty/Garland/GarlandPublications.html

Garland and Rose, 2009
http://www.ucpress.edu/books/pages/10604.php


   Original message 

Date: Wed, 16 Mar 2011 15:38:54 -0500
From: dwe...@life.illinois.edu
Subject: Re: [R-sig-phylo] Help Interpreting Phylogenetic ANOVA
Results
To: tgarl...@ucr.edu
Cc: r-sig-phylo@r-project.org

>Hi Liam and Ted,
> My apologies for not writing sooner. I've been sick.
> First off, let me thank you both for helping to clarify what the
>phylogenetic ANOVA is and what it means.
> I thought I would explain a little more than I did in my initial
post
>since Ted seemed curious to know more.
> I am using geometric morphometrics to analyze body shape in a
family of
>freshwater fish (topminnows). I ran a PCA to "condense" the
>morphometric analyses into PC scores. I'm using the PC scores in
the
>phylogenetic ANOVA. Because I would like to know how phylogeny
>"effects" habitat-specific differences in body shape, I run the
>phylogenetic ANOVAs with the tips being a species-habitat
combination.
>Essentially, it looks like this:
>
> | Species A Habitat 1
> |
> |--|
> | |
>---| | Species A Habitat 2
> |
> |
> |
> | | Species B Habitat 1
> | |
> |-|
> |
> | Species B Habitat 2
>
> The tree for these species was made in Mesquite and based off of a
tree
>from a recent molecular phylogeny that came out (Whitehead 2010
>Evolution paper). The tree for the phylogenetic ANOVA includes
branch
>lengths, obviously. Because I don't know if there is any genetic
>distance between the same species from the two different habitats,
I set
>the branch lengths to a really small value (0.1) in R.
> All of the 21 species used to run the phylogenetic ANOVA have
>populations in both habitats, so in that sense it's "balanced".
Where
>the species fall on the tree is pretty scattered, throughout the
tree
>(the tree contains about 20 more species that I did not include in
this
>analysis, so I don't know if that matters). Just visually glancing
at
>it, there are two main clades in the tree and 14 come from one
clade and
>7 come from the other clade, so, if anything, I would think they'd
be
>more "clumped" than overdispersed. However, I could be wrong.
> I would be happy to share the real tree and my data with anyone
who is
>interested.
>
>
>
>
>
>-Daniel
>
>
>
>> Exactly as Liam wrote, except that it is usually uncommon to find
real
>> data that are "overdispersed phylogenetically," so normally one
finds that
>> the P values when done phylogenetically ar

Re: [R-sig-phylo] understanding lambda for single trait y versus gls(y~x)

2011-03-17 Thread Alejandro Gonzalez
Hi Andrew,

The lambda value estimated for your dependent variable and the lambda value you 
get from the gls analyses differ because the second is the lambda of the 
residuals of your model. The lambda value of the model (which is estimated when 
you fit the gls) is a measure of the covariance in the residuals that results 
from the shared ancestry of the taxa as described by your phylogeny. Liam 
Revell has a very nice article about this in Methods in Ecology and Evolution. 

Cheers

Alejandro

 
On 17, Mar 2011, at 8:51 PM, Andrew Barr wrote:

> Hi all,
> 
> My understanding of lambda is that it is a scalar multiplier for the
> off-diagonal elements of the variance covariance matrix computed from
> your tree.  When lambda = 1, then the trait is evolving according to
> Brownian motion, when lambda = 0 there is no phylogenetic signal in
> the data.
> 
> When I do a PGLS using packages ape and nlme I get a single estimate
> of lambda for the following model.
> 
> myCor<-corPagel(value=1,phy=myTree,fixed=F)
> gls(y~x, data=myDF, corr=myCor).
> 
> I thought this single lambda value represented the estimate of lambda
> for variable y on myTree, but it is a different value than what I get
> when I use estimate lambda for variable y using package geiger
> 
> fitDiscrete(phy=myTree,data=myDF$y,treeTransform="lambda").
> 
> Using figDiscrete I get a value very close to zero, whereas the lambda
> estimated from the gls is around .65 and is significantly different
> from zero.
> 
> Have I made an error, or do I not understand how lambda is being calculated?
> 
> Thanks!
> 
> Andrew Barr
> PhD Student
> Dept. of Anthropology
> University of Texas Austin
> 
> ___
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

__

Alejandro Gonzalez Voyer

Post-doc

NEW ADDRESS

Estación Biológica de Doñana
Consejo Superior de Investigaciones Científicas (CSIC)
Av Américo Vespucio s/n
41092 Sevilla
Spain

Tel: + 34 - 954 466700, ext 1749

E-mail: alejandro.gonza...@ebd.csic.es

Web page: https://docs.google.com/View?id=dfs328dh_14gwwqsxcg




[[alternative HTML version deleted]]

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


[R-sig-phylo] understanding lambda for single trait y versus gls(y~x)

2011-03-17 Thread Andrew Barr
Hi all,

My understanding of lambda is that it is a scalar multiplier for the
off-diagonal elements of the variance covariance matrix computed from
your tree.  When lambda = 1, then the trait is evolving according to
Brownian motion, when lambda = 0 there is no phylogenetic signal in
the data.

When I do a PGLS using packages ape and nlme I get a single estimate
of lambda for the following model.

myCor<-corPagel(value=1,phy=myTree,fixed=F)
gls(y~x, data=myDF, corr=myCor).

I thought this single lambda value represented the estimate of lambda
for variable y on myTree, but it is a different value than what I get
when I use estimate lambda for variable y using package geiger

fitDiscrete(phy=myTree,data=myDF$y,treeTransform="lambda").

Using figDiscrete I get a value very close to zero, whereas the lambda
estimated from the gls is around .65 and is significantly different
from zero.

Have I made an error, or do I not understand how lambda is being calculated?

Thanks!

Andrew Barr
PhD Student
Dept. of Anthropology
University of Texas Austin

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


Re: [R-sig-phylo] mntd and mpd without community data

2011-03-17 Thread Scott Chamberlain
Thanks much Dan and Steve. 

Scott
On Thursday, March 17, 2011 at 11:05 AM, Dan Rabosky wrote: 
> 
> Hi Scott-
> 
> There are lots of indices to quantify tree shape differences, both in terms 
> of topology (Colless etc) and temporal differences (e.g., Pybus and Harvey's 
> gamma). MNTD and MPD will largely capture the temporal dimension of your 
> trees and will be highly correlated with gamma. For example, if you have long 
> terminal branches in your tree and with very short internal branches, gamma 
> will be negative and both MPD and MNTD will be large. 
> 
> I don't think there is a right or wrong answer here and any index might be 
> appropriate, but you will have to think hard about what exactly you want to 
> quantify (e.g, topological imbalance or asymmetry versus branching time 
> differences) and why. It might be good to think about standardized metrics, 
> to control for differences in the number of taxa in trees. You may want to 
> use several indices in concert.
> 
> ~Dan Rabosky
> On Mar 17, 2011, at 8:45 AM, Scott Chamberlain wrote:
> > Hello, 
> > 
> > 
> > I am curious if it is appropriate to calculate mntd (mean nearest taxon 
> > distance) and mpd (mean pairwise distance) in the picante package on trees 
> > themselves, that is, without community data. 
> > 
> > We are trying to think of informative metrics that can tell us something 
> > about tree shape among lots of different trees. Using mntd and mpd we give 
> > the functions a tree and just a vector of all 1's for the community data so 
> > that each species is equally abundant. 
> > 
> > Does this approach make sense? Are there better metrics to use given that 
> > we are just dealing with trees without community data? 
> > 
> > (I am aware of Sackin's, Colless', beta splitting, gamma, etc.)
> > 
> > 
> > 
> > Here is a reproducible example of what I am doing:
> > require(picante)
> > require(ape)
> > 
> > tree <- rcoal(10)
> > abund <- rep(1, 10)
> > names(abund) <- tree$tip.label
> > mpd_ <- mpd(rbind(abund, abund), # can't have just one vector/community 
> > apparently
> > cophenetic(tree))[1] # just one of the two numbers needed as they are the 
> > same
> > 
> > 
> > 
> > Sincerely, 
> > Scott Chamberlain
> > Rice University, EEB Dept.
> > 
> > 
> > 
> > [[alternative HTML version deleted]]
> > 
> > ___
> > R-sig-phylo mailing list
> > R-sig-phylo@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> 
> 
> 
> 
> 
> 

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


Re: [R-sig-phylo] reverse order plotting of newick tree/phylo object

2011-03-17 Thread Liam J. Revell
Dan is right on - and I also suspect that the issue of the non-rotating 
node is probably due to a polytomy at that node.


Thanks for the insight Dan.

- Liam

--
Liam J. Revell
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://phytools.blogspot.com

On 3/17/2011 12:26 PM, Dan Rabosky wrote:



But can you explain to me what is the rationale behind this? There are
only 47 nodes and 54 tips. How can the nodes from 55 to 47 than be
rotated?



Liam's code is rotating nodes 55+(1:47), rather than 55 to 47. The internal node indexing 
in ape's phylo class starts with "number of tips plus 1". Thus, using rotate on 
nodes starting with length(phy$tip.label) + 1 means it is starting with node 56 (the root 
node) and going through length(phy$tip.label) + phy$Nnode, e.g.,, all internal nodes. You 
can see that

55+(1:47)

gives a vector of node numbers that is not the same as 55 to 47.

If it isn't working right - maybe it is that you have polytomies? I think you 
should have n-1 internal nodes (53 in your case). Try multi2di (from ape) for 
polytomy resolution and see if it works as desired.

~Dan Rabosky





Kind regards,

Thierry

Thierry Janssens
Postdoctoral researcher
Delft University of Technology
Bionanoscience
Kavli Institute of Nanoscience
Lorentzweg 1
2628LJ Delft
the Netherlands
Tel: +31 15 2781175
Fax:+31 15 2781202
e-mail: t.k.s.janss...@tudelft.nl

-Original Message-
From: Liam J. Revell [mailto:liam.rev...@umb.edu]
Sent: donderdag 17 maart 2011 16:11
To: Thierry Janssens - TNW
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] reverse order plotting of newick tree/phylo
object

Hi Thierry,

There might be a more elegant way to do this, but you can just apply the
"ape" function rotate() to each node number of the tree (excluding
tips).

I.e.


tr2<-tree
for(i in length(tr2$tip)+1:tr2$Nnode) tr2<-rotate(tr2,i)>  plot(tr2)


[rotate() may also be able to take a vector of nodes, but I was not able
to get this to work.]

- Liam

--
Liam J. Revell
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://phytools.blogspot.com

On 3/17/2011 10:51 AM, Thierry Janssens - TNW wrote:

Dear R-sig-phylo,



I am looking for a method to plot an unrooted tre/phylo object e in
the reverse order (of the tip labels). Like all the nodes would have
rotated.



Any of you has an idea?



Kind regards,



Thierry



Thierry Janssens

Postdoctoral researcher

Delft University of Technology

Bionanoscience

Kavli Institute of Nanoscience

Lorentzweg 1

2628LJ Delft

the Netherlands

Tel: +31 15 2781175

Fax:+31 15 2781202

e-mail: t.k.s.janss...@tudelft.nl




[[alternative HTML version deleted]]

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo







[[alternative HTML version deleted]]

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


Re: [R-sig-phylo] reverse order plotting of newick tree/phylo object

2011-03-17 Thread Dan Rabosky

> But can you explain to me what is the rationale behind this? There are
> only 47 nodes and 54 tips. How can the nodes from 55 to 47 than be
> rotated?


Liam's code is rotating nodes 55+(1:47), rather than 55 to 47. The internal 
node indexing in ape's phylo class starts with "number of tips plus 1". Thus, 
using rotate on nodes starting with length(phy$tip.label) + 1 means it is 
starting with node 56 (the root node) and going through length(phy$tip.label) + 
phy$Nnode, e.g.,, all internal nodes. You can see that

55+(1:47)

gives a vector of node numbers that is not the same as 55 to 47.

If it isn't working right - maybe it is that you have polytomies? I think you 
should have n-1 internal nodes (53 in your case). Try multi2di (from ape) for 
polytomy resolution and see if it works as desired.

~Dan Rabosky



> 
> Kind regards,
> 
> Thierry
> 
> Thierry Janssens
> Postdoctoral researcher
> Delft University of Technology
> Bionanoscience
> Kavli Institute of Nanoscience
> Lorentzweg 1
> 2628LJ Delft
> the Netherlands
> Tel: +31 15 2781175
> Fax:+31 15 2781202
> e-mail: t.k.s.janss...@tudelft.nl
> 
> -Original Message-
> From: Liam J. Revell [mailto:liam.rev...@umb.edu] 
> Sent: donderdag 17 maart 2011 16:11
> To: Thierry Janssens - TNW
> Cc: r-sig-phylo@r-project.org
> Subject: Re: [R-sig-phylo] reverse order plotting of newick tree/phylo
> object
> 
> Hi Thierry,
> 
> There might be a more elegant way to do this, but you can just apply the
> "ape" function rotate() to each node number of the tree (excluding
> tips).
> 
> I.e.
> 
>> tr2<-tree
>> for(i in length(tr2$tip)+1:tr2$Nnode) tr2<-rotate(tr2,i)  > plot(tr2)
> 
> [rotate() may also be able to take a vector of nodes, but I was not able
> to get this to work.]
> 
> - Liam
> 
> --
> Liam J. Revell
> University of Massachusetts Boston
> web: http://faculty.umb.edu/liam.revell/
> email: liam.rev...@umb.edu
> blog: http://phytools.blogspot.com
> 
> On 3/17/2011 10:51 AM, Thierry Janssens - TNW wrote:
>> Dear R-sig-phylo,
>> 
>> 
>> 
>> I am looking for a method to plot an unrooted tre/phylo object e in 
>> the reverse order (of the tip labels). Like all the nodes would have 
>> rotated.
>> 
>> 
>> 
>> Any of you has an idea?
>> 
>> 
>> 
>> Kind regards,
>> 
>> 
>> 
>> Thierry
>> 
>> 
>> 
>> Thierry Janssens
>> 
>> Postdoctoral researcher
>> 
>> Delft University of Technology
>> 
>> Bionanoscience
>> 
>> Kavli Institute of Nanoscience
>> 
>> Lorentzweg 1
>> 
>> 2628LJ Delft
>> 
>> the Netherlands
>> 
>> Tel: +31 15 2781175
>> 
>> Fax:+31 15 2781202
>> 
>> e-mail: t.k.s.janss...@tudelft.nl
>> 
>> 
>> 
>> 
>>  [[alternative HTML version deleted]]
>> 
>> ___
>> R-sig-phylo mailing list
>> R-sig-phylo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> 
> ___
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo






[[alternative HTML version deleted]]

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


Re: [R-sig-phylo] reverse order plotting of newick tree/phylo object

2011-03-17 Thread Thierry Janssens - TNW
Hi Liam,

Thanks for the  help. It works partially, one clade remains at the
bottom of the plot, but since it is an unrooted tree there is no node to
rotate anymore.
But can you explain to me what is the rationale behind this? There are
only 47 nodes and 54 tips. How can the nodes from 55 to 47 than be
rotated?

Kind regards,

Thierry

Thierry Janssens
Postdoctoral researcher
Delft University of Technology
Bionanoscience
Kavli Institute of Nanoscience
Lorentzweg 1
2628LJ Delft
the Netherlands
Tel: +31 15 2781175
Fax:+31 15 2781202
e-mail: t.k.s.janss...@tudelft.nl

-Original Message-
From: Liam J. Revell [mailto:liam.rev...@umb.edu] 
Sent: donderdag 17 maart 2011 16:11
To: Thierry Janssens - TNW
Cc: r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] reverse order plotting of newick tree/phylo
object

Hi Thierry,

There might be a more elegant way to do this, but you can just apply the
"ape" function rotate() to each node number of the tree (excluding
tips).

I.e.

 > tr2<-tree
 > for(i in length(tr2$tip)+1:tr2$Nnode) tr2<-rotate(tr2,i)  > plot(tr2)

[rotate() may also be able to take a vector of nodes, but I was not able
to get this to work.]

- Liam

--
Liam J. Revell
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://phytools.blogspot.com

On 3/17/2011 10:51 AM, Thierry Janssens - TNW wrote:
> Dear R-sig-phylo,
>
>
>
> I am looking for a method to plot an unrooted tre/phylo object e in 
> the reverse order (of the tip labels). Like all the nodes would have 
> rotated.
>
>
>
> Any of you has an idea?
>
>
>
> Kind regards,
>
>
>
> Thierry
>
>
>
> Thierry Janssens
>
> Postdoctoral researcher
>
> Delft University of Technology
>
> Bionanoscience
>
> Kavli Institute of Nanoscience
>
> Lorentzweg 1
>
> 2628LJ Delft
>
> the Netherlands
>
> Tel: +31 15 2781175
>
> Fax:+31 15 2781202
>
> e-mail: t.k.s.janss...@tudelft.nl
>
>
>
>
>   [[alternative HTML version deleted]]
>
> ___
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


Re: [R-sig-phylo] mntd and mpd without community data

2011-03-17 Thread Dan Rabosky

Hi Scott-

There are lots of indices to quantify tree shape differences, both in terms of 
topology (Colless etc) and temporal differences (e.g., Pybus and Harvey's 
gamma). MNTD and MPD will largely capture the temporal dimension of your trees 
and will be highly correlated with gamma. For example, if you have long 
terminal branches in your tree and with very short internal branches, gamma 
will be negative and both MPD and MNTD will be large. 

I don't think there is a right or wrong answer here and any index might be 
appropriate, but you will have to think hard about what exactly you want to 
quantify (e.g, topological imbalance or asymmetry versus branching time 
differences) and why. It might be good to think about standardized metrics, to 
control for differences in the number of taxa in trees. You may want to use 
several indices in concert.

~Dan Rabosky

On Mar 17, 2011, at 8:45 AM, Scott Chamberlain wrote:

> Hello, 
> 
> 
> I am curious if it is appropriate to calculate mntd (mean nearest taxon 
> distance) and mpd (mean pairwise distance) in the picante package on trees 
> themselves, that is, without community data. 
> 
> We are trying to think of informative metrics that can tell us something 
> about tree shape among lots of different trees. Using mntd and mpd we give 
> the functions a tree and just a vector of all 1's for the community data so 
> that each species is equally abundant. 
> 
> Does this approach make sense? Are there better metrics to use given that we 
> are just dealing with trees without community data? 
> 
> (I am aware of Sackin's, Colless', beta splitting, gamma, etc.)
> 
> 
> 
> Here is a reproducible example of what I am doing:
> require(picante)
> require(ape)
> 
> tree <- rcoal(10)
> abund <- rep(1, 10)
> names(abund) <- tree$tip.label
> mpd_ <- mpd(rbind(abund, abund), # can't have just one vector/community 
> apparently
> cophenetic(tree))[1] # just one of the two numbers needed as they are the same
> 
> 
> 
> Sincerely, 
> Scott Chamberlain
> Rice University, EEB Dept.
> 
> 
> 
>   [[alternative HTML version deleted]]
> 
> ___
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

 





[[alternative HTML version deleted]]

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


Re: [R-sig-phylo] mntd and mpd without community data

2011-03-17 Thread Steven Kembel
Hi Scott,
I don't think MPD and MNTD are appropriate measures of tree shape, since 
factors other than tree shape including the number of tips on the tree and the 
branch length distribution influence those statistics. I would recommend one of 
the metrics of tree shape that you mentioned, most of which are implemented in 
the apTreeshape package.
Best regards,
Steve
On Mar 17, 2011, at 8:45 AM, Scott Chamberlain wrote:

> Hello, 
> 
> 
> I am curious if it is appropriate to calculate mntd (mean nearest taxon 
> distance) and mpd (mean pairwise distance) in the picante package on trees 
> themselves, that is, without community data. 
> 
> We are trying to think of informative metrics that can tell us something 
> about tree shape among lots of different trees. Using mntd and mpd we give 
> the functions a tree and just a vector of all 1's for the community data so 
> that each species is equally abundant. 
> 
> Does this approach make sense? Are there better metrics to use given that we 
> are just dealing with trees without community data? 
> 
> (I am aware of Sackin's, Colless', beta splitting, gamma, etc.)
> 
> 
> 
> Here is a reproducible example of what I am doing:
> require(picante)
> require(ape)
> 
> tree <- rcoal(10)
> abund <- rep(1, 10)
> names(abund) <- tree$tip.label
> mpd_ <- mpd(rbind(abund, abund), # can't have just one vector/community 
> apparently
> cophenetic(tree))[1] # just one of the two numbers needed as they are the same
> 
> 
> 
> Sincerely, 
> Scott Chamberlain
> Rice University, EEB Dept.
> 
> 
> 
>   [[alternative HTML version deleted]]
> 
> ___
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


[R-sig-phylo] mntd and mpd without community data

2011-03-17 Thread Scott Chamberlain
Hello, 


I am curious if it is appropriate to calculate mntd (mean nearest taxon 
distance) and mpd (mean pairwise distance) in the picante package on trees 
themselves, that is, without community data. 

We are trying to think of informative metrics that can tell us something about 
tree shape among lots of different trees. Using mntd and mpd we give the 
functions a tree and just a vector of all 1's for the community data so that 
each species is equally abundant. 

Does this approach make sense? Are there better metrics to use given that we 
are just dealing with trees without community data? 

(I am aware of Sackin's, Colless', beta splitting, gamma, etc.)



Here is a reproducible example of what I am doing:
require(picante)
require(ape)

tree <- rcoal(10)
abund <- rep(1, 10)
names(abund) <- tree$tip.label
mpd_ <- mpd(rbind(abund, abund), # can't have just one vector/community 
apparently
cophenetic(tree))[1] # just one of the two numbers needed as they are the same



Sincerely, 
Scott Chamberlain
Rice University, EEB Dept.



[[alternative HTML version deleted]]

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


Re: [R-sig-phylo] reverse order plotting of newick tree/phylo object

2011-03-17 Thread Liam J. Revell

Hi Thierry,

There might be a more elegant way to do this, but you can just apply the 
"ape" function rotate() to each node number of the tree (excluding tips).


I.e.

> tr2<-tree
> for(i in length(tr2$tip)+1:tr2$Nnode) tr2<-rotate(tr2,i)
> plot(tr2)

[rotate() may also be able to take a vector of nodes, but I was not able 
to get this to work.]


- Liam

--
Liam J. Revell
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://phytools.blogspot.com

On 3/17/2011 10:51 AM, Thierry Janssens - TNW wrote:

Dear R-sig-phylo,



I am looking for a method to plot an unrooted tre/phylo object e in the
reverse order (of the tip labels). Like all the nodes would have
rotated.



Any of you has an idea?



Kind regards,



Thierry



Thierry Janssens

Postdoctoral researcher

Delft University of Technology

Bionanoscience

Kavli Institute of Nanoscience

Lorentzweg 1

2628LJ Delft

the Netherlands

Tel: +31 15 2781175

Fax:+31 15 2781202

e-mail: t.k.s.janss...@tudelft.nl




[[alternative HTML version deleted]]

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


[R-sig-phylo] reverse order plotting of newick tree/phylo object

2011-03-17 Thread Thierry Janssens - TNW
Dear R-sig-phylo,

 

I am looking for a method to plot an unrooted tre/phylo object e in the
reverse order (of the tip labels). Like all the nodes would have
rotated.

 

Any of you has an idea?

 

Kind regards,

 

Thierry

 

Thierry Janssens

Postdoctoral researcher

Delft University of Technology

Bionanoscience

Kavli Institute of Nanoscience

Lorentzweg 1

2628LJ Delft

the Netherlands

Tel: +31 15 2781175

Fax:+31 15 2781202

e-mail: t.k.s.janss...@tudelft.nl  

 


[[alternative HTML version deleted]]

___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo