Bio::T...tainerI(3pm)
π Bio::Tools::EUtilities::Summary::ItemContainerI π
okay bestie, gather round, because we're about to get into Bio::Tools::EUtilities::Summary::ItemContainerI β an abstract interface for pulling Item info out of any Item-containing class. and when I say any, I mean it covers both DocSums and the Items themselves (yes, they can be layered, it's giving nesting doll realness πͺ).
β¨ VERSION β¨
version 1.77 β that's the one we're talking about, no cap.
πΈ SYNOPSIS πΈ
# Implement ItemContainerI
# $foo is any ItemContainerI (current implementations are DocSum and Item itself)
while (my $item = $foo->next_Item) { # iterate through contained Items
# do stuff here
}
@items = $foo->get_Items; # all Items in the container (hierarchy intact)
@items = $foo->get_all_Items; # all Items in the container (flattened)
@items = $foo->get_Items_by_name('bar'); # Specifically named Items
($content) = $foo->get_contents_by_name('bar'); # content from specific Items
($type) = $foo->get_type_by_name('bar'); # data type from specific Items
so like, $foo is whatever ItemContainerI you've got in your hands (the current implementations are DocSum and Item itself, iykyk). loop it, grab it all, grab it by name β pick your fighter π
.
π¦ DESCRIPTION π¦
So here's the tea, bestie: DocSum data, the stuff esummary hands back to you, is normally just a cute lil simple list of item-content-content_type groups. innocent. unproblematic. β¨
BUT. Items can also contain nested data to represent more complex stuff (think structural data π). And this interface is the blueprint for the basic methods you use to generically retrieve that next layer of Item data.
For convenience, classes may describe more specific methods β but they should be defined in terms of this interface and its methods. That's the rules, and we follow them. periodt. π
π next_Item
- Title :
next_Item - Usage :
while (my $item = $docsum->next_Item) {...} - Function : iterates through
Items (the nested layer ofItem) - Returns : single
Item - Args : [optional] single arg (string)
'flatten'β iterates through a flattened list, alaget_all_DocSum_Items()
π get_Items
- Title :
get_Items - Usage :
my @items = $docsum->get_Items - Function : returns a list of, well,
Items π - Returns : array of
Items - Args : none
π get_all_Items
- Title :
get_all_Items - Usage :
my @items = $docsum->get_all_Items - Function : returns a flattened list of all
Itemobjects (Items,ListItems,StructureItems) - Returns : array of
Items - Args : none
- Note : items are added top-down (similar order to using nested calls) in original list order.
1 2 7 8
Item - Item - Item - Item ...
|
| 3 6
ListItem - ListItem
|
| 4 5
Structure - Structure
like, the diagram is literally doing the most and honestly? iconic. π₯
π§ get_all_names
- Title :
get_all_names - Usage :
my @names = get_all_names() - Function : Returns an array of names for all
Item(s) inDocSum. - Returns : array of unique strings
- Args : none
β get_Items_by_name
- Title :
get_Items_by_name - Usage :
my @items = get_Items_by_name('CreateDate') - Function : Returns named
Item(s) inDocSum(indicated by passed argument) - Returns : array of
Itemobjects - Args : string (
Itemname)
π get_contents_by_name
- Title :
get_contents_by_name - Usage :
my ($data) = $eutil->get_contents_by_name('CreateDate') - Function : Returns content for named
Item(s) inDocSum(indicated by passed argument) - Returns : array of values (type varies per
Item) - Args : string (
Itemname)
πΈ get_type_by_name
- Title :
get_type_by_name - Usage :
my $data = get_type_by_name('CreateDate') - Function : Returns data type for named
IteminDocSum(indicated by passed argument) - Returns : scalar value (string) if present
- Args : string (
Itemname)
π FEEDBACK π
π Mailing lists
User feedback is an integral part of the evolution of this and other Bioperl modules, fr fr. 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
π« 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 responsive 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.
bestie, seriously, go to the list first β the maintainer's DMs are not the vibe π
π 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>
π 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 π
β¨ β this beauty is perl v5.40.0, dated 2025-01-27, and you just read the Bio::T...tainerI(3pm) manual. slay, go forth, and may your Items always be properly nested π¦π
π¦ 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