Bio-EUtilities
view release on metacpan or search on metacpan
lib/Bio/DB/EUtilities.pm view on Meta::CPAN
prints to STDOUT
=head2 get_linked_databases
Title : get_linked_databases
Usage : my @dbs = $eutil->get_linked_databases
Function : returns list of databases linked to in linksets
Returns : array of databases
Args : none
Notes : only applicable for elink.
=head1 Iterator- and callback-related methods
=head2 rewind
Title : rewind
Usage : $esum->rewind()
$esum->rewind('recursive')
Function : retrieve a list of DocSum instances
Returns : array of Bio::Tools::EUtilities::Summary::DocSum
Args : [optional] Scalar; string ('all') to reset all iterators, or string
describing the specific main object iterator to reset. The following
are recognized (case-insensitive):
'all' - rewind all objects and also recursively resets nested object
iterators (such as LinkSets and DocSums).
'globalqueries'
'fieldinfo' or 'fieldinfos'
'linkinfo' or 'linkinfos'
'linksets'
'docsums'
=head2 generate_iterator
Title : generate_iterator
Usage : my $coderef = $esum->generate_iterator('linkinfo')
Function : generates an iterator (code reference) which iterates through
the relevant object indicated by the args
Returns : code reference
Args : [REQUIRED] Scalar; string describing the specific object to iterate.
The following are currently recognized (case-insensitive):
'globalqueries'
'fieldinfo' or 'fieldinfos'
'linkinfo' or 'linkinfos'
'linksets'
'docsums'
A second argument can also be passed to generate a 'lazy' iterator,
which loops through and returns objects as they are created (instead
of creating all data instances up front, then iterating through,
which is the default). Use of these iterators precludes use of
rewind() for the time being as we can't guarantee you can rewind(),
as this depends on whether the data source is seek()able and thus
'rewindable'. We will add rewind() support at a later time which
will work for 'seekable' data.
A callback specified using callback() will be used to filter objects
for any generated iterator. This behaviour is implemented for both
normal and lazy iterator types and is the default. If you don't want
this, make sure to reset any previously set callbacks via
reset_callback() (which just deletes the code ref).
TODO : generate seekable iterators ala HOP for seekable fh data
=head2 callback
Title : callback
Usage : $parser->callback(sub {$_[0]->get_database eq 'protein'});
Function : Get/set callback code ref used to filter returned data objects
Returns : code ref if previously set
Args : single argument:
code ref - evaluates a passed object and returns true or false value
(used in iterators)
'reset' - string, resets the iterator.
returns upon any other args
=head1 FEEDBACK
=head2 Mailing lists
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
https://bioperl.org/Support.html - About the mailing lists
=head2 Support
Please direct usage questions or support issues to the mailing list:
I<bioperl-l@bioperl.org>
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
=head2 Reporting bugs
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via the
web:
https://github.com/bioperl/bio-eutilities/issues
=head1 AUTHOR
Chris Fields <cjfields@bioperl.org>
=head1 COPYRIGHT
This software is copyright (c) 2006-2013 by Chris Fields.
This software is available under the same terms as the perl 5 programming language system itself.
=cut
( run in 1.381 second using v1.01-cache-2.11-cpan-140bd7fdf52 )