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

2016-12-21 Thread Emmanuel Paradis
Following Riana's query, it appeared that the tree she used had no branch lengths. chronos() now check for the presence of branch lengths and returns an explicit error message. Best, Emmanuel Le 16/12/2016 à 18:20, Emmanuel Paradis a écrit : Hi Riana, It's difficult to answer your question

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

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

2016-12-16 Thread Emmanuel Paradis
Hi Riana, It's difficult to answer your question. Can you send some sample data to reproduce this error? Best, Emmanuel Le 15/12/2016 à 22:58, Riana Rishad Minocher a écrit : Hi, I’m writing with an issue using the chronos function in ape: I have a rooted supertree of 186 taxa (genetic &

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

2016-12-15 Thread Emmanuel Paradis
0.000 2.088 To be compared with my previous message with N=1 and n=1000 which took 20 times less time (~1.2 sec). I guess reading the tree file (either in Newick or in NEXUS) will be much longer than any of these. Best, Emmanuel Le 14/12/2016 à 22:44, Yan Wong a écrit : On 14 D

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

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

2016-12-14 Thread Emmanuel Paradis
If the trees are in a NEXUS file with a TRANSLATE block, then the output is a compressed list. So applying .compressTipLabel returns the list unmodified (which should be almost instantaneous). Best, Emmanuel Le 14/12/2016 à 16:51, Yan Wong a écrit : On 14 Dec 2016, at 15:33, Joseph W.

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

2016-12-14 Thread Emmanuel Paradis
Hi Yan, I tried with 10,000 trees each with 1000 tips and it took a bit more than 1 sec: R> tr <- rmtree(1, 1000) R> system.time(a <- .compressTipLabel(tr)) utilisateur système écoulé 1.124 0.036 1.161 And yes the memory footprint is substantially decreased:

Re: [R-sig-phylo] error when using function read.GenBank in ape

2016-11-21 Thread Emmanuel Paradis
Hi Emmanuel, Right! Sorry I misspoke. Best, Eduardo 2016-11-11 23:32 GMT+01:00 Emmanuel Paradis <emmanuel.para...@ird.fr>: Hi Eduardo & Ting-Wen, ape 4.0 is not yet released. The available version is 3.5-0.10 and, you are right Eduardo, it fixes this issue. The instructions to install t

Re: [R-sig-phylo] error when using function read.GenBank in ape

2016-11-21 Thread Emmanuel Paradis
directly from Ape's website... Sincerely, V. Dne sobota 12. listopadu 2016 13:16:47 CET, Eduardo Ascarrunz napsal(a): Hi Emmanuel, Right! Sorry I misspoke. Best, Eduardo 2016-11-11 23:32 GMT+01:00 Emmanuel Paradis <emmanuel.para...@ird.fr>: Hi Eduardo & Ting-Wen, ape 4.0 is n

Re: [R-sig-phylo] concatenating loci with different taxa

2016-11-18 Thread Emmanuel Paradis
Dear Karla, First, I suggest you manage your alignment files in FASTA rather than in NEXUS: this is much more efficient in practice. You may read an alignment in a NEXUS file using read.nexus.data() in ape, then convert it in "DNAbin" class with as.DNAbin(). The cbind() funtion in ape

Re: [R-sig-phylo] error when using function read.GenBank in ape

2016-11-11 Thread Emmanuel Paradis
Hi Eduardo & Ting-Wen, ape 4.0 is not yet released. The available version is 3.5-0.10 and, you are right Eduardo, it fixes this issue. The instructions to install this new version of ape is here: http://ape-package.ird.fr/ape_installation.html#versions The issue (not really a bug, strictly

[R-sig-phylo] pre-release of ape 4.0

2016-11-10 Thread Emmanuel Paradis
Dear all, The new version of ape is ready to be sent to CRAN. The list of new features is quite long: http://ape-package.ird.fr/NEWS This includes a fix to read.GenBank() to work with the new settings on NCBI's servers. A testing version of ape (3.5-0.10) is available for Windows and as a

Re: [R-sig-phylo] Making ultrametric trees

