Bio::F...actory(3pm)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– Bio::F...actory β€” the Bio::Factory::SeqAnalysisParserFactory era πŸ’–

okay bestie, pull up a chair, because we're talking about a Perl module from the User Contributed Perl Documentation collection, and honestly? it's giving factory. it's giving pipeline. it's giving "I make parsers so you don't have to." 🧚


✨ NAME ✨

Bio::Factory::SeqAnalysisParserFactory β€” a class that is capable of creating SeqAnalysisParserI compliant parsers. that's it. that's the whole job. a parser factory. a parser-making machine. iconic behavior honestly. πŸ’…


🌸 SYNOPSIS 🌸

here's the vibe, verbatim, no notes:

# initialize an object implementing this interface, e.g.
$factory = Bio::Factory::SeqAnalysisParserFactory->new();
# find out the methods it knows about
print "registered methods: ",
      join(', ', keys %{$factory->driver_table}), "\n";
# obtain a parser object
$parser = $factory->get_parser(-input=>$inputobj,
                               -params=>[@params],
                               -method => $method);
# $parser is an object implementing Bio::SeqAnalysisParserI
# annotate sequence with features produced by parser
while(my $feat = $parser->next_feature()) {
    $seq->add_SeqFeature($feat);
}

so you make a factory ✨ you ask it what it knows ✨ you get a parser ✨ and then you loop over next_feature() and dump every feature onto your sequence. that's the whole little dance. no cap. πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

okay so. This is a factory class capable of instantiating SeqAnalysisParserI implementing parsers. πŸ’«

the concept behind this class β€” and behind the interface it implements (Bio::Factory::SeqAnalysisParserFactoryI) β€” is a generic analysis result parsing in high-throughput automated sequence annotation pipelines. it's giving assembly line but for biology. if you want the full lore on that concept, go read Bio::SeqAnalysisParserI. 🌈

and you can always find out the methods an instance of this class knows about using the way shown in the SYNOPSIS section above. by default β€” and assuming the documentation is up-to-date, which, bestie, is always an assumption πŸ‘€ β€” this will comprise of:

  • genscan
  • mzef
  • estscan
  • blast
  • hmmer
  • gff
  • sim4

and yes, all of those are case-insensitive. lowercase queen energy. periodt. πŸ‘‘


πŸ’Œ FEEDBACK πŸ’Œ

🌐 Mailing Lists 🌐

user feedback is an integral part of the evolution of this and other Bioperl modules. so like… send your comments and suggestions, preferably to one of the Bioperl mailing lists. your participation is much appreciated. fr fr. 🫢

bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists  - 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. like, not the maintainer, bestie, the list. many experienced and reponsive experts will be able look at the problem and quickly address it. and please include a thorough description of the problem with code and data examples if at all possible. the more context the better, we love a detailed bug report. 😭✨

πŸ› Reporting Bugs πŸ›

report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. bug reports can be submitted via the web:

https://github.com/bioperl/bioperl-live/issues


πŸ‘‘ AUTHOR - Hilmar Lapp, Jason Stajich πŸ‘‘

Email Hilmar Lapp hlapp@gmx.net, Jason Stajich jason@bioperl.org


πŸ“– APPENDIX πŸ“–

the rest of the documentation details each of the object methods. internal methods are usually preceded with a _ (iykyk). πŸ“

πŸ”§ get_parser πŸ”§

  • Title: get_parser
  • Usage:
$factory->get_parser(-input=>$inputobj,
                     [ -params=>[@params] ],
                     -method => $method)
  • Function: Creates and returns a parser object for the given input and method. Both file names and streams (filehandles) are allowed.

Parameters (the -params argument) are passed on to the parser object and therefore are specific to the parser to be created.

  • Example:
  • Returns: A Bio::SeqAnalysisParserI implementing object. Exception if creation of the parser object fails. 😭
  • Args:
    • -input β€” object/file where analysis results are coming from
    • -params β€” parameter to use when parsing/running analysis
    • -method β€” method of analysis

πŸ”§ register_driver πŸ”§

  • Title: register_driver
  • Usage: $factory->register_driver("genscan", "Bio::Tools::Genscan");
  • Function: Registers a driver a factory class should be able to instantiate.

This method can be called both as an instance and as a class method.

  • Returns: (nothing listed here, bestie β€” it's blank in the original too)
  • Args: Key of the driver (string) and the module implementing the driver (string).

πŸ”§ driver_table πŸ”§

  • Title: driver_table
  • Usage: $table = $factory->driver_table();
  • Function: Returns a reference to the hash table storing associations of methods with drivers.

You use this table to look up registered methods (keys) and drivers (values).

In this implementation the table is class-specific and therefore shared by all instances. You can override this in a derived class, but note that this method can be called both as an instance and as a class method.

⚠️ this will be the table used by the object internally. you should definitely know what you're doing if you modify the table's contents. modifications are shared by _all_ instances β€” those present and those yet to be created. all of them. every single one. πŸ’€
  • Returns: A reference to a hash table.
  • Args: (empty, and that's on purpose)

and that's the whole page, bestie!! πŸ’œ this was documented by perl v5.32.1, dated 2021-08-15 β€” so like, hydrate, register your drivers, and go annotate something gorgeous. πŸŒΈβœ¨πŸ’…

πŸ“¦ where this page comes from