Bio::T...tainerI(3pm)

πŸ“¦
version 1.77 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 of Item)
  • Returns : single Item
  • Args : [optional] single arg (string)
    • 'flatten' β€” iterates through a flattened list, ala get_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 Item objects (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) in DocSum.
  • 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) in DocSum (indicated by passed argument)
  • Returns : array of Item objects
  • Args : string (Item name)

πŸ“ 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) in DocSum (indicated by passed argument)
  • Returns : array of values (type varies per Item)
  • Args : string (Item name)

🌸 get_type_by_name

  • Title : get_type_by_name
  • Usage : my $data = get_type_by_name('CreateDate')
  • Function : Returns data type for named Item in DocSum (indicated by passed argument)
  • Returns : scalar value (string) if present
  • Args : string (Item name)

πŸ’Œ 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>


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