[R-sig-phylo] utilise more data by making polytomies

2014-02-25 Thread Ferguson-Gow, Henry
Hi All

I have a large dataset and a large tree, however the intersection between them 
both is quite low. As a supplement to analyses solely on the species that 
appear in both the dataset and the tree I thought I could take the species that 
are present in the dataset and not the tree, and add those tips in as a 
polytomy with their congenerics present on the tree. Is there a method in R 
that would help me to do this?

Many thanks

Henry


[[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] utilise more data by making polytomies

2014-02-25 Thread Liam J. Revell
Something similar to this is in phytools 
(http://blog.phytools.org/2013/11/new-function-to-add-species-to-genus-in.html),
 though not yet on CRAN. Let me know if this is what you're thinking of.

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

--
Sent from Windows Phone

-Original Message-
From: Ferguson-Gow, Henry
Sent: 2/25/2014 10:23 AM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] utilise more data by making polytomies

Hi All

I have a large dataset and a large tree, however the intersection between them 
both is quite low. As a supplement to analyses solely on the species that 
appear in both the dataset and the tree I thought I could take the species that 
are present in the dataset and not the tree, and add those tips in as a 
polytomy with their congenerics present on the tree. Is there a method in R 
that would help me to do this?

Many thanks

Henry


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


Re: [R-sig-phylo] utilise more data by making polytomies

2014-02-25 Thread Julien Clavel
Hi,

There is also the stickTip function:
http://rleca.pbworks.com/w/file/fetch/40813743/stickTips_1.2.html
it is possible to tweak the code for more specific things...

Best,

Julien

 From: liam.rev...@umb.edu
 Date: Tue, 25 Feb 2014 10:32:36 -0500
 To: h.ferguson-...@ucl.ac.uk; r-sig-phylo@r-project.org
 Subject: Re: [R-sig-phylo] utilise more data by making polytomies
 
 Something similar to this is in phytools 
 (http://blog.phytools.org/2013/11/new-function-to-add-species-to-genus-in.html),
  though not yet on CRAN. Let me know if this is what you're thinking of.
 
 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
 
 --
 Sent from Windows Phone
 
 -Original Message-
 From: Ferguson-Gow, Henry
 Sent: 2/25/2014 10:23 AM
 To: r-sig-phylo@r-project.org
 Subject: [R-sig-phylo] utilise more data by making polytomies
 
 Hi All
 
 I have a large dataset and a large tree, however the intersection between 
 them both is quite low. As a supplement to analyses solely on the species 
 that appear in both the dataset and the tree I thought I could take the 
 species that are present in the dataset and not the tree, and add those tips 
 in as a polytomy with their congenerics present on the tree. Is there a 
 method in R that would help me to do this?
 
 Many thanks
 
 Henry
 
 
   [[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/
  
[[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] utilise more data by making polytomies

2014-02-25 Thread David Bapst
At the risk of inundating you with options, Henry, there is also
expandTaxonTree in the package paleotree (on CRAN) which is similar to the
above, but also lets you collapse higher taxa you list as paraphyletic,
which can be useful if the taxonomic work of your group has never been
concerned with monophyly.

Cheers,
-Dave


On Tue, Feb 25, 2014 at 3:33 PM, Julien Clavel julien.cla...@hotmail.frwrote:

 Hi,

 There is also the stickTip function:
 http://rleca.pbworks.com/w/file/fetch/40813743/stickTips_1.2.html
 it is possible to tweak the code for more specific things...

 Best,

 Julien

  From: liam.rev...@umb.edu
  Date: Tue, 25 Feb 2014 10:32:36 -0500
  To: h.ferguson-...@ucl.ac.uk; r-sig-phylo@r-project.org
  Subject: Re: [R-sig-phylo] utilise more data by making polytomies
 
  Something similar to this is in phytools (
 http://blog.phytools.org/2013/11/new-function-to-add-species-to-genus-in.html),
 though not yet on CRAN. Let me know if this is what you're thinking of.
 
  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
 
  --
  Sent from Windows Phone
 
  -Original Message-
  From: Ferguson-Gow, Henry
  Sent: 2/25/2014 10:23 AM
  To: r-sig-phylo@r-project.org
  Subject: [R-sig-phylo] utilise more data by making polytomies
 
  Hi All
 
  I have a large dataset and a large tree, however the intersection
 between them both is quite low. As a supplement to analyses solely on the
 species that appear in both the dataset and the tree I thought I could take
 the species that are present in the dataset and not the tree, and add those
 tips in as a polytomy with their congenerics present on the tree. Is there
 a method in R that would help me to do this?
 
  Many thanks
 
  Henry
 
 
[[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/

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




-- 
David W. Bapst, PhD
Adjunct Asst. Professor, Geology and Geol. Eng.
South Dakota School of Mines and Technology
501 E. St. Joseph
Rapid City, SD 57701

http://webpages.sdsmt.edu/~dbapst/
http://cran.r-project.org/web/packages/paleotree/index.html

[[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] dropping taxa from list of trees

2014-02-25 Thread Juanita Rodriguez
Hi all,

I have an issue with using the drop.random to drop taxa from a set of
simulated trees. When I try to give the list as input it shows an
error:

Error in drop.random(simtrees, 937) :
  object phy is not of class phylo

I also tried using lapply and it keeps showing the same message.

Thanks in advance for your help!


Juanita

_

Here is the code I have used:


 treesim-sim.bd.taxa.age(n=1008, numbsim=1000, lambda=9.111433e-02, 
 mu=3.242355e-07, frac = 1, age=31, mrca = FALSE)

drop.random(treesim,937)

Error in drop.random(treesim, 937) : object phy is not of class phylo

 lapply(simtrees, drop.random (simtrees,937))
Error in drop.random(simtrees, 937) :  object phy is not of class phylo

-- 
Utah State University
Department of Biology
5305 Old Main Hill
Logan, UT/ USA 84322
 (435) 797-0358

[[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] dropping taxa from list of trees

2014-02-25 Thread Slater, Graham
Hi Juanita

try:


lapply(simtrees, drop.random, n = 937)

when using lapply (or any of the apply family) you need to specify additional 
arguments taken by the function you’re applying by name, along with their 
values.

graham

Graham Slater
Peter Buck Post-Doctoral Fellow
Department of Paleobiology
National Museum of Natural History
The Smithsonian Institution [NHB, MRC 121]
P.O. Box 37012


(202) 633-1316
slat...@si.edumailto:slat...@si.edu
www.fourdimensionalbiology.comhttp://www.fourdimensionalbiology.com





On Feb 25, 2014, at 9:49 PM, Juanita Rodriguez 
juanitarodrigu...@gmail.commailto:juanitarodrigu...@gmail.com wrote:

Hi all,

I have an issue with using the drop.random to drop taxa from a set of
simulated trees. When I try to give the list as input it shows an
error:

Error in drop.random(simtrees, 937) :
 object phy is not of class phylo

I also tried using lapply and it keeps showing the same message.

Thanks in advance for your help!


Juanita

_

Here is the code I have used:


treesim-sim.bd.taxa.age(n=1008, numbsim=1000, lambda=9.111433e-02, 
mu=3.242355e-07, frac = 1, age=31, mrca = FALSE)

drop.random(treesim,937)

Error in drop.random(treesim, 937) : object phy is not of class phylo

lapply(simtrees, drop.random (simtrees,937))
Error in drop.random(simtrees, 937) :  object phy is not of class phylo

--
Utah State University
Department of Biology
5305 Old Main Hill
Logan, UT/ USA 84322
(435) 797-0358

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - 
R-sig-phylo@r-project.orgmailto:R-sig-phylo@r-project.org
https://urldefense.proofpoint.com/v1/url?u=https://stat.ethz.ch/mailman/listinfo/r-sig-phylok=diZKtJPqj4jWksRIF4bjkw%3D%3D%0Ar=9yz%2F9T5DbvC96h83J%2BUFBQ%3D%3D%0Am=nBHH4FozRe%2BJBfaYNGYL8YxZ3Qs5Kk4u7XWcLurz4LU%3D%0As=629a8efb96259d10466e94079ab3b36b6d07e293356889f6fedc23b6c771f259
Searchable archive at 
https://urldefense.proofpoint.com/v1/url?u=http://www.mail-archive.com/r-sig-phylo%40r-project.org/k=diZKtJPqj4jWksRIF4bjkw%3D%3D%0Ar=9yz%2F9T5DbvC96h83J%2BUFBQ%3D%3D%0Am=nBHH4FozRe%2BJBfaYNGYL8YxZ3Qs5Kk4u7XWcLurz4LU%3D%0As=5524830b2278d27fff1850cbc75e4875d7e182861b1b072624cd43cb509afad6


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