org.biojava.bio.program.gff
Class SequencesAsGFF

java.lang.Object
  |
  +--org.biojava.bio.program.gff.SequencesAsGFF

public class SequencesAsGFF
extends java.lang.Object

Turns a sequence database into a GFF event stream.

Author:
Matthew Pocock, Thomas Down

Constructor Summary
SequencesAsGFF()
           
 
Method Summary
protected  void doProcessSequence(Sequence seq, GFFDocumentHandler handler, java.lang.String id)
          Internal method to process an individual Sequence.
 FeatureFilter getFeatureFilter()
          Return the current FeatureFilter.
 boolean getRecurse()
          Return whether features will be filtered recursively or not.
 void processDB(SequenceDB seqDB, GFFDocumentHandler handler)
          Process all Sequences within a SequenceDB, informing handler of any suitable features.
 void processSequence(Sequence seq, GFFDocumentHandler handler)
          Process an individual Sequence, informing handler of any suitable features.
 void setFeatureFilter(FeatureFilter filter)
          Replace the current FeatureFilter with filter.
 void setRecurse(boolean recurse)
          Set whether features will be filtered recursively to recurse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequencesAsGFF

public SequencesAsGFF()
Method Detail

getFeatureFilter

public FeatureFilter getFeatureFilter()
Return the current FeatureFilter.

This is the object that will accept or reject individual features.

Returns:
the current FeatureFilter

setFeatureFilter

public void setFeatureFilter(FeatureFilter filter)
Replace the current FeatureFilter with filter.
Parameters:
filter - the new FeatureFilter

getRecurse

public boolean getRecurse()
Return whether features will be filtered recursively or not.
Returns:
whether or not to recurse

setRecurse

public void setRecurse(boolean recurse)
Set whether features will be filtered recursively to recurse.
Parameters:
recurse - true if you want to recurse, false otherwise

doProcessSequence

protected void doProcessSequence(Sequence seq,
                                 GFFDocumentHandler handler,
                                 java.lang.String id)
                          throws BioException,
                                 BioException
Internal method to process an individual Sequence.
Parameters:
seq - the Sequence to GFFify
handler - the GFFDocumentHandler that will receive the GFF for all suitable features within seq
id - the value of the seqName field in any GFFRecords produced

processSequence

public void processSequence(Sequence seq,
                            GFFDocumentHandler handler)
                     throws BioException,
                            BioException
Process an individual Sequence, informing handler of any suitable features.
Parameters:
seq - the Sequence to GFFify
handler - the GFFDocumentHandler that will receive the GFF for all suitable features within seq

processDB

public void processDB(SequenceDB seqDB,
                      GFFDocumentHandler handler)
               throws BioException,
                      BioException
Process all Sequences within a SequenceDB, informing handler of any suitable features.
Parameters:
seqDB - the SequenceDB to GFFify
handler - the GFFDocumentHandler that will receive the GFF for all suitable features within seqDB