Package org.biojava.bio.program.gff
Class SequencesAsGFF
- java.lang.Object
- 
- org.biojava.bio.program.gff.SequencesAsGFF
 
- 
 public class SequencesAsGFF extends Object Turns a sequence database into a GFF event stream.- Author:
- Matthew Pocock, Thomas Down, Len Trigg
 
- 
- 
Constructor SummaryConstructors Constructor Description SequencesAsGFF()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SimpleGFFRecordcreateGFFRecord(Feature feature, String id)Internal method to create a GFFRecord from an individual Feature.protected voiddoPreProcessSequence(Sequence seq, GFFDocumentHandler handler, String id)Emit any per-sequence header information.protected voiddoProcessFeature(Feature feature, GFFDocumentHandler handler, String id)Internal method to process an individual Feature.protected voiddoProcessSequence(Sequence seq, GFFDocumentHandler handler, String id)Internal method to process an individual Sequence.FeatureFiltergetFeatureFilter()Return the current FeatureFilter.booleangetGenerateSequenceHeader()Discover if per-sequence header lines will be generated.booleangetRecurse()Return whether features will be filtered recursively or not.booleangetShatter()Determine if features with non-contiguous locations will be broken into multiple GFF records.voidprocessDB(SequenceDB seqDB, GFFDocumentHandler handler)Process all Sequences within a SequenceDB, informing handler of any suitable features.voidprocessSequence(Sequence seq, GFFDocumentHandler handler)Process an individual Sequence, informing handler of any suitable features.voidsetFeatureFilter(FeatureFilter filter)Replace the current FeatureFilter with filter.voidsetGenerateSequenceHeader(boolean b)Specify whether a per-sequence header line, giving the length of the sequence, should be generated.voidsetRecurse(boolean recurse)Set whether features will be filtered recursively to recurse.voidsetShatter(boolean b)Specify whether features with non-contiguous locations should be broken up such that a GFF feature line is emitted for each contiguous block.
 
- 
- 
- 
Constructor Detail- 
SequencesAsGFFpublic SequencesAsGFF() 
 
- 
 - 
Method Detail- 
setShatterpublic void setShatter(boolean b) Specify whether features with non-contiguous locations should be broken up such that a GFF feature line is emitted for each contiguous block.- Parameters:
- b-
- Since:
- 1.4
 
 - 
getShatterpublic boolean getShatter() Determine if features with non-contiguous locations will be broken into multiple GFF records.- Since:
- 1.4
 
 - 
setGenerateSequenceHeaderpublic void setGenerateSequenceHeader(boolean b) Specify whether a per-sequence header line, giving the length of the sequence, should be generated.- Since:
- 1.4
 
 - 
getGenerateSequenceHeaderpublic boolean getGenerateSequenceHeader() Discover if per-sequence header lines will be generated.- Since:
- 1.4
 
 - 
getFeatureFilterpublic FeatureFilter getFeatureFilter() Return the current FeatureFilter.This is the object that will accept or reject individual features. - Returns:
- the current FeatureFilter
 
 - 
setFeatureFilterpublic void setFeatureFilter(FeatureFilter filter) Replace the current FeatureFilter with filter.- Parameters:
- filter- the new FeatureFilter
 
 - 
getRecursepublic boolean getRecurse() Return whether features will be filtered recursively or not.- Returns:
- whether or not to recurse
 
 - 
setRecursepublic void setRecurse(boolean recurse) Set whether features will be filtered recursively to recurse.- Parameters:
- recurse- true if you want to recurse, false otherwise
 
 - 
doPreProcessSequenceprotected void doPreProcessSequence(Sequence seq, GFFDocumentHandler handler, String id) throws BioException Emit any per-sequence header information. The default implementation emits sequence-region comment lines.- Throws:
- BioException
- Since:
- 1.4
 
 - 
doProcessSequenceprotected void doProcessSequence(Sequence seq, GFFDocumentHandler handler, String id) throws 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
- Throws:
- BioException
 
 - 
doProcessFeatureprotected void doProcessFeature(Feature feature, GFFDocumentHandler handler, String id) throws BioException Internal method to process an individual Feature.- Parameters:
- feature- the Feature to GFFify
- handler- the GFFDocumentHandler that will receive the GFF for this feature
- id- the value of the seqName field in any GFFRecords produced
- Throws:
- BioException
 
 - 
createGFFRecordprotected SimpleGFFRecord createGFFRecord(Feature feature, String id) throws BioException Internal method to create a GFFRecord from an individual Feature.- Parameters:
- feature- the Feature to GFFify
- id- the value of the seqName field in any GFFRecords produced
- Throws:
- BioException
 
 - 
processSequencepublic void processSequence(Sequence seq, GFFDocumentHandler handler) throws 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
- Throws:
- BioException
 
 - 
processDBpublic void processDB(SequenceDB seqDB, GFFDocumentHandler handler) throws 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
- Throws:
- BioException
 
 
- 
 
-