SWISS::DRs(3pm)

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

πŸ’– SWISS::DRs πŸ’–

okay bestie, welcome to SWISS::DRs β€” this is the lil class that handles the DR (database crossreference) lines inside an SWISS-PROT + TrEMBL entry, exactly as specified in the user manual at http://www.expasy.org/sprot/userman.html. no cap, it's giving "I know everyone's cross-references and I'm not shy about it." ✨


🌸 Inherits from 🌸

SWISS::ListBase.pm β€” yeah she's got a whole family tree, she's not doing this alone 🫢


πŸŽ€ Attributes πŸŽ€

  • "list" β€” an array of arrays. each element is an array like (Database_identifier, primary_key, secondary_key[, further elements]). so basically a list of lists, each one a lil DR line's worth of facts. iconic behavior fr fr πŸ’…

πŸ¦‹ Methods πŸ¦‹

⭐ Standard methods ⭐

  • new
  • fromText
  • toText
  • sort

these are the classics, the main character squad, the ones you already know and love 😌

🌈 Reading methods 🌈

  • emblacs β€” returns a list of all EMBL accession numbers. these are the primary keys of EMBL crossreferences. like, every single one, bestie πŸ’œ
  • pids [$dropVersion] β€” returns a list of all PIDs. these are the secondary keys of EMBL crossreferences.
⚠️ ATTENTION: the EMBL protein identifiers introduced in 1999 are of the form xxxxx.yy, e.g. CAA33128.1. if $dropVersion is set, the version number (.yy) will be dropped from each PID. so like… the .1 just ✨leaves✨.

Example β€” if the EMBL DR line is

DR   EMBL; L37685; AAC41668.1; -.

then pids(1) will only return AAC41668, NOT AAC41668.1. not me being dramatic about a version suffix but that's literally the whole point 😭

πŸ’€ Filter functions πŸ’€

  • dbName($dbTargetName) β€” true if the first element of a DR line (the DB name) matches $dbTargetName. and bestie, $dbTargetName has to match in full, not only a partial match. no vibes-based fuzzy matching here, it's all or nothing πŸ™ˆ
  • notDbName($dbTargetName) β€” true if the first element of a DR line (the DB name) does NOT match $dbTargetName. the hater version of the function above, lowkey useful tho πŸ’…

🧚 ** lines (SWISS-PROT internal format) 🧚

each DR line may be followed by a ** line like

 **   DR   PROSITE; PS12345; XXX_PAT; FALSE_POS_1

these will be stored internally as DR lines with the DB identifier '_HIDDEN_'. so sneaky, so undercover, so slay πŸ‘‘

therefore adding a ** PROSITE line is done as:

$entry->DRs->add(['_HIDDEN_', 'PS12345', 'XXX_PAT', 'FALSE_POS_1']);

see? you just pop the '_HIDDEN_' in as the DB identifier and she goes straight into the list like she was always there. periodt. πŸ’–


and that's the whole page, bestie!! this one shipped as part of perl v5.32.1, dated 2021-08-15, and it's filed under SWISS::DRs(3pm) in the User Contributed Perl Documentation. go forth and crossreference responsibly πŸŽ€βœ¨πŸŒΈπŸ¦‹πŸ’œ

πŸ“¦ where this page comes from