2016-10-31 Thread Emmanuel Paradis
Oct 29, 2016, at 2:45 PM, Emmanuel Paradis <emmanuel.para...@ird.fr <mailto:emmanuel.para...@ird.fr>> wrote: > > Sure they are different. I forgot to mention that. > > In comparative analyses, the expected quantity of trait change (= the variance in th

Re: [R-sig-phylo] Making ultrametric trees

2016-10-29 Thread Emmanuel Paradis
orrelation matrix obtained directly from vcv [i.e. vcv(nonultrametric_tree, cor=T)]. Could you enlighten me about differences and why chronoMPL method might be preferred? Best wishes and thanks in advance. Shinichi On Sat, Oct 29, 2016 at 8:50 PM, Emmanuel Paradis <emmanuel.p

Re: [R-sig-phylo] Making ultrametric trees

2016-10-29 Thread Emmanuel Paradis
Dear Shinichi, A fast solution is provided by the function chronoMPL in ape; it does not require calibration points (see the references in the help page of this function for the assumptions). The function chronos (also in ape) is another possibility but it needs at least one calibration point

Re: [R-sig-phylo] fatal error plotting trees

2016-10-29 Thread Emmanuel Paradis
Hi, This kind of issue was reported some time ago and there is an item in ape's FAQ: http://ape-package.ird.fr/ape_faq.html#Bayestrees But your situation seems a bit different. You may also check the tree with checkValidPhylo() to have a diagnostic of what's wrong. Best, Emmanuel Le

Re: [R-sig-phylo] Truncate x-axis in phydataplot barplots

2016-10-17 Thread Emmanuel Paradis
Hi Marian, You can limit the space available to the whole figure when plotting the tree (this is when the size of the plot is fixed). For example, tr <- rcoal(10) x <- 1:10 plot(tr, x.lim = 5) phydataplot(x, tr) This is equivalent to playing with xlim and/or ylim in barplot(). You can also

Re: [R-sig-phylo] ape functions to become generic

2016-10-04 Thread Emmanuel Paradis
) for continuing to maintain and improve ape. Cheers, -Dave On Mon, Oct 3, 2016 at 8:51 AM, Emmanuel Paradis <emmanuel.para...@ird.fr> wrote: Dear all, We are planning to introduce a substantial change in ape: several functions operating on "phylo" objects will be made gene

[R-sig-phylo] ape functions to become generic

2016-10-03 Thread Emmanuel Paradis
Dear all, We are planning to introduce a substantial change in ape: several functions operating on "phylo" objects will be made generic with methods for "phylo" and "multiPhylo" objects. The motivation is to make things simpler when working with lists of trees. For instance, for a list of

Re: [R-sig-phylo] ape: chronos

2016-09-05 Thread Emmanuel Paradis
Hi Daniel, Thank you for your report. It's not very clear how or why the penalized likelihood becomes NA (maybe a log of a negative number is calculated somewhere). chronos() is still under progress and I take good note of your fix. Best, Emmanuel Le 05/09/2016 à 10:27, Daniel Lang a

Re: [R-sig-phylo] How to contribute?

2016-08-29 Thread Emmanuel Paradis
here can I find how to do so? Sure, I've searched the ape homepage ( http://ape-package.ird.fr/ ) and checked if Emmanuel Paradis has a GitHub hosting the ape code (as he does with pegas), but I could not find a place where the code is hosted, nor where to submit issues. Thanks, Richel

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

2016-08-19 Thread Emmanuel Paradis
2016 at 3:04 AM, Emmanuel Paradis <emmanuel.para...@ird.fr <mailto:emmanuel.para...@ird.fr>> wrote: Hi Klaus, The default is: is.ultrametric(phy, tol = .Machine$double.eps^0.5). According to ?.Machine this value does not depend on the machine precision. On my laptop, it

Re: [R-sig-phylo] Chronos function in ape

2016-07-07 Thread Emmanuel Paradis
Hi Marco, chronos uses specific models for the variation in substitution rates among branches and I'm not sure whether these models apply to your data. Maybe you can use chronos with model = "clock" if you can assume that drift is constant throughout your tree. HTH Emmanuel Le 06/07/2016

Re: [R-sig-phylo] Bug report for CDF.birth.death.R

2016-07-06 Thread Emmanuel Paradis
Dear Niko, Many thanks for this. Best, Emmanuel Le 05/07/2016 07:16, Niko Yasui a écrit : Dear Emmanuel & list, There seems to be a small bug on line 582, in function 'rphylo'. The parameters passed to function 'Foo' are switched compared to how the Foo functions are defined and how they

Re: [R-sig-phylo] get divergence date for all tips on a chronogram

2016-07-04 Thread Emmanuel Paradis
It seems you are looking for branching.times(). Cheers, Emmanuel Le 05/07/2016 06:39, Chris Buddenhagen a écrit : Does anyone know how to get the divergence dates the mrca for all tips on a chronogram? I thought I was onto something when I found mrca in the ape package, but it returns the

Re: [R-sig-phylo] Adjust position of tip labels in plot.phylo

2016-07-01 Thread Emmanuel Paradis
There is a small bug actually: label.offset is ignored with type = "unrooted" (unless lab4ut = "axial"). This is now fixed. Best, Emmanuel Le 01/07/2016 09:37, Emmanuel Paradis a écrit : Hi Kamila, The vectors x and y extracted by Liam are ordered in the same way

Re: [R-sig-phylo] Adjust position of tip labels in plot.phylo

2016-07-01 Thread Emmanuel Paradis
Hi Kamila, The vectors x and y extracted by Liam are ordered in the same way than the tip labels of the tree (say its names is 'phy'); for instance, the followings should do the same output than plot(phy): plot(phy, show.tip.label = FALSE) obj <- get("last_plot.phylo", envir = .PlotPhyloEnv)

