Christopher Fields
and 1 contributors


Bio::Network::Node - describe a Node, either a protein or protein complex


  use Bio::Network::Node;

  my $node = Bio::Network::Node->new(-protein => [($seq1,$seq2)]);

  # or get nodes from a network:
  my @nodes = $graph->nodes;
  for my $node (@nodes) {
     my @proteins = $node->proteins
     for my $protein (@proteins) {
        print "Sequence is ", $protein->seq;


This class describes nodes in a network of interactions. A node is either a protein, a Sequence object, or a protein complex, which is a collection of Sequence objects.


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

Maintained by Brian Osborne


 Name       : new
 Purpose    : Constructor for an Node object
 Usage      : my $node = Bio::Network::Node->new(-protein => $seqobj)   
              my $node = Bio::Network::Node->new(-protein => [($seqobj1,$seqobj2)])  
              my $node = Bio::Network::Node->new(-protein => 
                                               [ [(2, $seqobj1)],
                                                                                                                                 [(1, $seqobj2)],
                                                 [(3, $seqobj3)] ];
 Returns    : A new Bio::Network::Node object 
 Arguments  : -protein => 1 Sequence object    
                                  -protein => Reference to an array containing 1 or more
                          Sequence objects       
              -protein => Reference to an array of arrays where the elements are 
                          arrays containing a number denoting the number of subunits of 
                          a protein in the protein complex and a Sequence object
 Notes      :


 Name       : proteins
 Purpose    : Get the proteins in a Node or get a count of proteins in the Node
 Usage      : my $count = $node->proteins   
              my @proteins = $node->proteins 
 Returns    : Gets an array of Sequence objects or a count of 
              the number of Sequence objects
 Arguments  : None


 Name       :
 Purpose    :
 Usage      :
 Returns    :
 Arguments  :


 Name       : is_complex
 Purpose    : Get or set whether a node is a protein or a protein complex
 Usage      : if ($node->is_complex){ ... }
 Returns    : 1 if the Node has more than 1 proteins, 0 if not
 Arguments  : None


 Name       : subunit_number
 Purpose    : Get or set the number of a given protein in a protein
 Usage      : $num = $node->subunit_number($protein)    
 Returns    : A number, whether get or set
 Arguments  : None or a Sequence object in a given Node