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

2016-12-15 Thread Emmanuel Paradis
It seems that .compressTipLabel's running times are proportional to N (number of trees) and to log(n) (n: nb of tips). R> tr <- rmtree(1e4, 1e4) # takes ~5 minutes R> system.time(a <- .compressTipLabel(tr)) utilisateur système écoulé 20.904 0.376 21.275 R>

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

2016-12-14 Thread Klaus Schliep
Hi Yan, Joseph was right. In read.nexus you need a TRANSLATE block, just a TAXLABELS is not enough. Then read.nexus returns the compressed object and is 10x faster to read in (for 1000 trees with 1000 taxa on my machine). There is also the package rncl (Nexus Class Library), it is faster to read

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

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] 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

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

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

[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