Re: [R-sig-phylo] chronos ape package does it return confidence intervals too?

2016-06-29 Thread Emmanuel Paradis
quick answer: no It's work in progress. Best, Emmanuel Le 29/06/2016 07:46, Chris Buddenhagen a écrit : Just this quick question Chris Buddenhagen cbuddenha...@gmail.com [[alternative HTML version deleted]] ___ R-sig-phylo mailing

Re: [R-sig-phylo] identify duplicate topologies and add corresponding values

2016-05-30 Thread Emmanuel Paradis
Hi John, Something like this does what you are looking for: z <- tapply(X[, 1], X[, 2], sum) To have it in a matrix-like layout (similar to X): data.frame(z, names(z)) Best, Emmanuel Le 30/05/2016 18:13, John Denton a écrit : Hi all, I have a two-column matrix, containing trees in one

Re: [R-sig-phylo] root tree in ape 3.4 vs 3.2

2016-05-25 Thread Emmanuel Paradis
Hi Tomas, It's fixed in ape 3.5 (on CRAN since yesterday). Best, Emmanuel Le 25/05/2016 21:24, Tomas Fer a écrit : Dear colleagues, I want to ask why this function (see below) is working under ape 3.2. but produce an error in ape 3.4. I am trying to read newick-formated file and than root it

Re: [R-sig-phylo] Error in trees[[i]] : subscript out of bounds

2016-05-24 Thread Emmanuel Paradis
h read.tree but the errors persisted. When I used another tree, everything worked fine, so I guess I'll just use that one. Once again, thank you. Sérgio. 2016-05-23 20:55 GMT+01:00 Emmanuel Paradis <emmanuel.para...@ird.fr <mailto:emmanuel.para...@ird.fr>>: Liam is probably righ

Re: [R-sig-phylo] Error in trees[[i]] : subscript out of bounds

2016-05-23 Thread Emmanuel Paradis
Liam is probably right: there seems to be something missing in the NEXUS file. The Newick file from the same site can also be read with read.tree. Emmanuel Le 23/05/2016 18:21, Liam J. Revell a écrit : It looks like the NEXUS file might be badly conformed. You could try:

Re: [R-sig-phylo] estimating the evolutionary rate of a continous trait

