NAME
Bio::ToolBox::Data::Iterator - Class for iterating through Data tables
SYNOPSIS
# open a Bio::ToolBox::Data object
# initiate an iterator stream
my $stream = $Data->row_stream;
while (my $row = $stream->next_row) {
# each $row is a Bio::ToolBox::Data::Feature object
# representing the row in the data table
my $value = $row->value($index);
# do something with $value
}
DESCRIPTION
This is an iteration object for iterating through the rows of a Bio::ToolBox::Data object table.
This should not be created directly by end-users. Rather, see Bio::ToolBox::Data\row_stream for details.
METHODS
There is essentially only one method for end-users, next_row
.
- new
-
Pass a valid Bio::ToolBox::Data object.
- next_row
-
This returns the next row in a Data table as a Bio::ToolBox::Data::Feature row object. If SeqFeature objects are associated with the row, perhaps from a parsed input annotation file, then they are automatically associated with the row object. (Previous versions required separately calling the seqfeature() row method to perform this.)
AUTHOR
Timothy J. Parnell, PhD
Dept of Oncological Sciences
Huntsman Cancer Institute
University of Utah
Salt Lake City, UT, 84112
This package is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.