swiss::de(3pm) [debian man page]
SWISS::DE(3pm) User Contributed Perl Documentation SWISS::DE(3pm) Name SWISS::DE.pm Description Each DE object represents one protein name. The container object for all names of an entry is SWISS::DEs Inherits from SWISS::BaseClass Attributes "text" The raw text of the protein name. Note: as SwissKnife works with both new and old DE line formats, for backward rcompatibility, with both formats everything is parsed and stored the same way as it was with the old format. Therefore the raw text for a name of type 'EC' e.g. 6.3.5.5 will be "EC 6.3.5.5" (instead of "6.3.5.5"). Other strings only present in old DE line text format ('precursor' flag and 'Allergen', 'antigen' strings) are also added in the stored raw text. The safe method to get the DE text is "toText" (with both the new and old DE line format), which for "EC=6.3.5.5" (new DE line format), will return "6.3.5.5" (DE object of 'EC' type). For "(EC 6.3.5.5)" (old DE line format), will return "EC 6.3.5.5" "category" The category of the protein name: 'RecName', 'AltName', 'SubName' (TrEMBL only) DE RecName: Full=CAD protein; DE Short=CAD; Here both names (DE objects), are of category 'RecName' Category can be set/modified using "category(string)" Note: with the old DE line format, this field is undef "type" The type of the protein name: 'Full', 'Short', 'EC' 'Allergen', 'CD_antigen', 'Biotech','INN' DE RecName: Full=CAD protein; DE Short=CAD; Here the first name (DE object), is of type 'Full', the second one is of type 'Short' Type can be set/modified using "type(string)" Note: with the old DE line format, this field is undef Standard methods new fromText toText ($addParen) addParen : (meaningful only with old DE line format) if set to true, the name will be surrounded by parentheses, but not the evidence tags, e.g. : '(UMP SYNTHASE){E1}'. Evidence Tags Each protein name (DE object) can have independent evidence tags. 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, SWISS::ListBase : addEvidenceTag deleteEvidenceTags getEvidenceTags getEvidenceTagsString hasEvidenceTag setEvidenceTags example : $evidenceTag = $entry->Stars->EV->addEvidence('P', 'DEfix', '-', 'v1.3'); $entry->DEs->head->addEvidenceTag($evidenceTag); The easiest way to read the evidence tags of a protein name is to use c<getEvidenceTagsString> that will return the evidence tags as a string with the enclosing {} brackets. If there are no evidence tags, will return an empty string. POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 165: =back doesn't take any parameters, but you said =back =head1 Methods perl v5.10.1 2008-07-17 SWISS::DE(3pm)
Check Out this Related Man Page
SWISS::CCalt_prod(3pm) User Contributed Perl Documentation SWISS::CCalt_prod(3pm) Name SWISS::CCalt_prod.pm Description SWISS::CCalt_prod represents a comment on the topic 'ALTERNATIVE PRODUCTS' within a Swiss-Prot or TrEMBL entry as specified in the user manual http://www.expasy.org/sprot/userman.html . Comments on other topics are stored in other types of objects, such as SWISS::CC (see SWISS::CCs for more information). Collectively, comments of all types are stored within a SWISS::CCs container object. Code example: This example is given to illustrate the internal construction of an CCalt_prod object. However, for most purposes it should be possible to use the convenience methods provided (e.g. the add, delete, get and set methods doocumented below) instead of constructing the section manually. The use of the convenience methods is also recommended to ensure the structual integrity of the CCalt_prod object. ## Create a new named isoform my %thisFormHash; ## give this some properties # some properties are single data values $thisFormHash{"Name"} = "This"; # some properties are lists of values push @{$thisFormHash{"Synonyms"}}, "That"; push @{$thisFormHash{"Synonyms"}}, "The Other"; push @{$thisFormHash{"IsoId"}}, "P00000-01"; push @{$thisFormHash{"IsoId"}}, "P00000-02"; push @{$thisFormHash{"Sequence"}}, "VSP_000001"; push @{$thisFormHash{"Sequence"}}, "VSP_000002"; $thisFormHash{"Notes"} = "This local note"; ## put this form onto a list of all forms created by one type of event my @newFormsList; push @newFormsList, \%thisFormHash; ## put this list into a hash describing all characteristics of this event my %eventHash; $eventHash{"FormsList"} = @newFormsList; ## set other values of this event $eventHash{"Comment"} = "This Comment"; ## put the description of this event into a hash descrinbing all events my %eventsHash; $eventsHash{"Alternative splicing"} = \%eventHash; ## put a reference to this hash into the CCalt_products object my $hashRef; $hashRef = \%eventsHash; my $newCC = SWISS::CCalt_prod; $newCC->setEvents($hashRef); $newCC->toString(); More simply, using the convenience methods addComment and addForm: @synonyms = ("That", "The other"); @isoIds = ("P00000-1", "P00000-2"); @featIds = ("VSP_00001", "VSP_00002"); my $newCC = SWISS::CCalt_prod; $newCC -> addComment("Alternative splicing", "This comment"); $newCC -> addForm("Alternative splicing", "This", @synonyms, @isoIds, @featIds, "This local note"); print $newCC -> toString(); Output from both approaches: CC -!- ALTERNATIVE PRODUCTS: CC Event=Alternative splicing; Named isoforms=1; CC Comment=This comment. CC Name=This; Synonyms=That, The other; CC IsoId=P00000-1, P00000-2; Sequence=VSP_00001, VSP_00002; CC Note=This local note. Example of adding evidence tags to a synonym: $CC -> addEvidenceTag('EP8', "Alternative splicing", "Synonyms", "VI", "B"); to add the tag 'EP8' to synonym B of isoform VI, produced by alternative splicing Handling mutliple events: With the release of UniProt 8.0, the format of the CC ALTERNATIVE PRODUCTS blocks has changed slightly. In particular, isoforms are no longer stored according to the events that have generated them, so this: CC -!- ALTERNATIVE PRODUCTS: CC Event=Alternative splicing; Named isoforms=1; CC Comment=This comment. CC Name=This; Synonyms=That, The other; CC IsoId=P00000-1, P00000-2; Sequence=VSP_00001, VSP_00002; CC Note=This local note. CC Event=Alternative initiation; CC Comment=Another comment. has become this: CC -!- ALTERNATIVE PRODUCTS: CC Event=Alternative splicing, Alternative initation; Named isoforms=1; CC Comment=This comment. Another comment; CC Name=This; Synonyms=That, The other; CC IsoId=P00000-1, P00000-2; Sequence=VSP_00001, VSP_00002; CC Note=Produced by alternative splicing. This local note; The API is quite event-centric, reflecting the previous file format (where different content was available according to the event type). To get all isoforms (for whatever events are annotated) under the new format, do: $CC->keyEvent; which will return an arbitrary event that can be used a parameter in other methods. Any of the events annotated will function as parameters to retrieve information about assocaticated isoforms: it is not necessary to supply the complete list. Inherits from SWISS::BaseClass.pm Attributes topic The topic of this comment ('ALTERNATIVE PRODUCTS'). Standard methods new fromText Reading/Writing methods addEvent ($eventName) Allows the user to insert "events blocks" into the CCalt_prod object. addEvidenceTag($tag, $event, $type, $name, $synonym) Add $tag to the tag list associated with the specified component of a CCalt_prod object. The event and type (of the item to which the tag is to be added, i.e. "Comment", "Name", "Note", or "Synonyms") must always be specified: unless the type is "Comment", the name must also be specifed (i.e. the contents of the Name field for the isoform to which the tag is being attached); the name of the synonym to which the tag are being attached must also be given if the type is "Synonyms". addForm ($eventName, $formName, @synonyms, @isoIds, @featIds, $note) Allows the user to add a form into a given event block. See code example (above) for more details. deleteComment ($eventName) Deletes the comment associated with this event. deleteEvent ($eventName) Deletes an event from this CCalt_prod objects. deleteEvidenceTag($tag, $event, $type, $name, $synonym) Deletes $tag from the tag list associated with the specified component of a CCalt_prod object. The event and type (of the item from which the tag is to be deleted, i.e. "Comment", "Name", "Note", or "Synonyms") must always be specified: unless the type is "Comment", the name must also be specifed (i.e. the contents of the Name field for the isoform from which the tag is being deleted); the name of the synonym from which the tag is being deleted must also be given if the type is "Synonyms". deleteForm ($eventName, $formName) Deletes a form associated with a given event. keyEvent () Extracts one of the events annotated in this entry, which can then be used to retrieve data associated with this event getComment($eventName) Returns the comment for this event. getEventNames Returns a list of all event names for this CCalt_prod object. getEvidenceTags($event, $type, $name, $synonym) Returns a list of the tags attached to the specified component of a CCalt_prod object. The event and type (of the item to which the tag is attached, i.e. "Comment", "Name", "Note", or "Synonyms") must always be specified: unless the type is "Comment", the name must also be specifed (i.e. the contents of the Name field for the isoform whose tags are being fetched); the name of the synonym whose tags are being fetched must also be given if the type is "Synonyms". getEvidenceTagsString($event, $type, $name, $synonym) Returns the tags attached to the specified component of a CCalt_prod object as a string literal. The event and type (of the item to which the tag is attached, i.e. "Comment", "Name", "Note", or "Synonyms") must always be specified: unless the type is "Comment", the name must also be specifed (i.e. the contents of the Name field for the isoform whose tags are being fetched); the name of the synonym whose tags are being fetched must also be given if the type is "Synonyms". getFeatIds ($eventName, $formName) Returns a list of all feature IDs associated with this form produced by this event. getFormNames ($eventName) Returns a list of all form names for this form produced by this event. getIsoIds ($eventName, $formName) Returns a list of all IsoIds for this form produced by this event. getNamedFormCount($eventName) Returns the number of named and identified forms for this event. getNote ($eventName, $formName) Returns the local note of this form produced by this event. getSynonyms ($eventName, $formName) Returns a list of all synonyms of this form produced by this event. hasEvidenceTag ($tag, $event, $type, $name, $synonym) Returns 1 if the specified component of a CCalt_prod object has the specified tag. The event and type (of the item to which the tag is attached, i.e. "Comment", "Name", "Note", or "Synonyms") must always be specified: unless the type is "Comment", the name must also be specifed (i.e. the contents of the Name field for the isoform whose tags are being fetched); the name of the synonym whose tags are being fetched must also be given if the type is "Synonyms". setComment ($eventName, $comment) Allows the user to add a global comment for a particular event. setEvidenceTags(@tags, $event, $type, $name, $synonym) Sets the evidence tags of the specified component of a CCalt_prod object to the array pointed to by @tags. The event and type (of the item to which the tag are to be added, i.e. "Comment", "Name", "Note", or "Synonyms") must always be specified: unless the type is "Comment", the name must also be specifed (i.e. the contents of the Name field for the isoform to which tags are being attached); the name of the synonym to which tags are being attached must also be given if the type is "Synonyms". setEvent (%eventHash) Can be used to manually insert a hash representing one event. Use of this method is not recommeded, see code examples for how to use the convenience methods to create a CCalt_prod object. setFeatIds($eventName, $oldName, @featIds) Sets the feature Ids for the named form (associated with the specified event) to the supplied list. setFormName($eventName, $oldName, $newName) Changes the name of the formed named $OldName, associated with this event, to the $newName. setIsoIds($eventName, $oldName, @isoIds) Sets the Isoform Ids for the named form (associated with the specified event) to the supplied list. setNote($eventName, $name, $note) Sets the local note for the named form (associated with the specified event). setSynonyms($eventName, $name, @synonyms) Sets the synonyms for the named form (associated with the specified event) to the supplied list. toString Returns a string representation of this comment. POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 1540: =back doesn't take any parameters, but you said =back =head1 Methods perl v5.10.1 2008-02-04 SWISS::CCalt_prod(3pm)