
Bio::Network::Interaction - describes a protein-protein interaction

# Add an interaction with some attributes
use Bio::Network::Interaction;
my $interx = Bio::Network::Interaction->new(-weight => $score,
-id => $id);
$gr->add_interaction(-nodes => [($node1,$node2)],
-interaction => $interx);
# Retrieve an interaction using an identifier
my $interaction = $gr->get_interaction_by_id($id);
my $id = $interaction->primary_id;
my $wt = $interaction->weight;
my @nodes = $interaction->nodes;

This class contains information about a bi-molecular interaction. At present it just contains data about a weight (optional) and an identifier. Subclasses could hold more specific information. A pair of nodes can have more than one Interaction object associated with it.

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
http://bugzilla.open-bio.org/

Richard Adams richard.adams@ed.ac.uk Brian Osborne bosborne at alum.mit.edu
Maintained by Brian Osborne
Name : new
Purpose : Constructor for an Interaction object
Usage : my $interx = Bio::Network::Interaction->new(-id => $id);
Returns : A new Bio::Network::Interaction object
Arguments : -id => interaction id
-weight (optional) => weight score
Name : weight
Purpose : Get or set a weight or score
Usage : my $weight = $interx->weight()
or
$interx->weight(3)
Returns : a number
Arguments : Nothing or a number
Name : primary_id
Purpose : Get or set the primary_id
Usage : my $id = $interx->primary_id()
or
$interx->primary_id("SIB4")
Returns : A string identifier
Arguments : Nothing or an identifier
Name : nodes
Purpose : Get the pair of nodes for an Interaction
Usage : my $count = $interx->nodes
or
my @nodes = $interx->nodes
Returns : Gets an array of 2 Nodes or a count of the number of
Nodes
Arguments :
Notes : Getting a count of the number of Nodes in an Interaction
will almost always return 2, but there is a formal possibility
that a Node could interact with itself, returning 1
Title : annotation
Usage : my $annotation = $ix->annotation
or
$ix->annotation($annotation)
Function: Gets or sets the annotation
Returns : Bio::AnnotationCollectionI object
Args : None or Bio::AnnotationCollectionI object
See Bio::AnnotationCollectionI and Bio::Annotation::Collection for more information
Name : object_id Purpose : Alias to primary_id Usage : my $id = $edge->object_id() Notes : Deprecated