SCM

[#418] Remove dependencies from ape in readNexus

Date:
2009-04-21 15:22
Priority:
3
State:
Open
Submitted by:
François Michonneau (francois)
Assigned to:
François Michonneau (francois)
Target Version:
None
Summary:
Remove dependencies from ape in readNexus

Detailed description
Currently we depend from 3 ape functions when we import trees in NEXUS format. It might be a good idea to include directly these functions within phylobase.

Comments:

Message  ↓
Date: 2009-04-23 02:55
Sender: Brian O'Meara

For what it's worth, I agree with François that it would be good to remove ape dependency (forgot to mention this).

Date: 2009-04-23 02:49
Sender: Brian O'Meara

Originally, NCL just stored trees as newick strings (still does as one of the options). There are now options for parsing the tree on load. It is stored as a vector of node objects (with things like edge lengths), leaves, and other info (see <http://ncl.svn.sourceforge.net/viewvc/ncl/branches/v2.2/ncl/nxstreesblock.h?revision=433&view=markup>).

NCL doesn't have a lot of tree parsing stuff, but there is some. We already use C++ code on the NCL side to do a lot of the processing to get data into phylobase. RCpp (at least with the version used during the hackathon) had a very limited set of kinds of objects that could be passed from C++ to R, so at least one place we create a string of R code on the C++ side and then eval it in R to get the data structures. We could add tree parsing on the C++ side to and do a similar trick (though chime in if you know better ways of doing this).

Date: 2009-04-23 00:18
Sender: François Michonneau

Actually NCL is used to extract from the nexus file the string of characters which matches to the tree. However, phylobase uses ape's functions to parse this string of character into a phylo(4) object. One of these function in written in C, the other 2 in R. In my experience, readNexus is really fast even for big files.

I just thought it would be good idea to package these functions as part of phylobase.

Date: 2009-04-22 18:58
Sender: Peter Cowan

Is there a way to move some of this functionality to NCL? What format does NCL store trees in internally? Can we get NCL to parse the nexus and then convert from that data structure to a phylo4?

Attached Files:

Changes

No Changes Have Been Made to This Item

Thanks to:
Vienna University of Economics and Business Powered By FusionForge