_
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
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
<-1+phy$edge[phy$edge>10]
#let's jumble the node IDs a little
phy$edge[phy$edge==12]<-0
phy$edge[phy$edge==13]<-12
phy$edge[phy$edge==0]<-13
phy$edge<-rbind(phy$edge,c(11,13))
storage.mode(phy$edge)<-"integer"
checkValidPhylo(phy)
#let's try collapsing nodes
phy1<-colla
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 non-horizont
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
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 15
messages:
1: In min(o$out) : no non-missing arguments to min; returning Inf
2: In max(o$out) : no non-missing arguments to max; returning -Inf
I wonder what goes wrong.
Best,
Martin
On 15 July 2015 at 16:29, Emmanuel Paradis mailto:emmanuel.para...@ird.fr>> wrote:
Hi Martin.
I
Hi Sérgio,
In phytools, lambda is constrained to be positive, not in ape. A
negative value of lambda is the consequence of closely related species
being more dissimilar than expected under phylogenetic dependence
(lambda = 1) or under independence (lambda = 0). This can be interpreted
biologi
Hi David,
Here is a fix for drop.tip (line numbers refer to the source file
drop.tip.R):
229,231c229,230
< ## executed from right to left, so newNb is modified before phy$edge:
< phy$edge[sndcol, 2] <- newNb[phy$edge[sndcol, 2]] <-
< (n + 2):(n + phy$Nnode)
---
> newNb[sort
Hi Sérgio,
If by "anova SS II" you mean "testing an effect while including other
significant effect(s) in the model", then this is usually done with the
generic function drop1, but there is no method drop1.gls in nlme. So you
have to do it by hand, eg:
m1 <- gls(y ~ a + b + x,
m2 <- gls
NodeLabels(tree,tree1)
testNodeLabels(tree,tree2)
testNodeLabels(tree,tree3)
testNodeLabels(tree,tree3,plot=TRUE)
########
Additionally, could you send the full revised source file? I have to
admit, I always get lost looking for ape's newest source files
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 Para
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 =
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:
http://www.mpcm-evolution.org/practice/online-practical-material-chapter-13/chapter-13-2-traits
Hi Kamila & Klaus,
Another solution could be to use nodelabels(), eg:
plot(nrooted)
nodelabels(text = b$BP)
See the examples in ?nodelabels for some ways to format the labels.
Best,
Emmanuel
Le 31/08/2015 15:57, Klaus Schliep a écrit :
Dear Kamila,
plotBS checks if trees are rooted or not
STA.R";
Best,
Emmanuel
Le 10/09/2015 16:49, Uwe Menzel a écrit :
Emmanuel Paradis writes:
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/20
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 th
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,
Emm
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.
#
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. T
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 named
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 the
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 :
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 som
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 éc
Hi Lev,
After reading the tree:
alllabels <- c(tree$tip.label, tree$node.label)
will give you a vector of labels matching the integers in tree$edge. So
you may do something like:
parent <- alllabels[tree$edge[, 1]]
child <- alllabels[tree$edge[, 2]]
cbind(parent, child)
Best,
Emmanuel
Le
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
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 Sciences
East Tennessee State Uni
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
reas
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
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 (len
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")
an
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
tps://sites.google.com/site/thibautjombart/
https://github.com/thibautjombart
Twitter: @TeebzR <https://twitter.com/TeebzR>
On 22 February 2016 at 09:16, Emmanuel Paradis
mailto:emmanuel.para...@ird.fr>>
wrote:
> Dear all,
>
> A new testin
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?), so
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 function
Hi Christian,
It is difficult to see what's going wrong with your problem. Do you use
a recent version of PhyML? From what I remember about Windows (in case
you use this OS), the filename extensions (here .txt) are not displayed
by the file explorer.
If PhyML has run correctly, you should ha
Hi Fan,
The code of root() was simplified in ape 3.4, so this needs to be
checked carefully. Can you send me this tree (privately)?
Cheers,
Emmanuel
Le 01/04/2016 18:49, Li, Fan a écrit :
Hi all,
I'm using the latest ape version (v3.4) under R 3.2.3 Patched. When I try to
root an unrooted
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 no
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:
obj<-scan(file="Tim
ee. I tried with 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 mailto:emmanuel.para...@ird.fr>>:
Liam is probably right: there seems to
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
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 col
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 li
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)
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 than
t
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 mrc
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 are
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 1
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 gives:
R> .Machine$double.eps^0.5
[1] 1.490116e-08
Best,
Emmanuel
Le 16/08/2016 à 18:15, Klaus Schliep a écrit :
We sh
aus
On Wed, Aug 17, 2016 at 3:04 AM, Emmanuel Paradis
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 gi
ould like to try to contribute to ape. Where 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,
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 écrit
Hi Dan,
You don't need to convert to character to manipulate DNAbin objects: in
fact, woodmouse is a just matrix like others.
R> dim(woodmouse)
[1] 15 965
R> is.matrix(woodmouse)
[1] TRUE
R> dimnames(woodmouse)
[[1]]
[1] "No305" "No304" "No306" "No0906S" "No0908S" "No0909S" "No0910S"
Hi Shai,
Le 06/09/2016 à 10:32, Shai Tal a écrit :
I am currently using ape package to construct genetic trees for my
research, and i am using nj() and mvr() functions
1.i was wondering if there is a way, to create the genetic tree, assuming
that one of the samples, might be an inner node of th
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
tre
the ape authors) for
continuing to maintain and improve ape.
Cheers,
-Dave
On Mon, Oct 3, 2016 at 8:51 AM, Emmanuel Paradis
wrote:
Dear all,
We are planning to introduce a substantial change in ape: several functions
operating on "phylo" objects will be made generic with methods fo
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 p
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 28/1
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
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
mailto:emmanuel.para...@ird.
termined by the genes used to
estimate the tree, given differences in substitution rates among
genes. I do think its important to bear in mind.
Cheers
Alejandro
Alejandro Gonzalez Voyer
Instituto de Ecologia
UNAM
> On Oct 29, 2016, at 2
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
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 s
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 allows
pdate 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 :
Hi Eduardo & Ting-Wen,
ape 4.0 is not yet released. The avai
scarrunz napsal(a):
Hi Emmanuel,
Right! Sorry I misspoke.
Best,
Eduardo
2016-11-11 23:32 GMT+01:00 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
Hi Karla,
I cannot answer to your question on comparing trees with different sets
of labels, but surely dist.topo() should return an error in this
situation. I modified the code to handle this -- it is also much faster
(~ 100 times faster when comparing 100 trees with 100 tips).
And yes, you
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:
R>
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. Brown
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 eff
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
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 & l
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
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 you
Hi Yan,
Yes, you are right: this modification can be done. In the meantime, you
can fix the code with:
fix(read.nexus)
Find this line (#117):
if (Ntree == 1) {
and change it to:
if (FALSE) {
save and close. Tell me if you still have problem.
Best,
Emmanuel
Le 27/12/2016 à 21:15
og: http://blog.phytools.org
On 12/27/2016 5:11 PM, Yan Wong wrote:
On 27 Dec 2016, at 22:08, Emmanuel Paradis
wrote:
Hi Yan,
Yes, you are right: this modification can be done. In the meantime,
you can fix the code with:
fix(read.nexus)
Find this line (#117):
if (Ntree == 1) {
and c
Hi,
You can send your contribution directly to me. See this post for a
recent discussion on how to contribute to ape:
http://www.mail-archive.com/r-sig-phylo@r-project.org/msg04580.htmlra
Sure your contribution will be useful. I've just found out that
read.FASTA crashes R if the FASTA file i
t;^ +", "", names(res)) # to permit phylosim
class(res) <- "DNAbin"
res
}
Le 04/01/2017 à 00:37, Rj Ewing a écrit :
Emmanuel,
Thanks, I've attached a patch containing the changes.
I'm not very familiar with R, so maybe there is a better way to do it.
Hi,
This is a known feature of read.nexus(), see ape's FAQ:
http://ape-package.ird.fr/ape_faq.html#Bayestrees
This explains how to fix the problem.
Best,
Emmanuel
Le 04/01/2017 à 14:46, Yan Wong a écrit :
If I create a test.nex file as follows:
#NEXUS
BEGIN TREES;
TRANSLATE
0 0,
1 1,
2 2,
Hi,
Klaus is right: extract.clade() fails if the tree has been rooted with
resolve.root = TRUE before. I'm going to rewrite the function calling
drop.tip (which will be safer). In the meantime, Klaus's function should
work for Kamila.
Best,
Emmanuel
Le 06/01/2017 à 05:17, Klaus Schliep a é
de <= n)
stop("node number must be greater than the number of tips")
}
if (node == n + 1L) return(phy)
keep <- prop.part(phy)[[node - n]]
drop.tip(phy, (1:n)[-keep], root.edge = root.edge, rooted = TRUE)
}
##########
Hi,
Klaus: thanks for the fix.
There is a development version on ape-package.ird.fr:
http://ape-package.ird.fr/ape_installation.html#versions
This version is 4.0-0.2. The source as well as a Windows version are
avaialble. The list of changes is there:
http://ape-package.ird.fr/NEWS
Best,
Hi Klaus,
Thanks for tracking this. It's fixed.
Best,
Emmanuel
Le 20/01/2017 à 18:41, Klaus Schliep a écrit :
Hi Juan,
it seems that you trim too many taxa.
I can replicate the error message if I trim for example 19 out of a 20 tips
of a tree.
drop.tip(tree, sample(20, 19))
Error in integer(
Hi Sérgio,
It seems your results make good sense. alpha=0 is too far from the
"optimum" value (i.e., the value that maximises the log-lik), so the
optimisation fails to maximise the log-likelihood with respect to this
parameter. It has been written in the literature that it is difficult to
es
Dear Andreas,
There is no distance formula for HKY or GTR model. For GTR, Rodrı́guez
et al. developed a procedure to calculate a distance (also in Yang's
2006 book). An example is given below with the woodmouse:
matlog <- function(x) {
tmp <- eigen(X)
V <- tmp$vectors
U <- diag(lo
Hi,
If you have a single tree (object of class "phylo")
phy$root.edge <- 0
If there are several trees in your NEXUS file (then phy is of class
"multiPhylo"):
for (i in seq_along(phy)) phy[[i]]$root.edge <- 0
Best,
Emmanuel
Le 07/02/2017 à 13:17, Yan Wong a écrit :
Sorry if this is a triv
Hi Salvador,
You first need to define the variables that would be resampled during
the bootstrap procedure. In the case of DNA sequences, this would be the
columns (= sites) of the alignment, since they each contribute to the
distance calculation (or to the likelihod function if you use ML). S
Hi Juan,
This warning seems related to the fact that the trait did not evolve
according to the specified model (i.e., Brownian motion). I simulated
some data with:
tr <- rphylo(50, .1, 0)
x <- rTraitCont(tr)
ace(x, tr)$sigma did not return NA out of 1000 replications. I changed
the
Hi Elizabeth,
Thanks for the report. Apparently, it's enough to add:
if (is.null(p)) p <- 1L
after:
p <- ncol(x)
Best wishes,
Emmanuel
Le 23/05/2017 à 20:31, Elizabeth Purdom a écrit :
Hello,
I am writing to the R-sig-phylo mailing list regarding what seems to be
a bug in the `ph
Elizabeth,
Thanks a lot for the detailed account of this problem. I've just made
these modifications to the code of phydataplot:
1/ Replaced:
lgd <- as.character(ux)
with:
lgd <- sort(as.character(ux))
2/ These two lines:
conames <- names(co)
if (!is.null(conames)) co <- c
Joseph, Klaus,
This is great. I slightly edited the code and renamed the argument
'tips' to 'tip' (as in the original definition). I run on a bunch of
random trees and the results are exactly identical with the current
version of getMRCA. I'm changing the code in ape now.
Cheers,
Emmanuel
ix(~ x)[, -1]
x1 x2 x3
1 1 0 0
2 1 0 0
3 0 1 0
4 0 1 0
5 0 0 1
6 0 0 1
7 -1 -1 -1
8 -1 -1 -1
model.matrix() is called internally by most regression functions (lm,
glm, gee, gls, lme, ...) so the user doesn't have to bother about it,
but it's nice to see how it works.
--
Emmanue
Le 03.06.2008 03:16, Simon Blomberg a écrit :
On Mon, 2008-06-02 at 15:34 +0200, Emmanuel Paradis wrote:
[snip]
R> model.matrix(~ x)[, -1]
x2 x3 x4
1 0 0 0
2 0 0 0
3 1 0 0
4 1 0 0
5 0 1 0
6 0 1 0
7 0 0 1
8 0 0 1
Or even just model.matrix(~ x-1)
... which is
Le 16.06.2008 11:13, Alejandro Gonzalez Voyer a écrit :
Hello:
I was wondering whether the beta coefficients in the GLS analyses in APE are
standardized coefficients or not. If not, is there any problem in
calculating a standardized regression slope by hand, multiplying the
regression slope by t
nexus files into Abouheif's program, I'd love to hear
from you.
It's in ade4. See:
library(ade4)
?PI2newick
?phylog
EP
cheers,
John
___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
--
Emmanuel Paradis
IRD, Montpellier, France
ph: +33 (0)4 67 16 64 47
fax: +33 (0)4 67 16 64 40
http://ape.mpl.ird.fr/
__
,"K")
newlist <- lapply(phylist,
+function(z) {
+z$tip.label <- c("G","H","I","J","K")
+ z
+})
write.tree(newlist,file="newlist")
Error in write.tree(newlist, file = "newlist") :
object "phy" is not of class "phylo"
nks, Emmanuel. I used lapply because the operation (pruning a bunch
of tips
from 1000s of trees) took a long time, but for less intensive jobs, it's
good
to know that the for-loop will not have the effect of discarding the
object's
attributes.
Stacey
Quoting Emmanuel Paradis <[EMAIL PRO
g-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
___
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
--
Emmanuel Paradis
IRD, Montpellier, France
ph: +33 (0)
201 - 300 of 557 matches
Mail list logo