Re: [R-sig-phylo] Phylogenetic network / ARG representation in ape

2021-05-21 Thread Yan Wong
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, ... The only constraint is that it must be numeric.
> 
>> As a corollary, there doesn’t
>> appear to be any built-in function to enforce the constraint that those edges
>> that are valid at any one genomic location form a marginal (or “local”) tree.
> 
> That's the logic of the S3 class system: it's up to you to add elements, 
> functions, checks, etc, that are relevant to your project/questions. See for 
> instance, the tree output by ape::chronos which has the class c("chronos", 
> "phylo"). You can find another strategy in phangorn which can fit partioned 
> models of molecular evolution: in that case each partition of the genome has 
> its own "phylo" tree (the topology can differ among partitions).
> 
>> Is my reading of this correct, and are there any R packages which go any way 
>> to
>> representing marginal trees along a genome in this way?
> 
> Not that I aware of.
> 
>> I ask partially because we are starting to document simple details of how to 
>> run
>> our tree-sequence software in R, via the reticulate package
>> (https://tskit.dev/tutorials/tskitr.html), and it would be useful to know if 
>> we
>> could convert our tree sequences (a format which can be thought of as an ARG)
>> into a format with a suitable representation in R. We might then be able to
>> take advantage of any nice R-based visualisation or analysis packages.
> 
> phangorn has other tools to represent/plot networks with its class "networx".
> 
> Best,
> 
> Emmanuel
> 
>> Cheers
>> 
>> Yan
>> ___
>> 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 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] Phylogenetic network / ARG representation in ape

2021-05-18 Thread Yan Wong
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 way to specify which pieces of a 
genome pass though which edges in the network. As a corollary, there doesn’t 
appear to be any built-in function to enforce the constraint that those edges 
that are valid at any one genomic location form a marginal (or “local”) tree. 
Is my reading of this correct, and are there any R packages which go any way to 
representing marginal trees along a genome in this way?

I ask partially because we are starting to document simple details of how to 
run our tree-sequence software in R, via the reticulate package 
(https://tskit.dev/tutorials/tskitr.html), and it would be useful to know if we 
could convert our tree sequences (a format which can be thought of as an ARG) 
into a format with a suitable representation in R. We might then be able to 
take advantage of any nice R-based visualisation or analysis packages.

Cheers

Yan
___
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] Multi2di still not generating equiprobable trees

