Bio::T...::Info(3pm)
π Bio::T...::Info β the manual, but make it make sense π
okay bestie, so this is the page for Bio::Tools::EUtilities::Info (the man page header shortens it to Bio::T...::Info(3pm), she's shy like that), and it's part of the User Contributed Perl Documentation. It's an interface class for storing einfo data. No cap. Let's get into it π«Ά
β¨ VERSION β¨
version 1.77 β that's the one, that's the era we're in π
πΈ SYNOPSIS πΈ
heads up before you do anything:
#### should not create instance directly; Bio::Tools::EUtilities does this ####
like, do not come for her directly, she's not that kind of class, Bio::Tools::EUtilities handles that part okay π
my $info = Bio::Tools::EUtilities->new(-eutil => 'einfo',
-file => 'einfo.xml');
# can also use '-response' (for HTTP::Response objects) or '-fh' (for filehandles)
you can also pass -response (for HTTP::Response objects) or -fh (for filehandles) β pick your fighter π
# print available databases (if data is present)
print join(', ',$info->get_available_databases),"\n";
okay so printing the available databases β only if the data is actually present, she's not gonna invent it for you β¨
# get database info
my $db = $info->get_database; # in case you forgot...
my $desc = $info->get_description;
my $nm = $info->get_menu_name;
my $ct = $info->get_record_count;
my $dt = $info->get_last_update;
that # in case you forgot... comment is in the original and honestly it's giving side-eye and I respect it π
# EUtilDataI interface methods
my $eutil = $info->eutil;
my $type = $info->datatype;
# iterate through Field and Link objects
while (my $field = $info->next_Field) {
print "Field code: ",$field->get_field_code,"\n";
print "Field name: ",$field->get_field_name,"\n";
print "Field desc: ",$field->get_field_description,"\n";
print "DB : ",$field->get_database,"\n";
print "Term ct : ",$field->get_term_count,"\n";
for my $att (qw(is_date is_singletoken is_hierarchy is_hidden is_numerical)) {
print "\tField $att\n" if $field->$att;
}
}
my @fields = $info->get_Fields; # grab them all (useful for grep)
look at that little qw(is_date is_singletoken is_hierarchy is_hidden is_numerical) loop just vibing through the attribute checks, iconic π
while (my $link = $info->next_LinkInfo) {
print "Link name: ",$link->get_link_name,"\n";
print "Link desc: ",$link->get_link_description,"\n";
print "DBFrom: ",$link->get_dbfrom,"\n"; # same as get_database()
print "DBTo: ",$link->get_dbto,"\n"; # database linked to
}
my @links = $info->get_LinkInfo; # grab them all (useful for grep)
$info->rewind(); # rewinds all iterators
$info->rewind('links'); # rewinds Link iterator
$info->rewind('fields'); # rewinds Field iterator
$info->rewind(); rewinds all the iterators, $info->rewind('links'); rewinds just the Link iterator, $info->rewind('fields'); rewinds just the Field iterator β you can go back to the start whenever, it's fine, nobody's judging π¦
π DESCRIPTION π
This class handles data output (XML) from einfo. Simple as that π
Einfo is capable of returning two types of information:
- A list of all available databases (when called w/o parameters) β like, when you give her nothing to work with π«Ά
- Information about a specific database.
The latter information includes the database description, record count, and date/time stamp for the last update, among other things. It also includes a list of fields (indices by which record data is stored which can be used in queries) and links (crossrefs between related records in other databases at NCBI). Data from the latter two are stored in two small subclasses (FieldInfo and LinkInfo) which can be iterated through or retrieved all at once, as demonstrated above.
NOTE: Methods described for the LinkInfo and FieldInfo subclasses are unique to those classes (as they retrieve data unique to those data types). like they're their methods, don't try to make them do other stuff okay π
Further documentation for Link and Field subclass methods is included below.
For more information on einfo see:
http://eutils.ncbi.nlm.nih.gov/entrez/query/static/einfo_help.html
π§ rewind
Title : rewind
Usage : $info->rewind() # rewinds all (default)
$info->rewind('links') # rewinds only links
Function : 'rewinds' (resets) specified iterators (all if no arg)
Returns : none
Args : [OPTIONAL] String:
'all' - all iterators (default)
'linkinfo' - LinkInfo objects only
'fieldinfo' - FieldInfo objects only
so it "rewinds" (resets) the iterators you specify β or all of them if you pass no arg at all, that's the default. Returns none, and the arg is an [OPTIONAL] string: 'all' for all iterators (the default), 'linkinfo' for LinkInfo objects only, 'fieldinfo' for FieldInfo objects only. Obsessed with a clean reset honestly β¨
π to_string
Title : to_string
Usage : $foo->to_string()
Function : converts current object to string
Returns : none
Args : (optional) simple data for text formatting
Note : Used generally for debugging and for various print methods
she converts the current object to a string. Returns none, takes an optional bit of simple data for text formatting, and the note is that she's generally used for debugging and for various print methods π«Ά lowkey a workhorse.
π FEEDBACK π
π 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. fr fr, they mean it πΈ
bioperl-l@bioperl.org - General discussion
https://bioperl.org/Support.html - About the mailing lists
π«Ά Support
Please direct usage questions or support issues to the mailing list: 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.
(yes "reponsive" is spelled like that in the original, we're keeping it, no edits, she's perfect the way she is π)
like β ask the group chat, not the maintainer's DMs, the experts will come through faster π₯
π 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
π AUTHOR π
Chris Fields <cjfields@bioperl.org> β the moment, the icon, the legend π
β 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.
and that's the whole page bestie, you ate πβ¨ππ¦πΈπ π«Άπβ
signing off: this was perl v5.40.0, dated 2025-01-27, and the man page header says Bio::T...::Info(3pm) β User Contributed Perl Documentation, iykyk π§π
π¦ where this page comes from
- debian trixie: libbio-eutilities-perl 1.77-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbio-eutilities-perl 1.77-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbio-eutilities-perl 1.77-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms