Bio::Graph::IO - Class for reading /writing biological graph data.
# 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);
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
The main methods are:
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.
Writes the graph data to file in requested format.
To read or write from XML you will need the XML::Twig module available from CPAN.
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 richard.adams@ed.ac.uk
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
Name : next_graph Usage : $gr = $io->next_graph(). Returns : A Bio::Graph::ProteinGraph object. Args : None
Name : write_graph Usage : $gr = $io->write_graph($graph). Args : A Bio::Graph object. Returns : None
Title : _load_format_module Usage : *INTERNAL BioGraphIO stuff* Function: Loads up (like use) a module at run time on demand Returns : Args :
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.