[Biojava-l] A question about NexusFile and NewickTreeString

huijieqiao at gmail.com huijieqiao at gmail.com
Tue Dec 15 02:19:37 UTC 2009


Hi all,

I have a NexusFile like this:

#NEXUS

Begin TREES;
    tree test1 = (1,2);
    tree test2 = (B:6.0,(A:5.0,C:3.0,E:4.0)
Ancestor1:5.0,D:11.0);
End;

I can* **traversal all the nodes in tree "test1" with
getTreeAsWeightedJGraphT("test1") and vertexSet().

But **getTreeAsWeightedJGraphT("test2") will through an exception
"org.biojava.bio.seq.io.ParseException: Expecting ), got Ancestor1".

the method "getTree()" doesn't support to traversal all the nodes.

How can I deal with this ?

By the way, how can I extract a subset of a tree (a given named parent node,
such as "Ancestor1")?*



More information about the Biojava-l mailing list