Provided by: libswiss-perl_1.67-1.1_all bug

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