Sorry if this is a trivial question, but I have some (rooted) nexus trees with
polytomies at the root. When I read them in using read.nexus() they are treated
as unrooted. What’s the easiest way to tell R that they are intended to be
rooted, even though the root is a polytomy? There’s no
Perfect, thanks.
Yan
On 7 Feb 2017, at 13:40, Emmanuel Paradis wrote:
> 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
On 14 Dec 2016, at 15:33, Joseph W. Brown wrote:
> I wonder if reading in a Nexus file with a translation table bypasses this
> problem?
Cheers,
If I try read.nexus with a TAXLABELS entry, it still (oddly) results in a
multiPhylo structure of the same size as before
On 14 Dec 2016, at 21:06, Emmanuel Paradis wrote:
> 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).
Ah, I see what I
Hi,
I’m reading in a large number of newick trees with the same tips, all from a
single file. If I do trees<-read.trees() followed by trees <-
.compressTipLabel(trees), it reduces the memory footprint well, but takes an
age to run. I can’t help thinking this could be sped up during the reading
On 13 Jan 2017, at 20:37, Klaus Schliep wrote:
> Hi Yan,
>
> it seems we introduced a small bug with making these functions generic.
> Replace in the function .multi2di_ape the line
> phy <- reorder(phy)
> with
> phy <- .reorder_ape(phy, "cladewise", FALSE, n,
Thanks. I think that’s because read_nexus_phylo() doesn’t do .compressTipLabel
automatically
n <- read_nexus_phylo("tmp.nex")
n2 <- .compressTipLabel(n)
multi2di(n2) #this causes an error.
Unfortunately I need the .compressTipLabel functionality really.
Yan
On 13 Jan 2017, at 17:06, François
On 13 Jan 2017, at 20:37, Klaus Schliep wrote:
> Hi Yan,
>
> it seems we introduced a small bug with making these functions generic.
> Replace in the function .multi2di_ape the line
> phy <- reorder(phy)
> with
> phy <- .reorder_ape(phy, "cladewise", FALSE, n, 1L)
If I have a nexus file with multiple trees, and the same tips in each tree, but
some trees with polytomies, like this
#NEXUS
BEGIN TREES;
TRANSLATE
1 1,
2 2,
3 3,
4 4;
TREE A = (((1,2)5,3)6,4);
TREE B = ((1,2,3)6,4);
END;
Then when I try to resolve both trees using multi2di, I get
> n <-
On 4 Jan 2017, at 16:03, Emmanuel Paradis wrote:
> 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.
Oh, sorry. I should have read the FAQ before posting. If you are
Hi
I’m doing some analysis in which I produce a variable number of phylogenetic
trees with the same tips in a nexus file, then import them into R for analysis
(these are trees along a genome). The name of each tree is meaningful (it is a
position along the genome). However, in a few
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 change it to:
>
>
; tr <- read.tree(text = "(A,B,(C,D)):0;")
> R> is.rooted(tr)
> [1] TRUE
>
> Best,
>
> Emmanuel
>
> Le 19/01/2018 à 23:08, Yan Wong a écrit :
>> Hi
>> I have a set of rooted trees, some of which have polytomies at the root, like
>> (A,B,(
format used in R?
Cheers
Yan Wong
Oxford
___
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/
Thanks to Emmanuel for adding the equiprob=TRUE option to multi2di. However,
I’m not convinced that it’s working correctly - I still get more balanced trees
than unbalanced trees in ape 5.4.1
> library(phytools)
> library(phangorn)
> library(ape)
> packageVersion("ape")
[1] '5.4.1'
> reps <-
in case I’m misunderstanding something.
Cheers
Yan Wong
Big Data Institute, Oxford University
___
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
This is extremely helpful, thanks Emmanuel. I think it might be useful to note
this in the documentation for multi2di (or give a pointer to the description),
as it wasn’t obvious to me how to find out this information from within R. Even
better would be an option that allowed equiprobable
Thanks very much Martin. I’m glad that I brought this up (I think the
documentation should probably make this clearer). Your extra functions,
together with the corrected Dendropy code and Emmanuel’s hints, should all be
useful for me to check I’m doing it right for larger trees.
Cheers
Yan
>
Dear R-Sig-Phylo,
I’m interested in representations of ancestral recombination graphs (ARGs).
From my reading of the extended Newick format (G. Cardona et al., 2008), and
the ape/evonet documentation, it appears as if the R-base representations of
phylogenetic networks don't have a standard
Thank you Emmanuel. That’s very helpful.
All the best
Yan
> On 21 May 2021, at 10:04, Emmanuel Paradis wrote:
>
> ...
> Correct. The "phylo" and "evonet" classes ignore whether the (optional)
> vector 'edge.length' represents time, number of mutations/substitions,
> accumulated variance,
20 matches
Mail list logo