SWISS::DRs(3pm)
π 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 β
newfromTexttoTextsort
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 formxxxxx.yy, e.g.CAA33128.1. if$dropVersionis set, the version number (.yy) will be dropped from each PID. so likeβ¦ the.1just β¨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,$dbTargetNamehas 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
- debian bookworm: libswiss-perl 1.80-1 Β· GPL-2.0-or-later
- debian trixie: libswiss-perl 1.80-1 Β· GPL-2.0-or-later
- ubuntu jammy: libswiss-perl 1.80-1 Β· GPL-2.0-or-later
- ubuntu noble: libswiss-perl 1.80-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms