Bio::Graph::SimpleGraph::Traversal - graph traversal operations for Bio::Graph::SimpleGraph and Bio::Graph::Protein::Graph objects
use Bio::Graph::SimpleGraph::Traversal; use Bio::Graph::SimpleGraph; ## get a graph , $g. my $traversal = Bio::Graph::SimpleGraph::Traversal->new(-graph=>$g, -start=>$start, -order=>$order, -what =>$what); ## cycle through nodes one at a time while ($traversal->has_next() ) { my $node = $traversal->get_next(); } ## reset traversal to start $traversal->reset; ## get all nodes my @all_nodes = $traversal->get_all();
This is a helper class for performing graph traversal operations for Bio::Graph::SimpleGraph objects and Bio::Graph::Protein::Graph objects. The documentation concerning the use of this class is described in the "Graph algorithms" section of the Bio::Graph::SimpleGraph modules. Only the methods are documented here.
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/
Email natg@shore.net, richard.adams@ed.ac.uk
name : has_next usage : while (my $traversal->has_next() ) {.. purpose : returns true if there are more items in traversal, else undef arguments : none returns : true or unde;
name : get_next usage : my $node = $traversal->get_next() ; purpose : returns next item in traversal or undef if traversal is exhausted. arguments : none returns : a node or undef;
name : get_all usage : my @nodes = $traversal->get_all() ; purpose : get all remaining items in traversal as ARRAY (in array context) or ARRAY ref. arguments : none returns : an array, an array reference or undef.
name : get_all usage : my @nodes = $traversal->get_all() ; purpose : gets current node in traversal arguments : none returns : the current node or undef.
name : reset usage : $traversal->reset() ; purpose : restarts traversal from first node arguments : none returns : void.
To install Bio::Seq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Seq
CPAN shell
perl -MCPAN -e shell install Bio::Seq
For more information on module installation, please visit the detailed CPAN module installation guide.