1 # $Id: GraphAdaptor02.pm 10525 2006-09-26 22:03:22Z sendu $
3 # BioPerl adaptor for old Graph verions (0.2x) for use in
4 # Bio::Ontology::SimpleGOEngine
6 # Please direct questions and support issues to <bioperl-l@bioperl.org>
8 # Cared for by Nat Goodman <natg at shore.net>
10 # (c) Nathan Goodman natg@shore.net 2005
11 # (c) ISB, Institute for Systems Biology 2005
13 # You may distribute this module under the same terms as perl itself.
14 # Refer to the Perl Artistic License (see the license accompanying this
15 # software package, or see http://www.perl.com/language/misc/Artistic.html)
16 # for the terms under which you may use, modify, and redistribute this module.
18 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
19 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
20 # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 # You may distribute this module under the same terms as perl itself
24 # POD documentation - main docs before the code
28 Bio::Ontology::SimpleGOEngine::GraphAdaptor02 - Graph adaptor (v02.x) for
29 Bio::Ontology::SimpleGOEngine
33 Internal subclass of Bio::Ontology::SimpleGOEngine::GraphAdaptor for
36 Call this via Bio::Ontology::SimpleGOEngine::GraphAdaptor
42 User feedback is an integral part of the evolution of this and other
43 Bioperl modules. Send your comments and suggestions preferably to the
44 Bioperl mailing lists Your participation is much appreciated.
46 bioperl-l@bioperl.org - General discussion
47 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
51 Please direct usage questions or support issues to the mailing list:
53 I<bioperl-l@bioperl.org>
55 rather than to the module maintainer directly. Many experienced and
56 reponsive experts will be able look at the problem and quickly
57 address it. Please include a thorough description of the problem
58 with code and data examples if at all possible.
62 report bugs to the Bioperl bug tracking system to help us keep track
63 the bugs and their resolution. Bug reports can be submitted via the
66 http://bugzilla.open-bio.org/
72 Email: natg at shore.net
76 Institute for Systems Biology
78 Seattle, WA 98103-8904
82 The rest of the documentation details each of the object
83 methods. Internal methods are usually preceded with a _
87 # Let the code begin...
89 package Bio
::Ontology
::SimpleGOEngine
::GraphAdaptor02
;
94 use base
qw(Bio::Ontology::SimpleGOEngine::GraphAdaptor);
97 # v0.2x returns (u0,v0, u1,v1, ...)
98 # v0.5x returns ([u0,v0], [u1,v1], ...)
101 my @edges02=$self->_graph->edges(@_);
104 my($u,$v)=(shift @edges02,shift @edges02);
105 push(@edges,[$u,$v]);
111 # v0.2x uses edges() method and returns (u0,v0, u1,v1, ...)
112 # v0.5x returns ([u0,v0], [u1,v1], ...)
118 # set_vertex_attribute
119 # v0.2x uses set_attribute($attribute,$v,$value)
120 sub set_vertex_attribute
{
121 my($self,$v,$attribute,$value)=@_;
122 $self->_graph->set_attribute($attribute,$v,$value);
125 # get_vertex_attribute
126 # v0.2x uses get_attribute($attribute,$v)
127 sub get_vertex_attribute
{
128 my($self,$v,$attribute)=@_;
129 $self->_graph->get_attribute($attribute,$v);
133 # v0.2x uses set_attribute($attribute,$u,$v,$value)
134 sub set_edge_attribute
{
135 my($self,$u,$v,$attribute,$value)=@_;
136 $self->_graph->set_attribute($attribute,$u,$v,$value);
140 # v0.2x uses get_attribute($attribute,$u,$v)
141 sub get_edge_attribute
{
142 my($self,$u,$v,$attribute)=@_;
143 $self->_graph->get_attribute($attribute,$u,$v);