[Bioperl-l] Needed help

Raman Deep Singh deep.raman at gmail.com
Tue Feb 7 15:16:48 EST 2006


Hi all
     I have a huge task of retrieving a number of sequences from the
swiss prot databases on some fixed criteria. FOr that i want to index
the swiss prot database on my local disk. I have downloaded the whole
swiss prot database on my local disc  (the january 2006 release).

  I am currently using the bioperl on linux machine . I am using the
code listed below


=======================

    use Bio::Index::Swissprot;

    my $Index_File_Name = shift;
    my $inx = Bio::Index::Swissprot->new('-filename' => $Index_File_Name,
 '-write_flag' => 'WRITE');
    $inx->make_index(@ARGV);
-----------------------------------------
    # Print out several sequences present in the index
    # in gcg format
    use Bio::Index::Swissprot;
    use Bio::SeqIO;

    my $out = Bio::SeqIO->new( '-format' => 'gcg', '-fh' => \*STDOUT );
    my $Index_File_Name = shift;
    my $inx = Bio::Index::Swissprot->new('-filename' => $Index_File_Name);

    foreach my $id (@ARGV) {
        my $seq = $inx->fetch($id); # Returns Bio::Seq object
        $out->write_seq($seq);
    }

    # alternatively

    my $seq1 = $inx->get_Seq_by_id($id);
    my $seq2 = $inx->get_Seq_by_acc($acc);


-- -------------------------------
i am running teh script as

 perl getseqfromid.pl sample.dat

from the shell

and i am getting this error repeatedly

------------- EXCEPTION  -------------
MSG: Can't open 'DB_File' dbm file 'swiss100.dat' : No such file or directory
STACK Bio::Index::Abstract::open_dbm
/usr/lib/perl5/site_perl/5.8.5/Bio/Index/Abstract.pm:389
STACK Bio::Index::Abstract::new
/usr/lib/perl5/site_perl/5.8.5/Bio/Index/Abstract.pm:150
STACK Bio::Index::AbstractSeq::new
/usr/lib/perl5/site_perl/5.8.5/Bio/Index/AbstractSeq.pm:91
STACK toplevel i.pl:6


--------------------------
At some place online, i also found some document that some variables
need to be exported. I also did the same but still got teh same errors

kindly  help




Ramandeep Singh



More information about the Bioperl-l mailing list