[Bioperl-l] problems with Bio::Graph

Brian Osborne osborne1 at optonline.net
Mon May 22 21:37:50 UTC 2006


Neil,

Let me propose an alternative. In the past few months I've been working on a
Bioperl package for handling protein interaction networks, it is called
bioperl-network. It's similar to the Bio::Graph modules, except for the
following:

- It does not use Nat Goodman's SimpleGraph, it uses Perl's Graph. The
advantage is that we are not responsible for maintaining the algorithm code,
the disadvantage is that Graph has some bugs but Jarkko Hietaniemi has been
working on these and has fixed some significant ones recently.

- It uses names and concepts from Graph. It also has separate notions of
edge and interaction, where one edge can have one or more interactions.

- It uses more method names and conventions borrowed from interaction
databases and PSI MI. For example, a node can be a protein complex composed
of multiple Seq objects, not just a protein.

This package is a makeover of Bio::Graph, therefore Nat Goodman and Richard
Adams are major contributors to it. It's also worth mentioning that it's not
complete, meaning it won't parse all fields from PSI MI 2 or 2.5 but I think
it should be able to handle the code you've shown (and if it cannot then
I'll see that it's fixed). I don't know about PSI MI version 1 but if I'm
not mistaken there's a version 1 -> version 2 converter.

I'm about to put this into CVS so you can take a look, should you choose to.

Brian O.


On 5/21/06 6:17 PM, "Neil Saunders" <n.saunders at uq.edu.au> wrote:

> dear all,
> 
> I am having some problems with the Bio::Graph modules.  Running Bioperl 1.5.0
> RC1 with Ubuntu 5.10 i686.
> 
> I would like to parse files in PSI MI XML 2.5 format and for selected
> proteins, 
> get the Uniprot accession of interacting partners (this is outlined in the
> documentation for Bio::Graph::ProteinGraph).  I wrote a very simple test
> script 
> and ran it on a selection of XML files.  The script is simply:
> 
> ----------------------------------------------------------------
> use strict;
> use Bio::Graph::IO;
> 
> my $mifile = shift || die("Usage = biograph.pl <MI datafile>\n");
> my $graphio = Bio::Graph::IO->new('-file'   => $mifile,
>  '-format' => 'psi_xml');
> my $gr = $graphio->next_network;
> ----------------------------------------------------------------
> 
> Here's a summary of the error messages with some sample files (I tried PSI MI
> XML versions 1 and 2.5):
> 
> 1.  MINT database 9707552_small.xml (PSI 2.5)
> Can't call method "att" on an undefined value at
> /usr/local/share/perl/5.8.7/Bio/Graph/IO/psi_xml.pm line 173.
> 
> 2. IntAct database yeast_small-11.xml (PSI 2.5)
> Can't call method "att" on an undefined value at
> /usr/local/share/perl/5.8.7/Bio/Graph/IO/psi_xml.pm line 173.
> 
> 3. IntAct database yeast_small-11.xml (PSI 1)
> Use of uninitialized value in string eq at
> /usr/local/share/perl/5.8.7/Bio/Graph/IO/psi_xml.pm line 126.
> 
> 4. DIP files Scere20060402.mif, Ecoli20060402.mif (PSI 1)
> These give no errors
> 
> 5. DIP file dip20060402.mif (PSI 1, complete dataset)
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: Invalid species name 'immunodeficiency virus type 1, HIV-1'
> STACK: Error::throw
> STACK: Bio::Root::Root::throw /usr/local/share/perl/5.8.7/Bio/Root/Root.pm:328
> STACK: Bio::Species::validate_species_name
> /usr/local/share/perl/5.8.7/Bio/Species.pm:340
> STACK: Bio::Species::classification
> /usr/local/share/perl/5.8.7/Bio/Species.pm:170
> STACK: Bio::Species::new /usr/local/share/perl/5.8.7/Bio/Species.pm:118
> STACK: Bio::Graph::IO::psi_xml::_proteinInteractor
> /usr/local/share/perl/5.8.7/Bio/Graph/IO/psi_xml.pm:105
> STACK: XML::Twig::_twig_end /usr/share/perl5/XML/Twig.pm:1473
> STACK: XML::Parser::Expat::parse /usr/lib/perl5/XML/Parser/Expat.pm:469
> STACK: XML::Parser::parse /usr/lib/perl5/XML/Parser.pm:187
> STACK: XML::Parser::parsefile /usr/lib/perl5/XML/Parser.pm:233
> STACK: Bio::Graph::IO::psi_xml::next_network
> /usr/local/share/perl/5.8.7/Bio/Graph/IO/psi_xml.pm:79
> STACK: ./biograph.pl:18
> -----------------------------------------------------------
> 
> 
> Looking at the module code, it seems that the first 2 errors relate to a
> parameter "proteinInteractorRef", found in PSI MI version 1 but not version
> 2.5. 
>   Error 3 I haven't yet figured out.  DIP PSI MI XML version 1 for single
> species seems OK, but it seems there are species names in the complete dataset
> that cause problems (error 5).
> 
> 
> Is the CVS version of Bio::Graph any better at handling PSI MI XML?  Are there
> plans to get it to work with version 2.5 files from all sources (MINT and
> IntAct) ?  Googling and checking the list archives didn't give a lot of hits
> which made me think it's not a widely-used module.
> 
> thanks,
> Neil





More information about the Bioperl-l mailing list