GO::Model::Xref(3pm)

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

πŸ’– GO::Model::Xref πŸ’–

okay bestie, welcome to GO::Model::Xref β€” it's part of the User Contributed Perl Documentation and it's literally just a cross reference to an external database. that's the whole vibe. πŸ¦‹


✨ NAME ✨

GO::Model::Xref β€” a cross reference to an external database 🫢


✨ SYNOPSIS ✨

my $xrefs = $term->dbxref_list();
foreach my $xref (@$xrefs) P
  printf "Term %s has an xref %s:%s\n",
          $term->name, $xref->xref_key, $xref->dbname;
}

(yes, that's exactly how it's written up there, no cap β€” copying the code verbatim is the whole assignment πŸ™ˆ)


✨ DESCRIPTION ✨

so this class represents a cross reference to an external database. an Xref is made up of two things, and honestly that's it:

  • a key β€” like the accession number, or whatever the value of the unique field being keyed off of is
  • a database name

and theoretically those two together are enough to uniquely identify any databased entity. slay. πŸ’…


✨ NOTES ✨

like all the GO::Model::* classes, this one uses accessor methods to get or set its attributes. and the way it works is iconic:

  • call the accessor with no arguments β†’ you get the value of the attribute πŸ’–
  • pass in an argument β†’ the attribuet gets set according to that argument ✨

for instance:

# this sets the value of the attribute
$my_object->attribute_name("my value");

# this gets the value of the attribute
$my_value = $my_object->attribute_name();

🌸 xref_key 🌸

  • Alias β€” acc
  • Alias β€” accession
  • Usage β€” (not specified)
  • Returns β€” (not specified)
  • Args β€” (not specified)

accessor: gets/sets the key/id of the cross reference πŸ”‘


🌸 xref_keytype 🌸

  • Usage β€” (not specified)
  • Returns β€” (not specified)
  • Args β€” (not specified)

accessor: gets/sets the key/id type of the cross reference 🏷️


🌸 as_str 🌸

  • Usage β€” (not specified)
  • Returns β€” (not specified)
  • Args β€” (not specified)
that's all the docs give us on this one, bestie. no description, no nothing. iconic mystery behavior πŸ’€

🌸 xref_dbname 🌸

  • Alias β€” dbname
  • Usage β€” (not specified)
  • Returns β€” (not specified)
  • Args β€” (not specified)

accessor: gets/sets the database name of the cross reference πŸ—„οΈ

must be a valid database name β€” like, non-negotiable, fr fr.

🌸 xref_desc 🌸

  • Alias β€” name
  • Usage β€” (not specified)
  • Returns β€” (not specified)
  • Args β€” (not specified)

accessor: gets/sets the description of the accession no πŸ“

useful for interpro ✨

🌸 to_xml 🌸

  • Usage β€” print $xref->to_xml()
  • Returns β€” string
  • Args β€” indent [integer]

XML representation πŸŽ€ β€” but listen, you probably shouldn't call this directly. it'll be called by entities that own xrefs, so let them handle it, okay bestie? πŸ‘‘


that's the whole page!! every flag, every alias, every accessor, all accounted for, periodt. πŸ’…πŸŒΈ

author/source deets: this lil doc ships as part of the Perl documentation set, and its footer says perl v5.36.0, dated 2023-12-18. bye pookie, go set some attributes 🫢✨

πŸ“¦ where this page comes from