Hi, I am using some of the code from here:
http://tiago.org/cc/2009/11/17/reading-newicknexus-phylogenetic-trees-with-biojava/ to parse nexus phylogenetic tree data. My nexus file is output from MrBayes: ------------------ snip----------------- #NEXUS [ID: 7166567671] begin trees; [Note: This tree contains information on the topology, branch lengths (if present), and the probability of the partition indicated by the branch.] tree con_50_majrule = (27563:0.194008,(6843:0.233188,6960:0.229043)0.98:0.117649,(61985:0.217735,6657:0.275071)0.89:0.089314); [Note: This tree contains information only on the topology and branch lengths (mean of the posterior probability density).] tree con_50_majrule = (27563:0.194008,(6843:0.233188,6960:0.229043):0.117649,(61985:0.217735,6657:0.275071):0.089314); end; -------------------------- snip ------------- the file parses without any error, but when I get a list of vertices, the first one (27563) is missing: def tree = getTree(nexus, 'con 50 majrule') tree.vertexSet().each{ println it } output: 6843 p1 6960 61985 p3 6657 p2 ______________snip ___________ The above code is Groovy, but hopefully is self-explanatory. Is the first node being treated specially because it is the root? If so, can I get it using some other method? Thanks, Martin _______________________________________________ Biojava-l mailing list - [email protected] http://lists.open-bio.org/mailman/listinfo/biojava-l