2016-04-20 Thread Emmanuel Paradis
Hi Manabu & Belinda, In fact, the (homogeneous) OU process makes the data look like with no phylogenetic correlation since the covariance between species decreases exponentially with time and the value of alpha. I think the two situations (a trait not evolving on a phylogeny and following a

Re: [R-sig-phylo] How to use categorical vectors in package ape for phylogenetic independent contrasts

2016-03-04 Thread Emmanuel Paradis
Hi Kate, You can compute PICs for a categorical variable in the same way than you enter it in a linear model, that is by first computing its "contrasts" (this is different from the "P-I-Contrasts", though both have some conceptual similarities). The easiest way to do it is to use the

Re: [R-sig-phylo] standard error (NaN) in model ARD

2016-03-04 Thread Emmanuel Paradis
Hi Felipe, You didn't tell us what function you used: I assumed it was ace() in ape. Often, the fact that SEs cannot be computed by ace() means that the model is a poor fit and that a simpler model is better. You said that the LRT is significant (did you use anova() on the outputs of ace?),

Re: [R-sig-phylo] new testing version of ape

2016-02-26 Thread Emmanuel Paradis
ial College London https://sites.google.com/site/thibautjombart/ https://github.com/thibautjombart Twitter: @TeebzR <https://twitter.com/TeebzR> On 22 February 2016 at 09:16, Emmanuel Paradis <emmanuel.para...@ird.fr <mailto:emmanuel.para...@ird.fr>> wrote:

[R-sig-phylo] new testing version of ape

2016-02-22 Thread Emmanuel Paradis
Dear all, A new testing version of ape (3.4-0.3) is available. It includes three main new features: - A new data class, "AAbin", to store amino acid sequences; there are eleven new functions to generate and manipulate them including translation from DNA. - The function checkAlignment does

Re: [R-sig-phylo] Pairwise Distances

2016-02-19 Thread Emmanuel Paradis
Hi Pedro, Suppose all the DNA sequences are in a single matrix, say X, and you have a vector (or factor) identifying the species of each sequence, say SPECIES. So: length(SPECIES) == nrow(X) is TRUE. What you can do is to first compute all pairwise (raw) distances: D <- dist.dna(X, "n")

Re: [R-sig-phylo] Warnings when calculating beta in apTreeshape

2016-02-02 Thread Emmanuel Paradis
Hi Pedro, It's an issue in the design of the package. The condition tests should be something like: if (inherits(phylo, "treeshape")) if (inherits(phylo, "phylo")) But if the output makes sense, you should not worry about it since, apparently, this is just to transform the tree in

Re: [R-sig-phylo] Convert Node Labels to Edge Labels

2016-02-02 Thread Emmanuel Paradis
Hi Will, This issue comes out from time to time (last time for me during a workshop last week). So I just wrote a function to do that: drawSupportOnEdges <- function(value, ...) { lastPP <- get("last_plot.phylo", envir = .PlotPhyloEnv) n <- lastPP$Ntip m <- lastPP$Nnode if

Re: [R-sig-phylo] Problem with bootstraping microstallite NJ tree

2016-01-21 Thread Emmanuel Paradis
Hi Vojtěch, The trouble comes from boot.phylo() which resamples the columns of the data matrix with replacement: this may result in a bootstrap sample without population column and loci2genind() doesn't like it. The trick is to delete this column from the original "loci" object, and then

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-18 Thread Emmanuel Paradis
d ow indexing works. Next question, a very simple one again. I have two newick trees, identical topology. In one I have branch lengths, in the other I have node names. I would like a tree with both. How do I do this? Thanks in advance! -- Lev Yampolsky Professor Department of Biological Scie

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-13 Thread Emmanuel Paradis
To pile a little bit more after David's message, ape has the function ltt.plot.coords which does the same thing than phytools::ltt but with different options, including 'tol' which specifies the tolerance for considering a tree as ultrametric or not. Best, Emmanuel Le 13/01/2016 03:29, Liam

Re: [R-sig-phylo] Bug report in ape::root

2015-12-13 Thread Emmanuel Paradis
Hi Liam, This seems to be solved with fix(root) and deleting this line (line 99, or line 204 in R/root.R in the souce package): for (j in 1:Nclade) { and the matching "}" a few lines below. Many thanks for the report. All the best, Emmanuel Le 13/12/2015 07:58, Liam J. Revell a

Re: [R-sig-phylo] Plotting sampled-ancestor trees in R

2015-12-08 Thread Emmanuel Paradis
Hi Jo & Roger, edgelabels() has the option 'date' which helps to annotate the branches of a tree: set.seed(1) tx <- rcoal(3) plot(tx) axisPhylo() edgelabels(edge = 1, date = 1, pch = 19, col = "red") Best, Emmanuel Le 08/12/2015 16:32, Joseph Brown a écrit : Roger, Are you looking for

Re: [R-sig-phylo] next release of ape

2015-11-18 Thread Emmanuel Paradis
isible new features are in the graphical functions (see the last examples in ?phydataplot), a function to view alignments (alview), three functions to manage taxa labels (?label2table), and a function to code indels (?DNAbin2indel). Best, Emmanuel Le 27/09/2015 11:13, Emmanuel Paradis a écrit :

Re: [R-sig-phylo] Error message when running gls with estimated lambda

2015-11-04 Thread Emmanuel Paradis
Hi Antonella, It could be that the optimization procedure of the log-likelihood fails with your data, or that this procedure tries some values of lambda that return an error in your situation. You may try to fit successive models with different values of lambda, and select the model with

Re: [R-sig-phylo] branching time to branch length (eg. mcmctree)

2015-10-28 Thread Emmanuel Paradis
Hi Tristan, See compute.brtime in ape. Cheers, Emmanuel Le 28/10/2015 15:31, Tristan Lefebure a écrit : Greetings all, Does anyone know a way to transform branching times into branch length of a chronogram. Like the inverse function of ape::branching.time() ? say you have a chronogram

Re: [R-sig-phylo] output of phangorn::midpoint is not compatible with ape::ladderize?

2015-10-05 Thread Emmanuel Paradis
Hi Klaus, Le 04/10/2015 18:59, Klaus Schliep a écrit : Dear Guangchuang & Emmanuel, it seems ladderize assumes that trees are in "cladewise" order, but midpoint returns a tree in "postorder". Emmanuel can you include a phy <- reorder(phy) Yes. Thanks indeed. Best, Emmanuel in ladderize.

Re: [R-sig-phylo] issue in ape's rphylo (and workaround)

2015-10-04 Thread Emmanuel Paradis
Hi Nick, This bug is fixed in the current testing version: http://ape-package.ird.fr/NEWS Best, Emmanuel Le 04/10/2015 10:55, Nick Matzke a écrit : Hi all, I have been hitting intermittent problems using trees generated by ape::rphylo. Here is a reproducible example.

[R-sig-phylo] next release of ape

2015-09-27 Thread Emmanuel Paradis
Dear all, The next release of ape is ready: http://ape-package.ird.fr/NEWS The testing version 3.3-0.8 is available from the above site as source and as a Windows binary: http://ape-package.ird.fr/ape_installation.html#versions I'm planning to submit to CRAN within 3 or 4 weeks. Best,

Re: [R-sig-phylo] using chronos() from the ape package for large bacterial phylogeny

2015-09-23 Thread Emmanuel Paradis
Hi Fabian, If the goal is to get an ultrametric tree from your sequences, and not really date the divergences among them, you may consider using a UPGMA tree. Another solution is to use chronoMPL in ape which implements the mean path length method; the advantage of this one is that it takes

Re: [R-sig-phylo] simulating rate shifts

2015-07-31 Thread Emmanuel Paradis
Hi Eric, See the function rTraitCont in ape: the parameters of the BM or OU model can be branch-specific, so it's easy to specify a change in parameter(s) at a given node. There's an example there:

Re: [R-sig-phylo] Plotting error edgelabels in phylogeny type=fan

2015-07-31 Thread Emmanuel Paradis
Hi Klaus. Thanks for the fix. In ape now. Cheers, Emmanuel Le 30/07/2015 22:45, Klaus Schliep a écrit : Dear Julia, this function should fix your problem and Emmanuel may can include it into edgelables function: edgeLabelsFan - function (text, edge, adj = c(0.5, 0.5), frame = rect, pch =

Re: [R-sig-phylo] Bug in ape: dropping tips from a ladderized tree (still) randomly shuffles the node labels

2015-07-28 Thread Emmanuel Paradis
Hi David, I've conducted more tests and the bug was really in drop.tip and sometimes apparent without calling ladderize. The fix seems to work well. I have built ape 3.3-0.6 which is available on ape-package.ird.fr as source package. Best, Emmanuel Le 25/07/2015 19:33, Emmanuel Paradis

Re: [R-sig-phylo] sorry for the wrong link in the previous email Re: boxplots next to phylogeny

2015-07-15 Thread Emmanuel Paradis
Hi Martin. I've modified phydataplot() so that it accepts style = boxplot and style = dotchart too. The version is on GH: https://github.com/emmanuelparadis/phydataplot The boxplot feature requires a data matrix with rownames eventually matching the tip labels. Best, Emmanuel Le

Re: [R-sig-phylo] simulating a labile trait

2015-07-11 Thread Emmanuel Paradis
Hi Glenn Ted, An overview of phylogeny data simulation can be found in the chapter included in Garamszegi's book Modern Phylogenetic Comparative Methods. There is an accompanying page on the book's web site: http://www.mpcm-evolution.org/practice/online-practical-material-chapter-13 This

Re: [R-sig-phylo] Margin Artifact in plot.phylo with Very Long Tip Labels, despite show.tip.label=FALSE

2015-06-22 Thread Emmanuel Paradis
Hi, David: thanks for the report. Liam: thanks for the fix. I modified it slightly: if (is.character(alp)) { tmp - max(xx.tips) if (show.tip.label) tmp - tmp * 1.5 } else { I did the same correction a few lines below in the function for the y-limit with

Re: [R-sig-phylo] Missing States in ML Reconstruction of Discrete Ancestral States (phytools, ape)

2015-06-18 Thread Emmanuel Paradis
Hi David Liam. You can fit a model with unobserved states with ace() because it considers the levels of 'x', not the observed states. You may set the levels of x with the function of the same name: x - factor(sample(2, size = 30, replace = TRUE)) levels(x) - LETTERS[1:3] table(x) x A B

Re: [R-sig-phylo] collapse.singles() can be confused by node numbering (Was: Bug in reorder.phylo() (related to cleaning phylo objects))

2015-06-18 Thread Emmanuel Paradis
for collapse.singles (or a similar fix; my code probably isn't very efficient) in ape? -Dave On Mon, Jun 15, 2015 at 9:29 AM, Emmanuel Paradis emmanuel.para...@ird.fr wrote: Hi David, collapse.singles() seems to work correctly if the phylo object is correctly conformed. Some features of this class may seem

Re: [R-sig-phylo] Bug in reorder.phylo() (related to cleaning phylo objects)

2015-06-16 Thread Emmanuel Paradis
___ Brian O'Meara Assistant Professor Dept. of Ecology Evolutionary Biology U. of Tennessee, Knoxville http://www.brianomeara.info Postdoc collaborators wanted: http://nimbios.org/postdocs/ Calendar: http://www.brianomeara.info/calendars/omeara On Mon, Jun 15, 2015 at 11:29 AM, Emmanuel Paradis

Re: [R-sig-phylo] Links are not drawn properly

2015-06-12 Thread Emmanuel Paradis
Hi Alex, Try to increase the space between the trees (see the example in ?rotateConstr). Cheers, Emmanuel Le 10/06/2015 15:52, Aleksey Jironkin a écrit : Hi, I have been struggling to get the links drawing properly on largeish cophyloplot. I got the diagonal links to work on sample

Re: [R-sig-phylo] Converting species cladogram to dendrogram for heatmap with R

2015-06-05 Thread Emmanuel Paradis
Hi Anand, After saving your Newick string in the file 'Anand.tre', I did: source(https://raw.githubusercontent.com/emmanuelparadis/checkValidPhylo/master/checkValidPhylo.R;) tr - read.tree(Anand.tre) checkValidPhylo(tr) Starting checking the validity of tr... Found number of tips: n = 48

Re: [R-sig-phylo] Map traits on phylogenetic tree - issue with aligning the trait symbols

2015-05-23 Thread Emmanuel Paradis
Hi Christine, Have you try the function phydataplot? It seems you are interested by style = bars or image. HTH Best, Emmanuel Le 23/05/2015 06:04, Christina T a écrit : Hello, I am currently trying to prepare a phylogenetic tree for a post and I want to map three traits to each tip label

Re: [R-sig-phylo] chronos function

2015-05-07 Thread Emmanuel Paradis
Hi Francisca, The scale of the branch lengths of the chronogram should be defined by the calibration points provided to chronos(). Maybe you used the default (age = 1 at the root) so that the branch lengths are (logically) all less than one. Best, Emmanuel Le 06/05/2015 15:40, Francisca

Re: [R-sig-phylo] Speciation and extinction rates with clade data - am I doing this right?

2015-04-27 Thread Emmanuel Paradis
Hi Jostein, Le 27/04/2015 14:44, Jostein Gohli a écrit : Hi, I have some questions about the method from this paper: Paradis et al. (2013) Quantifying variation in speciation and extinction rates with clade data. DOI: 10./evo.12256 #Some hypothetical data: SpeciesCount -

Re: [R-sig-phylo] PGLS transformations

2015-04-13 Thread Emmanuel Paradis
if I needed to do something prior to transforming and analysing the tree. Thank you very much. Best regards, Sérgio. ᐧ 2015-04-13 17:17 GMT+01:00 Emmanuel Paradis emmanuel.para...@ird.fr mailto:emmanuel.para...@ird.fr: Hi Sérgio, There is indeed generally a relationship between branch

Re: [R-sig-phylo] PGLS transformations

2015-04-13 Thread Emmanuel Paradis
Hi Sérgio, There is indeed generally a relationship between branch length transformations and correlation structures. You may check that with the function vcv2phylo, e.g.: tr - rcoal(20) co - corGrafen(1, phy = tr) ts - vcv2phylo(vcv(co)) all.equal(tr, ts) [1] FALSE

Re: [R-sig-phylo] rotate nodes to match taxonomic order

2015-04-08 Thread Emmanuel Paradis
Hi Jacob, Can you send an example of your output with rotateConstr()? Thanks. Best, Emmanuel Le 08/04/2015 06:41, Jacob Berv a écrit : Hi all, Is there an easy way to get R to automatically rotate the nodes of a phylogeny to match an arbitrary ordering of the tips? Consider the following

Re: [R-sig-phylo] Rooting on a node with resolve.root = TRUE

2015-04-07 Thread Emmanuel Paradis
Hi all, There is indeed a bug in root(), but there seems to be an ambiguity which needs to be solved: I think Luiz's command should give an error for the reason I try to explain below. As written in the help page, the option 'node' is an alternative to 'outgroup': node: alternatively,

Re: [R-sig-phylo] dangerous tree

2015-03-10 Thread Emmanuel Paradis
Hi, Liam is right. Some months ago, I wrote a function to help diagnose this kind of problem. I've put it on GitHub: https://github.com/emmanuelparadis/checkValidPhylo However, in the present case, it won't tell you where is the problem in your Newick string. Best, Emmanuel Le

Re: [R-sig-phylo] identifying bipartitions by numbers

2015-01-30 Thread Emmanuel Paradis
Hi Krzysztof, The composition of the splits are obtained with bitsplits(phy). You can print them with more details after converting in the class prop.part with as.prop.part(). The development version of ape (3.2-0.2) has an improved plot() method for this class. HTH Best, Emmanuel Le

Re: [R-sig-phylo] advice about diversification analyses

2015-01-09 Thread Emmanuel Paradis
Hi Karla, You may consider using the methods we developed in this paper: Paradis E., Tedesco P. A. Hugueny B. 2013. Quantifying variation in speciation and extinction rates with clade data. Evolution 67: 3617–3627. The associated R code is available on-line as SI of the paper. Best,

Re: [R-sig-phylo] overall p-value from multiple PGLS regression

2014-11-10 Thread Emmanuel Paradis
Hi Pascal, See ?anova.gls. HTH Emmanuel Le 08/11/2014 17:49, Pascal Title a écrit : Hi all, I am running a number of PGLS regressions, some of which are multiple regressions. I am using the nlme package with the corBrownian error structure. If I build a model M via multiple regression, then

Re: [R-sig-phylo] Potential glitch in phymltest

2014-11-08 Thread Emmanuel Paradis
Hi Luiz, Thanks for the fix. It will be in the next release. Cheers, Emmanuel Le 07/11/2014 20:42, Luiz Max Carvalho a écrit : Hello Phylofolks, I've been using ape::phymltest() for a while now on a project and I just realised there is a potential glitch in the function. The reason is that

[R-sig-phylo] new version system for ape

2014-10-24 Thread Emmanuel Paradis
Dear all, There is a new system of package version for ape. A package repository has been set up at ape-package.ird.fr hosting testing versions as sources and Windows binaries (also for pegas and coalescentMCMC). The version numbers of the testing packages are always higher than the current

Re: [R-sig-phylo] Random sampling of branch lengths

2014-09-25 Thread Emmanuel Paradis
Hi, compute.brtime() can use a set of pre-calculated branching times (the default is indeed a set of coalescent times), for instance: tr - read.tree(text = (A,(((B,C),D),E));) compute.brtime(tr, method = 4:1/4) will produce a tree with root time = 1 and regular inter-node times. Best,

Re: [R-sig-phylo] problem with write.nexus.data

2014-09-24 Thread Emmanuel Paradis
Hi Liam and Nicholas. write.nexus.data() accepts only lists as specified in the help page, but it's a bit of an anomaly since the same help page says the sequences must be aligned. I have modified this function so that it now accepts both lists and matrices. Best, Emmanuel Le 18/09/2014

Re: [R-sig-phylo] Trying to read a tree with numerical node labels, but without edge length

2014-08-30 Thread Emmanuel Paradis
Hi Liam and others, read.nexus() can read NEXUS files that have no TRANSLATE block. There are two problems with this file: the extra spaces between begin.../end and the semicolon, and the linebreak between the tree declaration and the Newick string. So the following file can be read by

Re: [R-sig-phylo] convergence in compar.gee (ape)

2014-08-14 Thread Emmanuel Paradis
Dear Sereina, The number of iterations is not output by default. You can modify the function with fix(compar.gee), find this line: geemod - do.call(gee, list(formula, and insert this command after it: cat(number of iterations:, geemod$iterations, \n) save and close. HTH

Re: [R-sig-phylo] Pegas Tajimas Test

2014-06-26 Thread Emmanuel Paradis
Hi Peters, This test cannot be used with 3 sequences. I've added a warning message about this. Best, Emmanuel Le 25/06/2014 12:17, Peters, Stuart a écrit : Hi, I am trying to run the Tajimas.test function from the r package 'Pegas' on a small sample of 3 DNA sequences and I get this

Re: [R-sig-phylo] cophyloplot: how to marks links differently

2014-05-28 Thread Emmanuel Paradis
Hi Juan, cophyloplot() has the options col, lwd, and lty which specify the aspects of the association lines. Le 27/05/2014 16:09, Juan Antonio Balbuena a écrit : Hello This is a simple question and hope that there is a simple answer. Plotting a tanglegram, I would like to write a function

Re: [R-sig-phylo] Distances from nods to the root.

2014-05-21 Thread Emmanuel Paradis
Alexey, See ?dist.nodes in ape. If your tree is named tr, you'll get exactly what you want with: dist.nodes(tr)[, Ntip(tr) + 1] which extracts one column of the matrix returned by dist.nodes. best, Emmanuel Le 21/05/2014 06:56, Alexey Fomin a écrit : Which package allow calculate all

Re: [R-sig-phylo] plot bars across tips of a circular phylogeny

2014-05-14 Thread Emmanuel Paradis
Hi Matt, See ?phydataplot in ape. This has a couple of examples. Best, Emmanuel Le 14/05/2014 16:44, Matthew Helmus a écrit : Hi all, Does anyone know of R code (or perhaps another program) to plot bars across the tips of a radial/fan phylogeny? Specifically, I have a large phylogeny and a

Re: [R-sig-phylo] adjacency matrix / edgelist from igraph into a phylo class

2014-05-12 Thread Emmanuel Paradis
Hi Wesley, You are right: this definition is out-dated. Have a look at: http://ape-package.ird.fr/ in the 'Development' section, there is a document explaining the structure of the class phylo. Also the second edition of APER has been updated on this point. Best, Emmanuel Le 12/05/2014

Re: [R-sig-phylo] What order are the tips of a tree plotted in?

2014-05-06 Thread Emmanuel Paradis
Hi Henry, I suppose the two trees do not have the same topology (otherwise there would be no difficulty). Have you considered using rotateConstr() on the second tree? That'd be something like: tree2 - rotateConstr(tree2, tree1$tip.label) The node numbering won't be changed, so you can still

Re: [R-sig-phylo] Difference running Rscript vs source with ape library

2014-05-03 Thread Emmanuel Paradis
Hi Carlos, I tested your script in both ways and it may work or fail depending on the tree which is generated. However, it seems that failure is more frequent with source (about 70%) than with Rscript (about 40%). One possible explanation for this may be that the random number generator

Re: [R-sig-phylo] Phylogenetic regression available in R (Grafen, 1989)

2014-03-07 Thread Emmanuel Paradis
Hi Gustavo, Grafen's method is partially implemented in ape. The function corGrafen defines a correlation structure according to Grafen's method (see ?corClasses for all corStruct defined in ape). When used with nlme::gls this makes possible to estimate the parameter of the branch length

Re: [R-sig-phylo] ape package gives 'Error in FI[i]:LA[i] : NA/NaN argument'

2014-02-27 Thread Emmanuel Paradis
Hi Matt, This is because this accession number does not point to the sequence. For this particular one, you could use: seq1 - read.GenBank(U00096.3) Best, Emmanuel Le 27/02/2014 01:35, Matt Curcio a écrit : Greetings all,, I received this error while using R version 2.15.1 and ape 3.0.11.

Re: [R-sig-phylo] Warning messages if using family=poisson in compar.gee, and changing link function

2013-12-19 Thread Emmanuel Paradis
Hi Nina, Don't confound warning with error. If you have the former, then R certainly didn't crash. These warnings seem to come from the fact that the model fitting did not converge after the default number of iterations. Unfortunately, this cannot be controlled from compar.gee, so you can

Re: [R-sig-phylo] Using the function mst in APE to produce coloured graphs

2013-12-18 Thread Emmanuel Paradis
Hi, Try mst() in pegas. It returns an object of class haploNet with a more flexible plot method. Best, Emmanuel -Original Message- From: Stefani stef...@irsa1.irsa.cnr.it Sender: r-sig-phylo-boun...@r-project.org Date: Wed, 18 Dec 2013 17:35:26 To: r-sig-phylo@r-project.org Subject:

Re: [R-sig-phylo] plotting support value

2013-12-16 Thread Emmanuel Paradis
Hi Thomas, Have you tried prop.clades? Best, Emmanuel -Original Message- From: Thomas Manke ma...@ie-freiburg.mpg.de Sender: r-sig-phylo-boun...@r-project.org Date: Mon, 16 Dec 2013 11:52:33 To: r-sig-phylo@r-project.org Subject: [R-sig-phylo] plotting support value Dear Forum, I have

Re: [R-sig-phylo] Mismatch distribution (pegas): expected versus empirical and other questions

2013-12-11 Thread Emmanuel Paradis
Hi David, Thanks for this. I have included it into pegas with an option to select the types of lines, and the legend is moved to the top of the plot. I'll release this new version by the end of the year. I'm taking this opportunity to advertise the last version of coalescentMCMC (0.4) which

Re: [R-sig-phylo] About function .getSEs

2013-11-15 Thread Emmanuel Paradis
Hi, From R: ape:::.getSEs You can also get the code from the sources on CRAN. Best, Emmanuel --Original Message-- From: Tane Kim Sender: r-sig-phylo-boun...@r-project.org To: r-sig-phylo@r-project.org Subject: [R-sig-phylo] About function .getSEs Sent: 16 Nov 2013 02:54 Hi,I have

Re: [R-sig-phylo] match two tree edges

2013-11-11 Thread Emmanuel Paradis
Hi, Have a look at the function makeNodeLabel with the option method = md5sum: it will create a label to each node depending on the tips descending from it. You can then use them to match nodes and edges of different trees. Best, Emmanuel -Original Message- From: Jingchun Li

Re: [R-sig-phylo] Problems with bootstraps of NJ tree from SSRs data

2013-10-16 Thread Emmanuel Paradis
Le 16/10/2013 00:20, Vojtěch Zeisek a écrit : Hi, Emmanuel, thank You very much! Dne Út 15. října 2013 21:45:12, Emmanuel Paradis napsal(a): Hi Vojtěch, Le 14/10/2013 23:14, Vojtěch Zeisek a écrit : Hello, I know this is FAQ, but I still haven't found solution, which would work for me

Re: [R-sig-phylo] most efficient way to read trees from huge text file

2013-10-10 Thread Emmanuel Paradis
Hi, Le 10/10/2013 21:07, Juan Antonio Balbuena a écrit : Hello, I need to handle in R 10M trees produced with the program evolver of PAML. With a smaller number of trees one could create a multi-phylo object with ape as tree.m - read.tree(filename.tre) but this is impractical in this case

Re: [R-sig-phylo] selecting sequences from an alignment

2013-10-05 Thread Emmanuel Paradis
Hi, What about this: match(selected, rownames(woodmouse)) ? If this is not what you want yet, please give an example of the output you wish to get. Best, Emmanuel -Original Message- From: john d dobzhan...@gmail.com Sender: r-sig-phylo-boun...@r-project.org Date: Sat, 5 Oct 2013

Re: [R-sig-phylo] Substitute for functions on the laser package

2013-09-04 Thread Emmanuel Paradis
Hi Mariana, You may try the function bd.time in ape. The companion paper gives examples similar to what laser does. Best, Emmanuel -Original Message- From: Mariana Vasconcellos marian...@utexas.edu Sender: r-sig-phylo-boun...@r-project.org Date: Tue, 3 Sep 2013 23:20:17 To: Liam J.

Re: [R-sig-phylo] rooting multiple trees

2013-08-07 Thread Emmanuel Paradis
Hi Silvia, Check the help page of root(): it says the tree is unrooted before before being rooted. So your 2nd output is as expected. See the options of this function to resolve the root. For the 1st method, I think you should not do unclass(). best, Emmanuel -Original Message- From:

<    1   2   3   4   >