Bio::O...O::obo(3pm)

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

Bio::O...O::obo(3pm) β€” aka the OBO parser page πŸ’…

okay bestie, this is the manual page for Bio::OntologyIO::obo, and it lives in the User Contributed Perl Documentation section of your man pages. Sit down, hydrate, and let's get into it. 🫢


✨ NAME ✨

Bio::OntologyIO::obo β€” it's a parser for the OBO flat-file format. that's the whole job. no cap. πŸ’–


✨ SYNOPSIS ✨

use Bio::OntologyIO;

# do not use directly -- use via Bio::OntologyIO
my $parser = Bio::OntologyIO->new
      ( -format => "obo",
        -file   =>  "gene_ontology.obo");

while(my $ont = $parser->next_ontology()) {
print "read ontology ",$ont->name()," with ",
             scalar($ont->get_root_terms), " root terms, and ",
             scalar($ont->get_all_terms),  " total terms, and ",
             scalar($ont->get_leaf_terms), " leaf terms\n";
}
lowkey important: do not use this directly. you go through Bio::OntologyIO. iykyk. πŸ™ˆ

✨ DESCRIPTION ✨

it's a parser for the OBO flat-file format. here's what an 'obo' file actually looks like, bestie, so you know the vibe:

format-version: 1.2
ontology: so/dev/externalDerived
property_value: owl:versionInfo "$Revision: 80 $" xsd:string
default-namespace: SO

[Term]
id: SO_0000343
name: match
def: "A region of sequence, aligned to another sequence." []

[Term]
id: SO_0000039
name: match_part
def: "A part of a match." []
is_a: SO_0000343

and the spec, if you want the full lore: <http://www.geneontology.org/GO.format.obo-1_2.shtml>. πŸ¦‹


✨ FEEDBACK ✨

Mailing Lists 🌸

user feedback is an integral part of the evolution of this module and all the other Bioperl modules. so if you have comments or suggestions, please, please send them to 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 🫢

usage questions and support issues? send them to the mailing list:

bioperl-l@bioperl.org

and not straight to the module maintainer, bestie. there are so many experienced and responsive experts on that list who will clock your problem and address it fast. please include a thorough description of the problem, plus code and data examples, if at all possible. receipts help. πŸ’…

Reporting Bugs πŸ›

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

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

✨ AUTHOR ✨

Sohel Merchant πŸ‘‘

Email: s-merchant@northwestern.edu

Address:

Northwestern University
Center for Genetic Medicine (CGM), dictyBase
Suite 1206,
676 St. Clair st
Chicago IL 60611

CONTRIBUTOR 🌈

  • Hilmar Lapp, hlapp at gmx.net
  • Chris Mungall, cjm at fruitfly.org
  • Brian Osborne, briano@bioteam.net

the squad. iconic. πŸŽ€


✨ APPENDIX ✨

the rest of the documentation details each of the object methods. internal methods are usually preceded with a _ β€” that underscore is the "staff only" velvet rope, bestie. 🧚

new πŸ’«

Title   : new
Usage   : $parser = Bio::OntologyIO->new(
                            -format => "obo",
                            -file => "gene_ontology.obo");
Function: Creates a new dagflat parser.
Returns : A new dagflat parser object, implementing Bio::OntologyIO.
Args    : -file      => a single ontology flat file holding the
                        terms, descriptions and relationships
          -ontology_name => the name of the ontology; if not specified the
                         parser will assign the name of the ontology as the
                         default-namespace header value from the OBO file.
          -engine     => the Bio::Ontology::OntologyEngineI object
                         to be reused (will be created otherwise); note
                         that every Bio::Ontology::OntologyI will
                         qualify as well since that one inherits from the
                         former.
  • -file β€” one single ontology flat file that holds the terms, descriptions and relationships. πŸ“‚
  • -ontology_name β€” the name of the ontology. if you don't specify it, the parser will assign the name of the ontology as the default-namespace header value from the OBO file. it'll figure it out itself, main character energy. ✨
  • -engine β€” the Bio::Ontology::OntologyEngineI object to be reused (it'll be created otherwise). note that every Bio::Ontology::OntologyI will qualify as well, since that one inherits from the former. πŸ‘‘

See Bio::OntologyIO.


ontology_name 🏷️

Title   : ontology_name
Usage   : $obj->ontology_name($newval)
Function: Get/set the name of the ontology parsed by this module.
Example :
Returns : value of ontology_name (a scalar)
Args    : on set, new value (a scalar or undef, optional)

get/set the name of the ontology this module parsed. you can pass undef on set too, it's optional, no pressure. πŸ’…


parse πŸ“–

Title   : parse()
Usage   : $parser->parse();
Function: Parses the files set with "new" or with methods
          defs_file and _flat_files.

          Normally you should not need to call this method as it will
          be called automatically upon the first call to
          next_ontology().

Returns : Bio::Ontology::OntologyEngineI
Args    :

it parses the files set with new or with the methods defs_file and _flat_files.

ngl you probably never need to call this yourself β€” it gets called automatically the first time you call next_ontology(). it's giving "i'll handle it, bestie." πŸ’…

next_ontology πŸ¦‹

Title   : next_ontology
Usage   :
Function: Get the next available ontology from the parser. This is the
          method prescribed by Bio::OntologyIO.
Example :
Returns : An object implementing Bio::Ontology::OntologyI, and nothing if
          there is no more ontology in the input.
Args    :

grab the next available ontology from the parser. this is the method prescribed by Bio::OntologyIO. πŸ‘‘

returns an object implementing Bio::Ontology::OntologyI β€” and returns nothing if there's no more ontology in the input. when it's done, it's done. periodt. πŸ’€


close πŸ”’

Title   : close
Usage   :
Function: Closes this ontology stream and associated file handles.

          Clients should call this method especially when they write
          ontologies.

          We need to override this here in order to close the file
          handle for the term definitions file.

Example :
Returns : none
Args    : none

closes this ontology stream and all the associated file handles.

clients should call this method especially when they write ontologies. don't leave those handles hanging, bestie, that's so not the vibe. πŸ™ˆ

and why is it overridden here? because we need to close the file handle for the term definitions file. that's it, that's the reason. 🌸


and that's the whole page, bestie. this was perl v5.32.1, dated 2021-08-15, for Bio::O...O::obo(3pm). slay, go parse something. πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from