[Biojava-l] Small update to GFFToFeatures.java

Lachlan Coin lc1@sanger.ac.uk
Mon, 1 Jul 2002 16:22:49 +0100 (BST)


Hi,

I couldn't get the demo program GFFToFeatures.java to work, so I made the
some changes (locally) after which it worked.  The problem seemed to
be that in building the SequenceDB object from a FASTA file using

SequenceBuilderFactory sFact = new
EmblProcessor.Factory(SimpleSequenceBuilder.FACTORY);
    SequenceFormat sFormat = new FastaFormat();
    InputStream seqDBI = new FileInputStream(seqFile);
    SequenceIterator seqI = new StreamReader(seqDBI, sFormat, rParser,
sFact);
    while(seqI.hasNext()) {
        seqDB.addSequence(seqI.nextSequence());
    }

didn't set the name of the sequences in the sequence database properly,
which led to the sequence annotator not annotating the gff features from
this sequence onto the sequence.  Anyway, using 

  InputStream seqDBI = new FileInputStream(seqFile);
    SequenceDB seqDB = SeqIOTools.readFasta(seqDBI,alpha);

works, if anyone wants to commit these changes.

Cheers,

Lachlan