2020-10-19 Thread Yan Wong
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 <- do.call(c, lapply(1:10, function(x) 
+  multi2di(starTree(c('a','b','c','d')), equiprob=TRUE)))
> balanced = read.tree(text="((a,c),(b,d));”) # test one of 15 4-tomy 
> resolutions
> test <- sapply(reps, function(x) RF.dist(x, balanced, rooted=TRUE) == 0)
> mean(test) # should be ~ 1/15 ~ 0.0667
[1] 0.16625

By the way, there is a spelling mistake on the ape homepage too ("ape souce 
code” - is missing an “r” in “source”).

Cheers

Yan
[[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] Breaking polytomies such that all topologies are equiprobable

2020-06-29 Thread Yan Wong
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

> On 29 Jun 2020, at 13:34, Martin R. Smith  wrote:
> 
> Dear Yan,
> 
> I had assumed that `multi2di` (and `rtree`) sampled tree topologies with 
> equal probability – thanks for bringing to my attention that this is not the 
> case!  I should have read the 'ape' documentation more carefully...
> 
> I have added the functions `RandomTree()` and `MakeTreeBinary()` to my 
> 'TreeTools' package, which sample binary trees from the uniform distribution 
> as you desire.
> 
> Until the next CRAN release of the package, you can download the development 
> version with
> 
> ```
> devtools::install_github('ms609/TreeTools')
> ```
> 
> Then you can go:
> 
> ```
> library('TreeTools')
> structure(lapply(1:10, function(x) 
> MakeTreeBinary(StarTree(c('a','b','c','d'))), class = 'multiPhylo')
> ```
> 
> I hope this works for you – do let me know how you get on.
> 
> - Martin
> 
> --
>  
> Dr. Martin R. Smith
> Assistant Professor in Palaeontology
> Durham University
> Department of Earth Sciences
> Mountjoy Site, South Road, Durham, DH1 3LE United Kingdom
>  
> T: +44 (0)191 334 2320
> M: +44 (0)774 353 7510
> E: martin.sm...@durham.ac.uk 
>  
> community.dur.ac.uk/martin.smith 
> twitter.com/PalaeoSmith 
[[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] Breaking polytomies such that all topologies are equiprobable

2020-06-27 Thread Yan Wong


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 topologies to be generated 
if need be, although that’s obviously more work.

In my use case I could easily have polytomies with thousands or tens of 
thousands of edges, so the algorithmic approach is much more suitable than the 
enumerative one, and thanks for the tips on making it work. But on the topic of 
enumeration, an extremely capable student of ours has been working out ways of 
using integer partitions to enumerate topologies, even for very large trees, 
and sampling from a list of tree ranks, then unranking the result, would 
probably be a lot more scalable than actually creating the trees using allTrees 
(our treatment is in Python, however, and we haven’t published it yet: details 
in https://tskit.readthedocs.io/en/latest/combinatorics.html). I’d be 
interested in knowing what prior art there is in this area, and if what our 
student has done is of any use to APE? The concepts scale quite well to 
mid-sized trees, and there are also separate applications to trees with 
millions of tips (which we occasionally have to deal with). 

Cheers

Yan

> On 27 Jun 2020, at 10:33, Emmanuel Paradis  wrote:
> 
> Hi Yan,
> 
> multi2di() calls rtree() if random = TRUE. As you rightly guessed, the 
> algorithm used by this latter function is (described in APER2, p. 313):
> 
> 1. Draw randomly an integer a on the interval [1, n − 1]. Set b = n − a.
> 2. If a > 1, apply (recursively) step 1 after substituting n by a.
> 3. Repeat step 2 with b in place of a.
> 4. Assign randomly the n tip labels to the tips.
> 
> This is indeed results in unequal frequencies of the possible topologies. If 
> step 1 "n − 1" is replaced by "floor(n/2)", then all topologies are generated 
> with equal probability.
> 
> Practically, I see two possibilities for you. If pratical, you generate a 
> list with all possible topologies, for instance with phangorn's function 
> allTrees:
> 
> R> library(phangorn)
> R> TR <- allTrees(4, rooted = TRUE)
> R> TR
> 15 phylogenetic trees
> 
> Then you just draw randomly some integers between 1 and 15 and use them as 
> indices:
> 
> R> s <- sample.int(length(TR), size = 1e5, replace = TRUE)
> R> TR[s]
> 10 phylogenetic trees
> 
> If you want, you can play with the option 'prob' of sample.int().
> 
> The other solution is to make copies of rtree() and multi2di() in your 
> workspace: only rtree() needs to be modified and only where sample.int() is 
> called in the recursive function foo. You also need to copy multi2di() even 
> unchanged because of the package's namespace.
> 
> HTH
> 
> Best,

___
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] Breaking polytomies such that all topologies are equiprobable

2020-06-26 Thread Yan Wong
I’m trying to figure out how to randomly resolve polytomies such that there is 
an equal probability of any topology being generated. I thought that the ape 
function “multi2di” did this, but when I have tried it repeatedly with a 
4-tomy, multi2di seems to produce the 3 balanced trees [((a,b),(c,d)) ; 
((a,c),(b,d)); ((a,d),(b,c))] twice as often as the 12 possible unbalanced 
dichotomous 4-tip rooted topologies. The R code I’ve used to produce the sample 
topologies is something like this:

do.call(c, lapply(1:10, function(x) multi2di(starTree(c('a','b','c','d')

Firstly, is this expected, or am I doing something wrong (if expected, it would 
be useful to note this in the docs)? Secondly, is there an function somewhere 
that *will* break polytomies to produce equiprobable topologies? If not, 
thirdly, is there an algorithm that will do this? I think the standard 
“repeatedly pick 2 random edges from the polytomy node and pair them off” 
results in the non-equiprobable distribution that I find using multi2di. I 
think I’ve found a similar problem with the Dendropy algorithm, which does 
claim to result in equiprobable topologies, and have posted to their mailing 
list 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-phylo@r-project.org/


Re: [R-sig-phylo] Specifying a polytomy at the root with no outgroup

2018-01-20 Thread Yan Wong
Thanks so much. That’s perfect. I will update my question at 
https://www.biostars.org/p/294222/ so it is documented somewhere.

Cheers

Yan

On 20 Jan 2018, at 16:08, Emmanuel Paradis <emmanuel.para...@ird.fr> wrote:

> Hi,
> 
> To get a tree with a basal multichotomy as a rooted tree, you have to set its 
> root edge:
> 
> R> tr <- read.tree(text = "(A,B,(C,D));")
> R> is.rooted(tr)
> [1] FALSE
> R> tr$root.edge <- 0
> R> is.rooted(tr)
> [1] TRUE
> 
> This could be done directly in the Newick string:
> 
> R> 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,(C,D));
>> ((A,B),(C,D));
>> These are not treated as rooted by default, so I have tried to root them 
>> using
>> root(tree, node = Ntip(phy) + 1, resolve.root = TRUE), but this gives an 
>> error, explained here:
>> https://www.mail-archive.com/r-sig-phylo@r-project.org/msg03805.html
>> Note that in my case there is no particular reason to specify either A, B, 
>> or (C,D) as an outgroup
>> I should explain that what I am trying to do is to calculate distance 
>> metrics between these trees (using metrics that are valid with polytomies, 
>> such as the KC metric), such that the pairwise distances between (A,B,(C,D)) 
>> and (B,A,(C,D)) and ((C,D), B, A) etc are all 0, but the distance between, 
>> say, (A,B,(C,D)) and ((A,B),(C,D)) or perhaps (A,C,(B,D)); is not zero.
>> So how can I specify a polytomy at the root, with the tree 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/
>> Pour nous remonter une erreur de filtrage, veuillez vous rendre ici : 
>> http://f.security-mail.net/304anPlLmqF

___
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] Specifying a polytomy at the root with no outgroup

2018-01-19 Thread Yan Wong
Hi

I have a set of rooted trees, some of which have polytomies at the root, like

(A,B,(C,D));
((A,B),(C,D));

These are not treated as rooted by default, so I have tried to root them using

root(tree, node = Ntip(phy) + 1, resolve.root = TRUE), but this gives an error, 
explained here:

https://www.mail-archive.com/r-sig-phylo@r-project.org/msg03805.html

Note that in my case there is no particular reason to specify either A, B, or 
(C,D) as an outgroup

I should explain that what I am trying to do is to calculate distance metrics 
between these trees (using metrics that are valid with polytomies, such as the 
KC metric), such that the pairwise distances between (A,B,(C,D)) and 
(B,A,(C,D)) and ((C,D), B, A) etc are all 0, but the distance between, say, 
(A,B,(C,D)) and ((A,B),(C,D)) or perhaps (A,C,(B,D)); is not zero.

So how can I specify a polytomy at the root, with the tree 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/


Re: [R-sig-phylo] Rooting a tree with a basal polytomy

2017-02-07 Thread Yan Wong
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 seq_along(phy)) phy[[i]]$root.edge <- 0

___
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] Rooting a tree with a basal polytomy

2017-02-07 Thread Yan Wong
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 ‘force.rooted’ option to 
any of the tree reading routines that I can see.

Cheers

yan
___
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] multi2di fails on multiPhylo objects

2017-01-13 Thread Yan Wong
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)
> and it should work. You have to recompile ape afterwards. 

By the way, is this likely to make it into a new release soon, or is there a 
dev version I can access somehow? I need to roll this out across a number of 
different computers, some of which I don’t have admin access to.

Yan
___
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] multi2di fails on multiPhylo objects

