GO::Pa...parser(3pm)

πŸ“¦
version 0.15 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸŽ€ NAME πŸŽ€

ok so welcome to the GO::Pa...parser(3pm) page, which lives in the User Contributed Perl Documentation corner of the internet 🫢

GO::Parsers::base_parser β€” the base class for parsers. she's the blueprint. the blueprint-iest blueprint. the mother of all parsers πŸ’…


✨ SYNOPSIS ✨

do not use this class directly; use GO::Parser
real talk bestie: do NOT come for this class directly πŸ™…β€β™€οΈ she is a base class, she is not the moment. go use GO::Parser instead. periodt.

πŸ’œ DESCRIPTION πŸ’œ

so the DESCRIPTION section… is empty. like, genuinely blank. she said "no thoughts, head empty" πŸ«₯✨

ngl that's fine, because everything you actually need is down in the methods below, so scroll, bestie, we got you πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

also blank πŸ™ˆ zero content, no name, no credit, no nothing. anonymous era, we respect it. we move.


πŸ’… show_messages

  • Usage β€” not documented. mysterious ✨
  • Returns β€” nothing listed πŸ«₯
  • Args β€” nothing listed either

three for three on the blanks, she's giving minimalism, iykyk πŸ’€


🧚 normalize_files

  • Usage β€” @files = $parser->normalize_files(@files)
  • Returns β€” nothing listed in the original 🌸
  • Args β€” also nothing listed

ok so what she actually does: you hand her a list of filenames/paths, and she "glob"s them, then uncompresses any compressed files, and hands you back the new file list πŸŽ€

so basically: messy file list goes in, tidy file list comes out. slay.


πŸ¦‹ litemode

  • Usage β€” $p->litemode(1)
  • Returns β€” nothing listed πŸ«₯
  • Args β€” bool

when you set this, the parser only throws the following events:

id|name|is_a|relationship|namespace

(optimisation for fast parsing) 🏎️✨ so yes, she's the "i don't need the whole story, just the highlights" mode. litemode arc.


🌸 acc2name_h

  • Usage β€” $n = $p->acc2name_h->{'GO:0003673'}
  • Returns β€” hashref
  • Args β€” hashref [optional]

gets/sets a hash mapping IDs to names πŸ’–

this will be automatically set by an ontology parser.

a non-ontology parser will use this index to verify the parsed data β€” see $p->acc_not_found($id), below. spooky foreshadowing, but make it data validation πŸ”


πŸ‘‘ acc_not_found

  • Usage β€” if ($p->acc_not_found($go_id)) { warn("$go_id not known") }
  • Returns β€” bool
  • Args β€” acc string

uses acc2name_h β€” if this hash mapping has been created AND the acc is not in the hash, THEN it is considered not found. yes bestie the all-caps is doing a lot but she means it.

this is useful for non-ontology parsers (xref_parser, go_assoc_parser) to check whether a referenced ID is actually present in the ontology 🌈

⚠️ MAJOR NOTE, DO NOT SKIP THIS ONE: if acc2name_h has not been created, then accs cannot be considered not-found, and this will always return 0/false. like, always. she will look you dead in the eye and say everything's fine even when it isn't πŸ’€ so make sure that hash exists before you trust a false, fr fr.

and that's the whole page, no cap 🫢 this one was perl v5.36.0, dated 2023-12-18, and it's the GO::Pa...parser(3pm) manual entry β€” mwah, go parse something iconic πŸ’‹πŸ‘‘

πŸ“¦ where this page comes from