SWISS::DE(3pm)

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

πŸŽ€ SWISS::DE β€” the manual page, but make it a group chat πŸŽ€

okay bestie, this is SWISS::DE(3pm), part of the User Contributed Perl Documentation collection. it's a Perl module page, and honestly? it's giving specific. let's get into it πŸ’…


✨ Name ✨

SWISS::DE.pm β€” that's her. that's the whole name. short, iconic, no notes. πŸ‘‘


🌸 Description 🌸

okay so picture this: every single DE object = one protein name. just one. one name, one object, main character energy, no sharing.

and the container that holds all the names for one entry? that's SWISS::DEs (plural, because it's the whole squad 🫢).


πŸ¦‹ Inherits from πŸ¦‹

SWISS::BaseClass β€” she gets her whole vibe from there. family tree moment. 🌈


πŸ’– Attributes πŸ’–

⭐ text

the raw text of the protein name, literally verbatim, no filter.

note: SwissKnife works with both new and old DE line formats, so for backward compatibility, with both formats everything gets parsed and stored the same way it was with the old format. so yeah β€” the raw text for a name of type 'EC', e.g. 6.3.5.5, will be "EC 6.3.5.5" (not "6.3.5.5", bestie, keep up 😭). other strings that only show up in old DE line text format β€” the 'precursor' flag and the 'Allergen', 'antigen' strings β€” also get added into the stored raw text.

so the safe way to get the DE text is toText (works with both new and old DE line format). for "EC=6.3.5.5" (new DE line format), it returns "6.3.5.5" (DE object of 'EC' type). for "(EC 6.3.5.5)" (old DE line format), it returns "EC 6.3.5.5". periodt. πŸ’…

⭐ category

the category of the protein name. the options are 'RecName', 'AltName', 'SubName' (TrEMBL only, iykyk).

DE   RecName: Full=CAD protein;
DE            Short=CAD;

here both names (both DE objects) are of category 'RecName'. twin behavior fr fr.

you can set/modify the category with category(string). slay.

note: with the old DE line format, this field is undef. gone. not there. πŸ’€

⭐ type

the type of the protein name. your choices: 'Full', 'Short', 'EC', 'Allergen', 'CD_antigen', 'Biotech', 'INN'. a whole menu, pick your fighter.

DE   RecName: Full=CAD protein;
DE            Short=CAD;

here the first name (DE object) is of type 'Full', and the second one is of type 'Short'. see? different. besties but not the same. πŸ’œ

you can set/modify the type with type(string). obsessed.

note: with the old DE line format, this field is undef too. yeah. same energy as category. πŸ™ˆ

🧚 Standard methods 🧚

  • new β€” the classic. makes a new one. ✨
  • fromText β€” builds it from text. πŸ“
  • toText ($addParen) β€” turns it back into text.
    • addParen : this one's only meaningful with the old DE line format, okay? if you set it to true, the name gets surrounded by parentheses β€” but the evidence tags do not, e.g. : '(UMP SYNTHASE){E1}'. see how the parens stop before the {E1}? yeah. that. πŸŽ€

πŸ’œ Evidence Tags πŸ’œ

each protein name (each DE object) can have its own independent evidence tags. no borrowing. everyone gets their own. πŸ”₯

 DE   SubName: Full=Histone H3{EI1};
 DE            EC=3.4.21.9{EC3};
 DE   AltName: Full=Enterokinase{EC5};

the following methods have their prototype defined in SWISS::BaseClass instead of the direct parent of SWISS::DEs, which is SWISS::ListBase. plot twist, I know:

  • addEvidenceTag
  • deleteEvidenceTags
  • getEvidenceTags
  • getEvidenceTagsString
  • hasEvidenceTag
  • setEvidenceTags

example, bestie, watch closely:

$evidenceTag = $entry->Stars->EV->addEvidence('P', 'DEfix', '-', 'v1.3');
$entry->DEs->head->addEvidenceTag($evidenceTag);

and the easiest way to read the evidence tags of a protein name? use c<getEvidenceTagsString>, which returns the evidence tags as a string with the enclosing {} brackets. if there are no evidence tags at all, it returns an empty string. simple as. πŸ’…


😭 POD ERRORS 😭

hey! so the above document had some coding errors, and here's the tea on them:

Around line 165:

=back doesn't take any parameters, but you said =back  =head1
Methods
not the =back catching strays for taking parameters it does not take 😭 the doc really said "=back =head1 Methods" and Perl said absolutely not. iconic behavior, honestly. not me reading a POD error at 3am πŸ’€

that's the whole page, bestie! you made it to the end, so proud of you 🫢 this was SWISS::DE(3pm) from perl v5.32.1, dated 2021-08-15 β€” go forth and parse those protein names, you absolute queen πŸ‘‘βœ¨πŸ’–

πŸ“¦ where this page comes from