2017-01-13 Thread Yan Wong

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)
> and it should work. You have to recompile ape afterwards. 

That’s great, thanks.

Yan
___
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] multi2di fails on multiPhylo objects

2017-01-13 Thread Yan Wong
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 Michonneau  
wrote:

> Hi Yan,
> 
>  I'm not sure about what's going on here, but it works with the rncl
> package (http://cran.r-project.org/web/packages/rncl/index.html)
> 
>  install.packages("rncl")
>  library(rncl)
>  n <- read_nexus_phylo("tmp.nex")

___
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] multi2di fails on multiPhylo objects

2017-01-13 Thread Yan Wong
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 <- read.nexus("tmp.nex")
> multi2di(n)
Error in .reorder_ape(x, order, index.only, length(x$tip.label), io) : 
  tree apparently badly conformed

What am I doing wrong?
___
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] Tree plotting (and maybe others) are borked when a node label is '0'

2017-01-04 Thread Yan Wong

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 thinking about 
adding a force.multi option to read.nexus, is it worth also adding a 
tip.labels.start.at.zero option to read.nexus too, and just adding that little 
code snippet right at the end of the the read.nexus code?

Yan
___
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] Force read.nexus() to return a multiPhylo object, even if there is only one tree

2016-12-27 Thread Yan Wong

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:
> 
>if (FALSE) {
> 
> save and close. Tell me if you still have problem.

Yes, that works fine. Thanks a lot.

Yan
___
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] Force read.nexus() to return a multiPhylo object, even if there is only one tree

2016-12-27 Thread Yan Wong
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 simulations, the nexus file has 
only a single tree in it. In this case, read.nexus returns not a multiPhylo 
object, but a single tree, with the name of the tree lost. I wonder if it would 
be sensible to have a force.multi option to read.nexus(), by default set to 
FALSE (to retain compatibility), but which, if set to TRUE, returns a 
multiPhylo object even if there is only one tree in the file?

Yan
___
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] compressTipLabel as an option to read.trees()

2016-12-14 Thread Yan Wong

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 was doing wrong. I used a BEGIN TAXA;TAXLABELS ... END; block, 
rather than a TRANSLATE block within the TREES block. The read.nexus() function 
now works as Joseph Brown surmised. So the easiest way for me to do this is 
simply to use a nexus format trees file.

Thanks

Yan
___
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] compressTipLabel as an option to read.trees()

2016-12-14 Thread Yan Wong

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 running .compressTipLabel. 
However, when I then do .compressTipLabel() it only takes a moment. My guess is 
this is something to do with skipping the renumbering process. It would be nice 
to have the option in both read.nexus and read.tree, so that I don’t have to 
allocate memory (many GB in my case) for the intermediate step.

Thanks

Yan
___
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] compressTipLabel as an option to read.trees()

2016-12-14 Thread Yan Wong
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 
process by passing an option to read.trees() to specify that the tip labels are 
the same in each tree in the multiPhylo object. Has anyone implemented such an 
option?

Cheers

Yan
___
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/