SWISS::Entry(3pm)

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

πŸ’– Name πŸ’–

SWISS::Entry β€” it's giving main character energy for SWISS-PROT entries, bestie. This is the manual page for the Perl module, and honestly? It ate.


✨ Description ✨

Okay so, SWISS::Entry is the main module to handle SWISS-PROT entries. One Entry object = one SWISS-PROT entry, and it hands you a whole API for modifying it. Slay.

The whole concept here is lazy parsing, and no, that's not me being lazy, it's a design choice. If you make an Entry object out of an entry in flat file format, the text just gets stored in the private text attribute of the entry object. That's it. Nothing else happens. The member objects of the entry only get created if and only if they're dereferenced. It's giving "I'll do it when I feel like it" and honestly, valid. πŸ’…


🌸 Example 🌸

This minimum program reads entries from a file in SWISS-PROT format and prints the primary accession number for each of the entries. Simple, iconic, no notes. ✨


πŸŽ€ Attributes πŸŽ€

These following attributes represent member objects. You can access them like e.g. $entry->IDs β€” super easy, barely an inconvenience.

  • IDs β€” the ID line object πŸ’–
  • ACs
  • DTs
  • DEs
  • GNs
  • OSs
  • OCs
  • Refs β€” the reference block object
  • CCs
  • KWs
  • DRs
  • FTs
  • Stars β€” the object for the annotator's section stored in the ** lines. (the little secret notes, iykyk 🫢)
  • SQs β€” the sequence object

πŸ‘‘ Methods πŸ‘‘

  • new β€” Return a new Entry object. Fresh out the box. πŸ¦‹
  • initialize β€” Initialise an Entry object and return it.
  • update [force] β€” Update an entry. The content of the member objects is written back into the private text attribute of the entry if necessary. If $force is true, an update of all member objects is forced. Like, no questions asked, everything updates. Periodt.
  • reformat β€” Reformat all fields of an entry. Glow-up for your data. ✨
  • fromText $text [, $fullParse[, $removeInternalComments]] β€” Create an Entry object from the text $text. If $fullParse is true, the entry is parsed at creation time. Otherwise the individual line objects are only created if they are dereferenced (lazy queen behaviour, see above). If $removeInternalComments is true, wild comments and indentation will be removed from the text before the parsing is done.
NOTE: wild comments are lines starting with a double asterisk located outside the Stars section, and indented lines are lines starting with spaces. Both are used internally by SWISS-PROT annotators during their work and excluded from internal and external releases. 🀫
  • toText [$insertInternalComments] β€” Return the entry in flat file text format. If internal comments and indentation have been removed as specified in the parameters to fromText(), you may wish to reinsert them in the text output by setting $insertInternalComments to true. Putting the gossip back in, love that for you. πŸ’…
  • toFasta [isoformName] β€” Return the entry in Fasta format (canonical/displayed sequence if no isoform name provided).
  • isoFormNames [all] β€” Return the list of (filtered for not: External|Displayed|Not described|Unknown) isoform names. If all is true: list all isoform names. No filter, no gatekeeping. 🌈
  • isoIds [isoformName] β€” Return list of isoform Ids for a particular isoform name (isoIds for canonical/displayed if no isoform name provided).
  • isoId [isoformName] β€” Return primary isoform Id for a particular isoform name (primary isoId for canonical/displayed if no isoform name provided).
  • isoFormSequence [isoform name] β€” Return the raw sequence for a specified isoform name (raw canonical sequence if no isoform name provided).
  • equal β€” Returns True if two entries are equal, False otherwise. Are they twins or are they just matching vibes? 🫢

The following methods are provided for your convenience. They are shortcuts for methods of the individual line objects. (bestie privileges πŸ’–)

  • ID β€” Returns the primary ID of the entry.
  • AC β€” Returns the primary AC of the entry.
  • SQ β€” Returns the sequence of the entry.
  • EV β€” Returns the EV (evidence) object of an entry. SWISS-PROT internal method.

🧚 Data access methods 🧚

  • text β€” Returns the current text of the entry. Quick and dirty! No update of the text is performed before. Like, zero prep, zero warm-up, just the raw text. 😭
  • database_code β€” Is it a SWISS-PROT, TREMBL or TREMBLNEW entry? database_code tries to find it out. Return values are S for SWISS-PROT, 3 for TREMBL, Q for TREMBLNEW, ? for unknown. The vibe check of the database world. πŸ”₯
  • isFragment β€” Returns true if the DE line indicates a fragment, or of the entry contains a NON_CONS or NON_TER feature.
  • isCurated β€” Returns 1 if the entry is a curated entry, 0 otherwise.
SWISS-PROT internal use only. Don't touch, bestie, it's not for us. πŸ™ˆ

πŸ’€ POD ERRORS πŸ’€

Hey! The above document had some coding errors, which are explained below. Not me snitching on the docs, but okay, we're being honest here:

  • Around line 731:
=over without closing =back

And that's the whole page, bestie! πŸŽ€ This one's from <strong>perl v5.32.1</strong>, dated <strong>2021-08-15</strong>, filed under <strong>SWISS::Entry(3pm)</strong> in User Contributed Perl Documentation. Go forth and parse those entries, you gorgeous thing. πŸ’œβœ¨

πŸ“¦ where this page comes from