SWISS::CCalt_prod(3pm) | User Contributed Perl Documentation | SWISS::CCalt_prod(3pm) |
SWISS::CCalt_prod.pm
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", "ECO:0000269|PubMed:22081402, ECO:0000269|PubMed:23203051" ] ]; $thisFormHash{"Notes"} = [ [ "another local note without ev", "" ] ]; $thisFormHash{"Notes"} = [ [ "note block1", "ECO:0000269|PubMed:22081402" ], [ "note block2", "ECO:0000269|PubMed:23203051" ] ]; ## 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", "ECO:0000269|PubMed:23203051" ] ]; ## 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", "ECO:0000269|PubMed:22081402, ECO:0000269|PubMed:23203051" ] ]); 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. CC {ECO:0000269|PubMed:22081402, ECO:0000269|PubMed:23203051};
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.
SWISS::BaseClass.pm
Allows the user to add a global comment for a particular event.
Hey! The above document had some coding errors, which are explained below:
2021-08-15 | perl v5.32.1 |