[Bioperl-l] Bio::Index:SwissPfam file loading problem

Eden Dr eddr666 at gmail.com
Tue Jul 19 13:38:25 UTC 2011


Hi

I'm trying to use Bio::Index::SwissPfam module as in the documentation's
example.
The file : swisspfam from pfam ftp, current_release:
ftp://ftp.sanger.ac.uk/pub/databases/Pfam/current_release
the code:
use strict;
use Getopt::Long;
use File::Basename;
use Pg;
use sigtrap 'handler' => \&handle_interrupt, 'INT';
use Bio::SeqIO;
use Bio::Index::SwissPfam;

my $pfam_domains_fasta_file = $ARGV[0];

my $inx = Bio::Index::SwissPfam->new('-filename' =>
$pfam_domains_fasta_file);
my $seq = $inx->fetch('005L_IIV3'); # Returns stream
while( <$seq> ) {
    if(/^>/) {
    print;
last;
    }
}
exit;

and I get the following error message:

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Can't open 'DB_File' dbm file 'swisspfam' : Inappropriate file type or
format
STACK: Error::throw
STACK: Bio::Root::Root::throw
/usr/local/lib/perl5/site_perl/5.10.1/Bio/Root/Root.pm:368
STACK: Bio::Index::Abstract::open_dbm
/usr/local/lib/perl5/site_perl/5.10.1/Bio/Index/Abstract.pm:399
STACK: Bio::Index::Abstract::new
/usr/local/lib/perl5/site_perl/5.10.1/Bio/Index/Abstract.pm:163
STACK: parse_proteins_file.pl:34
-----------------------------------------------------------

what do I do wrong?

Thanks
Eden



More information about the Bioperl-l mailing list