Author image Christopher Fields
and 1 contributors


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.


Mailing Lists

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.                  - General discussion  - About the mailing lists


Please direct usage questions or support issues to the mailing list:

rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.

Reporting Bugs

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:


Brian Osborne bosborne at Richard Adams

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()
 Returns   : a number
 Arguments : Nothing or a number


 Name      : primary_id
 Purpose   : Get or set the primary_id
 Usage     : my $id = $interx->primary_id()
 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
              my @nodes = $interx->nodes
 Returns    : Gets an array of 2 Nodes or a count of the number of
 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 
 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