[Bioperl-l] error fetching seqs from a local db on win2k

Richard Jacob r-jacob@pacbell.net
27 May 2002 23:26:43 -0700


Hi All,
I'm starting to lean how to use BioPerl. All the data acquisition and
analysis programs for our mass specs run on win2k so I'm also developing
on win2k. Having bitten the bullet I seem to have fallen at the first
fence and can not fetch sequences from local db's. Fetching from remote
db's works fine.

 
I have been trying to read in a sequence from a locally indexed database
using scripts from either the
Pasteur Institute Bioperl Course or
the BioPerl Tutorial
This is using BioPerl 1.0 on both systems.

When indexing a database on win2k the script generates two files:

swiss.inx.dir
swiss.inx.pap

Running the script in verbose mode shows that its reading all the
sequence names correctly.I have tried to index both a swissprot formated
db (sprot40.dat) and the yeast aa Fasta db from NCBI. 

If I then run a script to fetch a sequence I have to use the index name
of swiss.inx or it fails with errors. Using either of the two files
names that the indexing generated causes the script to fail straight
away. When I do use swiss.inx only the first entry can be fetched all
others fail.
 
As you all know indexing a database on Redhat linux makes
swiss.inx
and everything works as expected.

I can supply the windows error messages but don't have them to hand at
the moment as the computer is currently booted in linux.
Anyone have any ideas as to what I'm doing wrong?
I'll supply the error messages tomorrow if they will help. They are very
similar to messages reported by a winNT user in an earlier thread on the
mailing list.

Thanks for any help in this matter.
Richard Jacob


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Here are the scripts:

index_sprotdb.pl
#!/usr/bin/Perl -w
use strict;
use Bio::Index::Swissprot;
my $Index_File_Name = "swiss.inx";
my $DB_File_Name = "sprot40.dat";
my $verbose = 1;
my $inx = Bio::Index::Swissprot->new( -filename => $Index_File_Name,
                                        -write_flag => 1);
if( $verbose != 0 ) {
  $inx->verbose(1);
}
$inx->make_index($DB_File_Name);

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
fetch_from_sprot.pl
#!/usr/bin/perl -w
#grab a sequence from a local db
use strict;
use Bio::Index::Swissprot;

my $acc = $ARGV[0];
chomp $acc;
print "accession number: $acc\n";
my $inx = Bio::Index::Swissprot->new( -filename => 'swiss.inx');

my $seq = $inx->fetch($acc);
print "Seq: ", $seq->accession_number(), " -- ", $seq->desc(), "\n";
print $seq->seq(),"\n";