tests/testthat/newick_notes.md

The Newick format

There are a bunch of newick readers out there, and little description of the format.

The closest thing to a "formal" description is the page here: http://evolution.genetics.washington.edu/phylip/newicktree.html

Neither ape's read.tree() nor phylip's treeread() will read unifurcations, but phytools' read.nexus will.

Test suite:

I would like to be able to parse a wide range of trees, as a test. Could start with the Harmon trees, but do others too. This could be kept separate from the rest of the tests, and grabbing files from dryad etc.

On my computer, I have a file with comments for testing: nescent/ksi/proteaceae/

Performance

The tree parser in the current tests is very slow; it takes about .4s to read a 200 taxon tree, wheras ape takes 0.02s (so 20x slower). Writing is even worse; ape takes 0.015s but we take 1.1s.

Here it is clear that it is the translation overhead killing us; This will be a problem is we want really super fast access and a few careful Rcpp::Function calls might be better than the big heavyweight things that I currently have.

Rprof()
for (i in 1:5)
  tr <- read.newick(str)
Rprof(NULL)
summaryRprof()


richfitz/forest documentation built on May 27, 2019, 8:17 a.m.