[Biojava-l] reading Nexus files

filip fbielejec at gmail.com
Mon Nov 1 18:59:42 UTC 2010


On Mon, 1 Nov 2010 17:39:03 +0000
Tiago Antão <tiagoantao at gmail.com> wrote:

> Hi,
> 
> Biojava does have org.biojavax.bio.phylo.io.nexus. Sometime ago I
> refactored that code and made an example with it:
> http://tiago.org/cc/2009/11/17/reading-newicknexus-phylogenetic-trees-with-biojava/
> I don't know if this suites you needs.
> If you find a bug with the code, just drop an email here on the list
> and I will take care of it (time permitting).
> 
> On Mon, Nov 1, 2010 at 4:20 PM, filip <fbielejec at gmail.com> wrote:
> > Hi,
> > I would like to write a class with methods for parsing tip labels,
> > edges (parent-sibling) and edge lengths from nexus tree file (single
> > tree block). Could You point me to some biojava classes I could use?
> >
> > _______________________________________________
> > Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/biojava-l
> >
> 
> 
> 


Hi,

Thank You for the swift response - I tried the code snippets from
Tiago's blog. It seems that the version of API I posess does not
have "getTopNode()" method for TreesBlock class:

        TreesBlock node = getTreeNode(nexus);
        WeightedGraph<String, DefaultWeightedEdge> graph =
        node.getTreeAsWeightedJGraphT(name); topNode =
        node.getTopNode();

My quick search through the sources confirms that.

I will also take a look at forester libs - thank You for the tip. Are
there any code examples for those I can look at? 


-- 
while(!succeed) { try(); }




More information about the Biojava-l mailing list