[Bioperl-guts-l] bioperl-live/Bio/Graph Edge.pm, 1.4, 1.5 ProteinGraph.pm, 1.17, 1.18 SimpleGraph.pm, 1.6, 1.7

Heikki Lehvaslaiho heikki at pub.open-bio.org
Wed Dec 8 06:46:43 EST 2004


Update of /home/repository/bioperl/bioperl-live/Bio/Graph
In directory pub.open-bio.org:/tmp/cvs-serv28697/Bio/Graph

Modified Files:
	Edge.pm ProteinGraph.pm SimpleGraph.pm 
Log Message:
made SYNOPSIS section to compile, helped by "cd maintenance; ./modules.pl --synopsis"


Index: Edge.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graph/Edge.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Edge.pm	7 Dec 2004 13:03:42 -0000	1.4
--- Edge.pm	8 Dec 2004 11:46:41 -0000	1.5
***************
*** 8,16 ****
  =head1 NAME
  
! Bio::Graph::Edge
  
  =head1 SYNOPSIS
- 
- An encapsulation of an interaction between 2 Bio::Seq objects
  
    ## get an interaction between two nodes ##
--- 8,14 ----
  =head1 NAME
  
! Bio::Graph::Edge - encapsulation of an interaction between 2 Bio::Seq objects
  
  =head1 SYNOPSIS
  
    ## get an interaction between two nodes ##

Index: ProteinGraph.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graph/ProteinGraph.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** ProteinGraph.pm	10 Nov 2004 09:41:34 -0000	1.17
--- ProteinGraph.pm	8 Dec 2004 11:46:41 -0000	1.18
***************
*** 60,69 ****
    my @neighbors = $graph->neighbors($node); 
    print "      NP_023232 interacts with ";
!   print join " ," map{$_->object_id()} @neighbors;
    print "\n";
  
    # annotate your sequences with interaction info
  
!   my @my_seqs; ##array of sequence objects
    for my $seq(@seqs) {
      if ($graph->has_node($seq->accession_number)) {
--- 60,69 ----
    my @neighbors = $graph->neighbors($node); 
    print "      NP_023232 interacts with ";
!   print join " ,", map{$_->object_id()} @neighbors;
    print "\n";
  
    # annotate your sequences with interaction info
  
!   my @seqs; ##array of sequence objects
    for my $seq(@seqs) {
      if ($graph->has_node($seq->accession_number)) {
***************
*** 89,93 ****
      }
    }
!   print "the following proteins have > 10 interactors:\n"
    print join "\n", map{$_->object_id()} @hubs;
  
--- 89,93 ----
      }
    }
!   print "the following proteins have > 10 interactors:\n";
    print join "\n", map{$_->object_id()} @hubs;
  
***************
*** 104,108 ****
  
    # e.g.
!   edgeid node1  node2 node2 score
  
    my $io = Bio::Root::IO->new(-file => 'mydata');
--- 104,108 ----
  
    # e.g.
!   # edgeid node1  node2 node2 score
  
    my $io = Bio::Root::IO->new(-file => 'mydata');
***************
*** 128,133 ****
    # make an edge
    my $edge  = Bio::Graph::Edge->new(-nodes => \@nodes,
!                                     -id    => $e_id,
!                                     -weight=> $sc);
    # add it to graph
    $gr->add_edge($edge);
--- 128,133 ----
    # make an edge
    my $edge  = Bio::Graph::Edge->new(-nodes => \@nodes,
!                                     -id    => 'myid',
!                                     -weight=> 1);
    # add it to graph
    $gr->add_edge($edge);

Index: SimpleGraph.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graph/SimpleGraph.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SimpleGraph.pm	2 Nov 2004 03:10:43 -0000	1.6
--- SimpleGraph.pm	8 Dec 2004 11:46:41 -0000	1.7
***************
*** 22,26 ****
    my @nodes=graph->nodes;	    # get list of nodes
    my @edges=graph->edges;	    # get list of edges
!   for each $node (@nodes) {
      my @neighbors=$node->neighbors; # get list of neighboring nodes
    }
--- 22,26 ----
    my @nodes=graph->nodes;	    # get list of nodes
    my @edges=graph->edges;	    # get list of edges
!   foreach my $node (@nodes) {
      my @neighbors=$node->neighbors; # get list of neighboring nodes
    }



More information about the Bioperl-guts-l mailing list