The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bio::Graph::IO - Class for reading /writing biological graph data.

SYNOPSIS

  # This is a class for reading /writing biological data that can
  # be represented by graphs e.g., protein interaction data.

  # e.g., a graph reformatter..
  my $graph_in = Bio::Graph::IO->new(-file =>'myfile.dat',
                                     -format=>'dip' );
  my $graph = $graph_in->next_graph();
  my $graph_out = Bio::Graph::IO->new(-file =>'outfile.dat',
                                      -format=>'psixml') ;
  $graph_out->write_graph($graph);

DESCRIPTION

This class is analagous to the SeqIO and AlignIO classes. To read in a file of a particular format, file and format are given as key/value pairs as arguments. The Bio::Graph::IO checks that the appropriate module is available and loads it.

At present only the DIP tab delimited format and PSI XML format are supported

METHODS

The main methods are:

$graph = $io->next_graph()

The next_graph method does not imply that multiple graphs are contained in a file, more to maintain the consistency of nomenclature with the $seqio->next_seq() and $alnio->next_aln() methods.

$io->write_graph($graph) (not implemented yet).

Writes the graph data to file in requested format.

REQUIREMENTS

To read or write from XML you will need the XML::Twig module available from CPAN.

FEEDBACK

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.

  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

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:

  http://bugzilla.open-bio.org/

AUTHOR - Richard Adams

Email richard.adams@ed.ac.uk

new

 Name       : new
 Usage      : $io = Bio::Graph::IO->new(-file => 'myfile.dat', 
                                        -format => 'dip');
 Returns    : A Bio::Graph::IO stream initialised to the appropriate format.
 Args       : Named parameters: 
              -file      => $filename
              -format    => format
              -threshold => a confidence score for the interaction, optional

next_graph

 Name       : next_graph
 Usage      : $gr = $io->next_graph().
 Returns    : A Bio::Graph::ProteinGraph object.
 Args       : None

write_graph

 Name       : write_graph
 Usage      : $gr = $io->write_graph($graph).
 Args       : A Bio::Graph object.
 Returns    : None

_load_format_module

 Title   : _load_format_module
 Usage   : *INTERNAL BioGraphIO stuff*
 Function: Loads up (like use) a module at run time on demand
 Returns :
 Args    :