Re: [R-sig-phylo] Comparing support values on different trees

2016-12-16 Thread Emmanuel Paradis

Hi Frank,

It seems that you can use the (apparently not used a lot) option from 
makeNodeLabel(, method = "md5sum") which creates node labels with the 
MD5SUM algorithm using the tip labels descending from each node 
(considering the tree as rooted). The result is, for each node, a label 
that is unique for a given set of tip labels (even among different trees).


Taking your 1st tree:

R> tr <- read.tree(text = "(A:0.1, (B:0.2, (C:0.3, D:0.4)100:0.5)95:0.55);")
R> BP <- tr$node.label
R> trbis <- makeNodeLabel(tr, "md5sum")
R> names(BP) <- trbis$node.label

BP is a vector which you can index with labels built in the same way 
from another tree.


Cheers,

Emmanuel

PS: if the labelled topologies are identical for all trees as in your 
example below, then the node labels will be ordered in the same way in 
all trees and the above procedure is not needed.


Le 16/12/2016 à 17:57, Frank T Burbrink a écrit :

Hi Everyone,

Thank you Jacob, Keith and Emmanuel for your responses. What I am trying to do 
is a little different than what the solutions posted here would do. I am not 
important a distribution of trees, but rather a single tree with the support 
values already included. So imagine something like comparing support for three 
trees (the first two are bootstraps is from bootstraps, the third is Pp):

  1.  (A:0.1, (B:0.2, (C:0.3, D:0.4)100:0.5)95:0.55);
  2.  (A:0.1, (B:0.2, (C:0.3, D:0.4)60:0.5)20:0.55);
  3.  (A:0.1, (B:0.2, (C:0.3, D:0.4)1:0.5)0.8:0.55);

This would show that support for clade BCD would be 95, 20, 0.8 in each of the 
three trees and support for CD would 100, 60 and 1.0 respectively.

Is there a method that could read the trees with support, find the shared 
clades, and generate a table by node for all three support values?


Thanks!

Frank

Frank T. Burbrink, Ph.D.
Associate Curator
Department of Herpetology
American Museum of Natural History
Central Park West at 79th Street
New York, NY 10024-5192

fburbr...@amnh.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] Comparing support values on different trees

2016-12-16 Thread Frank T Burbrink
Hi Everyone,

Thank you Jacob, Keith and Emmanuel for your responses. What I am trying to do 
is a little different than what the solutions posted here would do. I am not 
important a distribution of trees, but rather a single tree with the support 
values already included. So imagine something like comparing support for three 
trees (the first two are bootstraps is from bootstraps, the third is Pp):

  1.  (A:0.1, (B:0.2, (C:0.3, D:0.4)100:0.5)95:0.55);
  2.  (A:0.1, (B:0.2, (C:0.3, D:0.4)60:0.5)20:0.55);
  3.  (A:0.1, (B:0.2, (C:0.3, D:0.4)1:0.5)0.8:0.55);

This would show that support for clade BCD would be 95, 20, 0.8 in each of the 
three trees and support for CD would 100, 60 and 1.0 respectively.

Is there a method that could read the trees with support, find the shared 
clades, and generate a table by node for all three support values?


Thanks!

Frank

Frank T. Burbrink, Ph.D.
Associate Curator
Department of Herpetology
American Museum of Natural History
Central Park West at 79th Street
New York, NY 10024-5192

fburbr...@amnh.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/


Re: [R-sig-phylo] Comparing support values on different trees

2016-12-14 Thread Emmanuel Paradis

Hi Jake,

What you describe looks very musch like the Lento method implemented in 
the function lento() in phangorn. consensusNet(), also in phangorn, 
implements something similar: the consensus network.


prop.part(), in ape, is the function behind the two previous ones. 
bitsplits() is more efficient with a different output format. There are 
functions as.prop.part() and as.bitsplits() to convert among these classes.


Best,

Emmanuel

Le 14/12/2016 à 19:01, Jacob Berv a écrit :

To clarify - the idea here is that you are asking which clades appear in 
’subordinate’ trees relative to clades that exist in a consensus tree, and then 
interrogating the support values of the shared clades which exist in the 
’subordinate’ trees? So for example, clade A appears in consensus tree X, and 
also appears in gene trees 1-5 - so this will give me the summary of the 
support values for clade A in gene trees 1-5?

Seems like this would be a useful function to interrogate support values among 
clades recapitulated in gene trees relative to a species tree. Would there be 
an analogue for clades that exist in your consensus that don’t exist in 
’subordinate’ trees?

Jake



On Dec 14, 2016, at 12:41 PM, Keith Barker  wrote:

Frank:

You can import all of the trees into one or more multiPhylo objects, then use 
the ape functions prop.part or prop.clades (depending on what you want to do) 
to summarize different subsets (e.g., from different analyses). Here is an 
example with simulated trees:

x<-rmtree(50,100)
plot(x[[1]])
nodelabels(prop.clades(x[[1]],x))
y<-rep(x[1],50)
plot(x[[1]])
nodelabels(prop.clades(x[[1]],c(x,y)))

The first part just creates a bunch of random trees, so most nodes will only be 
supported by around 1-4 or so trees. The second part just repeats tree one 50 
times, and when you label the nodes with trees x+ tres yy, you get 50 plus the 
number of trees from part 1. That should give you the idea.

You can find the shared clades from the "best" trees (if you are doing ML) by 
first calculating the strict consensus using the consensus function in ape.

Hope that helps,
Keith

On 12/14/16 10:19 AM, Frank T Burbrink wrote:

Hello,

I have one question

