[R-sig-phylo] help with dist.multiPhylo needed

2014-01-23 Thread Juan Antonio Balbuena

  
  
Hello

I would like to compute geodesic distances from random trees for
comparison and hypothesis testing with those produced from a given
set of trees. I am using dist.multiPhylo() in the 'distory' package,
but it seems to be too compute-intensive. To illustrate my point:


   lin4 #object consisting of 4 randomly generated trees
[1] "(S8: 1.0, (((S4: 0.28596, S5: 0.28596): 0.63211, (S10: 0.88214, ((S6: 0.49245, S7: 0.49245): 0.24813, S9: 0.74058): 0.14156): 0.03592): 0.03859, ((S1: 0.16950, S2: 0.16950): 0.61358, S3: 0.78308): 0.17357): 0.04335);"
[2] "((S6: 0.10938, S2: 0.10938): 0.89062, ((S7: 0.79060, ((S4: 0.31389, S8: 0.31389): 0.31812, (((S1: 0.06153, S3: 0.06153): 0.08642, S10: 0.14795): 0.47444, S9: 0.62238): 0.00962): 0.15860): 0.01336, S5: 0.80396): 0.19604);"
[3] "((S7: 0.98617, (S4: 0.90628, (S3: 0.86179, ((S1: 0.17650, S6: 0.17650): 0.48270, ((S10: 0.28064, S5: 0.28064): 0.06352, (S9: 0.00968, S8: 0.00968): 0.33448): 0.31505): 0.20259): 0.04449): 0.07990): 0.01383, S2: 1.0);"
[4] "(S6: 0.42675, S3: 0.42675): 0.16273, S8: 0.58948): 0.00542, S5: 0.59490): 0.05023, (S4: 0.19208, S7: 0.19208): 0.45305): 0.35486, (S9: 0.90829, (S10: 0.64179, (S2: 0.36191, S1: 0.36191): 0.27988): 0.26649): 0.09171);"


   dist.multiPhylo(lin4)
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?

If I increase the value of "expressions" from 5000 (default) to 25000 then

 options(expressions=25000)
 dist.multiPhylo(lin4)
Error: protect(): protection stack overflow

Is there a way to circumvent these errors?

Thank you very much for your time.

Juan A. Balbuena 






















-- 
  
  
 Dr. Juan A. Balbuena 
Marine Zoology Unit 
Cavanilles Institute of Biodiversity and Evolutionary
Biology 
University of
Valencia

  http://www.uv.es/~balbuena 
P.O. Box 22085 http://www.uv.es/cavanilles/zoomarin/index.htm 
46071 Valencia,
Spain http://cetus.uv.es/mullpardb/index.html 
e-mail: j.a.balbu...@uv.es tel. +34 963 543 658 fax +34 963 543 733

 
NOTE! For

  shipments by EXPRESS COURIER use the following street
  address: 
  C/ Catedrtico Jos Beltrn 2, 46980 Paterna (Valencia),
  Spain. 
  
  

  


___
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] help with dist.multiPhylo needed

2014-01-23 Thread Juan Antonio Balbuena

  
  
Hi Klaus
You are right. The problem was that my lin4 object was a list. I
have saved the same trees in a text file as

"(S8: 1.0, (((S4: 0.28596, S5: 0.28596): 0.63211, (S10: 0.88214,
((S6: 0.49245, S7: 0.49245): 0.24813, S9: 0.74058): 0.14156):
0.03592): 0.03859, ((S1: 0.16950, S2: 0.16950): 0.61358, S3:
0.78308): 0.17357): 0.04335);"
"((S6: 0.10938, S2: 0.10938): 0.89062, ((S7: 0.79060, ((S4: 0.31389,
S8: 0.31389): 0.31812, (((S1: 0.06153, S3: 0.06153): 0.08642, S10:
0.14795): 0.47444, S9: 0.62238): 0.00962): 0.15860): 0.01336, S5:
0.80396): 0.19604);"
"((S7: 0.98617, (S4: 0.90628, (S3: 0.86179, ((S1: 0.17650, S6:
0.17650): 0.48270, ((S10: 0.28064, S5: 0.28064): 0.06352, (S9:
0.00968, S8: 0.00968): 0.33448): 0.31505): 0.20259): 0.04449):
0.07990): 0.01383, S2: 1.0);"
"(S6: 0.42675, S3: 0.42675): 0.16273, S8: 0.58948): 0.00542, S5:
0.59490): 0.05023, (S4: 0.19208, S7: 0.19208): 0.45305): 0.35486,
(S9: 0.90829, (S10: 0.64179, (S2: 0.36191, S1: 0.36191): 0.27988):
0.26649): 0.09171);"

and 

 tree4 - read.tree(file.choose())

 dist.multiPhylo(tree4)
 1 2 3
2 2.452629 
3 2.441263 2.362859 
4 1.598451 2.050473 2.259690

Excellent!

Thank you very much for your help!

Juan 


El 23/01/2014 16:54, Klaus Schliep
  escribi:


  I also checked it for a multiPhylo object the
function works fine, but not for a list or vector of characters.

  
  

On Thu, Jan 23, 2014 at 4:49 PM, Juan
  Antonio Balbuena j.a.balbu...@uv.es wrote:
  
 Hello
  Thank you very much for your interest. Yes, it does read
  newick and works with similar trees. So the problem seems
  "architectural" instead of not applying the function
  correctly. 
  
  Cheers
  
  Juan 
  
  
  El 23/01/2014 16:35, Klaus Schliep escribi:
  
  

  
Sorry, should also read newick
  format, sorry for my comment. 
  


  
  On Thu, Jan 23, 2014 at
4:30 PM, Klaus Schliep klaus.schl...@gmail.com
wrote:

  

  
Dear Juan,

lin4 is not an object of class
multiPhylo but vector of characters.
Read in the trees with read.tree from
the ape package.  
  
  Regards, 

Klaus

  


  

  
  


  
On Thu, Jan 23, 2014 at 4:20 PM,
  Juan Antonio Balbuena j.a.balbu...@uv.es
  wrote:

  
  

  
 Hello
  
  I would like to compute geodesic
  distances from random trees for
  comparison and hypothesis testing
  with those produced from a given
  set of trees. I am using
  dist.multiPhylo() in the 'distory'
  package, but it seems to be too
  compute-intensive. To illustrate
  my point:
  
  

 lin4 #object consisting of 4 randomly generated trees
[1] "(S8: 1.0, (((S4: 0.28596, S5: 0.28596): 0.63211, (S10: 0.88214, ((S6: 0.49245, S7: 0.49245): 0.24813, S9: 0.74058): 0.14156): 0.03592): 0.03859, ((S1: 0.16950, S2: 0.16950): 0.61358, S3: 0.78308): 0.17357): 0.04335);"
[2] "((S6: 0.10938, S2: 0.10938): 0.89062, ((S7: 0.79060, ((S4: 0.31389, S8: 0.31389): 0.31812, (((S1: 0.06153, S3: 0.06153): 0.08642, S10: 

[R-sig-phylo] OUwie $solution.se

2014-01-23 Thread Maria Ghazali
Hi, 
How is it possible to get approximate standard errors of alpha and sigma^2 
($solution.se) in OUwie? Maybe, diagn=T should show me this element, but it 
does not work:  

Error in dim(edges) : 'edges' is missing 
  
Thank you! 

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