This interface describes simple class methods used for processing data from an
event-based parser (a driver). This is similar in theme to an XML SAX-based
driver but differs in that one can optionally pass related data
semi-intelligently as chunks (defined in a hash reference) vs. passing as single
data elements in a stream. For instance, any reference-related and
species-related data as well as individual sequence features could be passed as
chunks of data to be processed in part or as a whole (from Data::Dumper output):
Annotation Data (References):
$VAR1 = {
'NAME' => 'REFERENCE',
'DATA' => '1 (bases 1 to 10001)'
'AUTHORS' => 'International Human Genome Sequencing Consortium.'
'TITLE' => 'The DNA sequence of Homo sapiens'
'JOURNAL' => 'Unpublished (2003)'
};
Sequence features (source seqfeature):
$VAR1 = {
'mol_type' => 'genomic DNA',
'LOCATION' => '<1..>10001',
'NAME' => 'FEATURES',
'FEATURE_KEY' => 'source',
'note' => 'Accession AL451081 sequenced by The Sanger Centre',
'db_xref' => 'taxon:9606',
'clone' => 'RP11-302I18',
'organism' => 'Homo sapiens'
};
These would be 'handled' accordingly by methods specified in a
HandlerI-based class. The data in a chunk is intentionally left vague
here since this may vary from implementation to implementation and can
be somewhat open to interpretation. A data chunk in a sequence record,
for instance, will be different than a data chunk in a BLAST
report. This also allows one the flexibility to pass data as more
XML-like small bits, as huge chunks, or even as indexed locations in a
file (such as when using a "pull" parser, like a Bio::PullParserI).
For an sequence-based implementation see
Bio::SeqIO::RichSeq::GenericRichSeqHandler, which handles any GenBank,
UniProt, and EMBL data from their respective driver modules
(Bio::SeqIO::gbdriver, Bio::SeqIO::swissdriver, and
Bio::SeqIO::embldriver).
The rest of the documentation details each of the object methods. Internal
methods are usually preceded with a _