Is there a method to compare the support values (either bootstraps or Pp) 
across all shared clades between two or more different trees having identical 
taxa? I believe this method would have to first identify the shared clades and 
then determine the measure of support at each shared node.

Thank you,

Frank

Frank T. Burbrink, Ph.D.
Associate Curator
Department of Herpetology
American Museum of Natural History
Central Park West at 79th Street
New York, NY 10024-5192

fburbr...@amnh.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/


--
F. Keith Barker, Ph.D.
Associate Professor, Department of Ecology, Evolution and Behavior
Curator of Genetic Resources, and
Interim Curator of Birds, Bell Museum of Natural History
University of Minnesota
140 Gortner Laboratory
1479 Gortner Ave
Saint Paul, MN 55108
612.624.2737 (phone)
612.624.6777 (fax)
barke...@umn.edu
http://www.tc.umn.edu/~barke042

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



___
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] Comparing support values on different trees

2016-12-14 Thread Jacob Berv
To clarify - the idea here is that you are asking which clades appear in 
’subordinate’ trees relative to clades that exist in a consensus tree, and then 
interrogating the support values of the shared clades which exist in the 
’subordinate’ trees? So for example, clade A appears in consensus tree X, and 
also appears in gene trees 1-5 - so this will give me the summary of the 
support values for clade A in gene trees 1-5?

Seems like this would be a useful function to interrogate support values among 
clades recapitulated in gene trees relative to a species tree. Would there be 
an analogue for clades that exist in your consensus that don’t exist in 
’subordinate’ trees?

Jake


> On Dec 14, 2016, at 12:41 PM, Keith Barker  wrote:
> 
> Frank:
> 
> You can import all of the trees into one or more multiPhylo objects, then use 
> the ape functions prop.part or prop.clades (depending on what you want to do) 
> to summarize different subsets (e.g., from different analyses). Here is an 
> example with simulated trees:
> 
> x<-rmtree(50,100)
> plot(x[[1]])
> nodelabels(prop.clades(x[[1]],x))
> y<-rep(x[1],50)
> plot(x[[1]])
> nodelabels(prop.clades(x[[1]],c(x,y)))
> 
> The first part just creates a bunch of random trees, so most nodes will only 
> be supported by around 1-4 or so trees. The second part just repeats tree one 
> 50 times, and when you label the nodes with trees x+ tres yy, you get 50 plus 
> the number of trees from part 1. That should give you the idea.
> 
> You can find the shared clades from the "best" trees (if you are doing ML) by 
> first calculating the strict consensus using the consensus function in ape.
> 
> Hope that helps,
> Keith
> 
> On 12/14/16 10:19 AM, Frank T Burbrink wrote:
>> Hello,
>> 
>> I have one question
>> 
>> Is there a method to compare the support values (either bootstraps or Pp) 
>> across all shared clades between two or more different trees having 
>> identical taxa? I believe this method would have to first identify the 
>> shared clades and then determine the measure of support at each shared node.
>> 
>> Thank you,
>> 
>> Frank
>> 
>> Frank T. Burbrink, Ph.D.
>> Associate Curator
>> Department of Herpetology
>> American Museum of Natural History
>> Central Park West at 79th Street
>> New York, NY 10024-5192
>> 
>> fburbr...@amnh.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/
> 
> -- 
> F. Keith Barker, Ph.D.
> Associate Professor, Department of Ecology, Evolution and Behavior
> Curator of Genetic Resources, and
> Interim Curator of Birds, Bell Museum of Natural History
> University of Minnesota
> 140 Gortner Laboratory
> 1479 Gortner Ave
> Saint Paul, MN 55108
> 612.624.2737 (phone)
> 612.624.6777 (fax)
> barke...@umn.edu
> http://www.tc.umn.edu/~barke042
> 
> ___
> 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] Comparing support values on different trees

2016-12-14 Thread Keith Barker

Frank:

You can import all of the trees into one or more multiPhylo objects, 
then use the ape functions prop.part or prop.clades (depending on what 
you want to do) to summarize different subsets (e.g., from different 
analyses). Here is an example with simulated trees:


x<-rmtree(50,100)
plot(x[[1]])
nodelabels(prop.clades(x[[1]],x))
y<-rep(x[1],50)
plot(x[[1]])
nodelabels(prop.clades(x[[1]],c(x,y)))

The first part just creates a bunch of random trees, so most nodes will 
only be supported by around 1-4 or so trees. The second part just 
repeats tree one 50 times, and when you label the nodes with trees x+ 
tres yy, you get 50 plus the number of trees from part 1. That should 
give you the idea.


You can find the shared clades from the "best" trees (if you are doing 
ML) by first calculating the strict consensus using the consensus 
function in ape.


Hope that helps,
Keith

On 12/14/16 10:19 AM, Frank T Burbrink wrote:

Hello,

I have one question

Is there a method to compare the support values (either bootstraps or Pp) 
across all shared clades between two or more different trees having identical 
taxa? I believe this method would have to first identify the shared clades and 
then determine the measure of support at each shared node.

Thank you,

Frank

Frank T. Burbrink, Ph.D.
Associate Curator
Department of Herpetology
American Museum of Natural History
Central Park West at 79th Street
New York, NY 10024-5192

fburbr...@amnh.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/


--
F. Keith Barker, Ph.D.
Associate Professor, Department of Ecology, Evolution and Behavior
Curator of Genetic Resources, and
Interim Curator of Birds, Bell Museum of Natural History
University of Minnesota
140 Gortner Laboratory
1479 Gortner Ave
Saint Paul, MN 55108
612.624.2737 (phone)
612.624.6777 (fax)
barke...@umn.edu
http://www.tc.umn.edu/~barke042

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