Hello. If you pass an instance of NexusFileBuilder to the
NexusFileFormat parse methods, it will construct a NexusFile instance
in memory which you can get by calling getNexusFile() after parsing
has finished.

You can then iterate over the blocks of the NexusFile by using the
blockIterator() method. Each block returned is a class that implements
the NexusObject interface. You can find out which type of block it is
using instanceof, and thus find the DataBlock instance. You can then
cast to DataBlock (which extends CharactersBlock) and use the methods
from that to explore the alignment.

cheers,
Richard

2008/7/17 Anisah Ghoorah <[EMAIL PROTECTED]>:
>
>
>
> Hi,
>
> I would like to parse a nexus file and get the alignment
> from the DATA block.  I'm not sure how the NexusFileListener works.  Is
> there any code available that illustrates how to parse a nexus file.
>
> Many thanks,
> Anisah
> _________________________________________________________________
> The John Lewis Clearance - save up to 50% with FREE delivery
> http://clk.atdmt.com/UKM/go/101719806/direct/01/
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>
_______________________________________________
Biojava-l mailing list  -  Biojava-l@lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biojava-l

Reply via email to