Re: [R-sig-phylo] Function to Extend Tips?

2017-07-26 Thread Joseph W. Brown
1,i])); # apply it. this assume you want to extend it, not just set it phy$edge.length[idx] <- phy$edge.length[idx] + as.numeric(df[i,2]); } Probably a nicer way to do it without a loop... JWB ____ Joseph W. Brown Post-doctoral Researcher,

Re: [R-sig-phylo] Function to Extend Tips?

2017-07-26 Thread Joseph W. Brown
If you want to just extend all tips by a constant amount you can do this: # extend terminal edges by arbitrary amount (here: 13) idx <- which(phy$edge[,2] < (phy$Nnode + 1)); phy$edge.length[idx] <- phy$edge.length[idx] + 13; HTH. Joseph. ____ Joseph

Re: [R-sig-phylo] A possible alternate MRCA function to APE's getMRCA

2017-06-10 Thread Joseph W. Brown
ncestor >> for (i in 2:length(tnd)) { >> done <- FALSE; >> cnd <- tnd[i]; >> while (!done) { >> cpar <- pvec[cnd]; # get immediate parent >> if (cpar %in% pars) { >> if (cpar

Re: [R-sig-phylo] A possible alternate MRCA function to APE\'s getMRCA

2017-06-09 Thread Joseph W. Brown
Sweet! I considered preallocation, but figured it was not worth it. Guess I was wrong! JWB Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan Department of Ecology & Evolutionary Biology Room 2071, Kraus Natural Scie

Re: [R-sig-phylo] A possible alternate MRCA function to APE\'s getMRCA

2017-06-09 Thread Joseph W. Brown
for my purposes. JWB ____ Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan Department of Ecology & Evolutionary Biology Room 2071, Kraus Natural Sciences Building Ann Arbor MI 48109-1079 josep...@umich.edu > On 9 Jun, 2017, a

Re: [R-sig-phylo] A possible alternate MRCA function to APE's getMRCA

2017-06-07 Thread Joseph W. Brown
w00t! I am aware that `which` is inefficient, but wasn't sure how to get around it in this instance. Thanks! It would be great to have this in the new version! Joseph. Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan

[R-sig-phylo] A possible alternate MRCA function to APE's getMRCA

2017-06-07 Thread Joseph W. Brown
# keep going! cnd <- cpar; } } } return(pars[mrcaind]); } Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan Department of Ecology & Evolutionary Biology Room 2071, Kraus Natural Sciences

Re: [R-sig-phylo] dating cladograms in R

2017-05-17 Thread Joseph W. Brown
HTH. JWB ____ Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan Department of Ecology & Evolutionary Biology Room 2071, Kraus Natural Sciences Building Ann Arbor MI 48109-1079 josep...@umich.edu > On 17 May, 2017, at 08:12, Fábio Machado <macfa.

Re: [R-sig-phylo] Extracting a clade for LTT

2017-05-08 Thread Joseph W. Brown
Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan Department of Ecology & Evolutionary Biology Room 2071, Kraus Natural Sciences Building Ann Arbor MI 48109-1079 josep...@umich.edu > On 8 May, 2017, at 07:31, David Buckley <dbuck...@mn

Re: [R-sig-phylo] Extract all possible clades from a tree

2017-01-05 Thread Joseph W. Brown
de 10 (node 27) has 2 tips." [1] "clade 11 (node 28) has 2 tips." [1] "clade 12 (node 29) has 6 tips." [1] "clade 13 (node 30) has 2 tips." [1] "clade 14 (node 31) has 4 tips." [1] "clade 15 (node 32) has 3 tips." [1] "clade 16 (node 33)

Re: [R-sig-phylo] Extract all possible clades from a tree

2017-01-05 Thread Joseph W. Brown
ething } This includes the root node (i.e. whole tree), but that can be changed. This can be rewritten as an lapply if necessary. HTH. JWB ____ Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan Department of Ecology & Evolutiona

Re: [R-sig-phylo] compressTipLabel as an option to read.trees()

2016-12-14 Thread Joseph W. Brown
I wonder if reading in a Nexus file with a translation table bypasses this problem? JWB Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan Department of Ecology & Evolutionary Biology Room 2071, Kraus Natural Scie

[R-sig-phylo] 99 Ways to ruin an open source project

2016-11-03 Thread Joseph W. Brown
Here is a cheeky post <http://opensoul.org/2015/07/22/99ways/> by Brandon Keepers on how to do things wrong when developing open source software. Lots of good stuff in there! JWB ____ Joseph W. Brown Post-doctoral Researcher, Smith Laboratory Univ

Re: [R-sig-phylo] Anyone knows how to concatenate aligned genes sequences so as to create whole genome alignments?

2016-09-12 Thread Joseph W. Brown
how sites/partitions are ordered). If you need these in out another format (say, phylip), do: ./pxcat -s *.fas -o my_concatenated_alignment.fas | ./pxs2phy -o my_concatenated_alignment.phy HTH. JWB ________ Joseph W. Brown Post-doctoral Researcher, Smith Laboratory

Re: [R-sig-phylo] Ultrametric tree not recognized

2016-08-16 Thread Joseph W. Brown
://floating-point-gui.de Comparing Floating Point Numbers, 2012 Edition: https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ HTH. JWB Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan

Re: [R-sig-phylo] Ultrametric tree not recognized

2016-08-16 Thread Joseph W. Brown
Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan Department of Ecology & Evolutionary Biology Room 2071, Kraus Natural Sciences Building Ann Arbor MI 48109-1079 josep...@umich.edu > On 16 Aug, 2016, at 10:15, Klaus Schliep <klaus.schl...@gmail.

Re: [R-sig-phylo] Ultrametric tree not recognized

2016-08-16 Thread Joseph W. Brown
am and the results are the same. So can we assume this is not a PhyloBayes issue, and rather an unavoidable problem with large, old trees? But the fact that MrBayes trees are ultrametric is confusing; does MrBayes use less precise edge lengths? JWB ____________ Jo

Re: [R-sig-phylo] chronos nlminb error

2014-12-31 Thread Joseph W. Brown
. 3. If all else fails, and it is not too much trouble, use a virtual box, and install/use treePL in some flavour of linux. This should work flawlessly. HTH. JWB. Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan Department

Re: [R-sig-phylo] Analysis with Multiple cores on Mac Workstation

2012-12-10 Thread Joseph W. Brown
://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/ _ Joseph W. Brown Post-doctoral Researcher, Smith Laboratory University of Michigan Department of Ecology Evolutionary Biology