[Biojava-l] Demos and docs (TestEmbl vs. TestEmbl2)

Thomas Down td2@sanger.ac.uk
Fri, 18 Jan 2002 14:01:22 +0000


On Thu, Jan 17, 2002 at 07:53:12PM -0500, Marc Colosimo wrote:
> 
> I'm new to the BioJava world. I'm writing a few classes to read several different file formats and noticed that a lot of the demos and docs are
> well out of date. It is not clear form the JavaDocs what is the current thinking in seq.io. Can someone shed some light on this or point me to
> better docs?


There's some tutorial documentation at:

   http://www.biojava.org/tutorials/index.html

Note that a few bits of chapter 1 are now out of date, 
and need to be updated before the 1.2 release.  I'll do
this over the weekend.

There's only the one seq.io system in BioJava, and it works
as described in the tutorial chapter.  However, since it
takes a few lines of code to set up a StreamReader properly,
we've also added some convenience methods so you can do:

    BufferedReader br = new BufferedReader(new FileReader("some-file.fa");
    SequenceIterator si = SeqIOTools.readFastaDNA(br);
    while (si.hasNext()) {
        Sequence seq = si.nextSequence();
        // Do something with the sequence
    }

I'll add some examples which use the SeqIOTools convenience
methods at the start of the tutorial, since a lot of the time
they do what you want :-).

Hope this helps -- let me know if you've got any more
questions!

    Thomas.