[Bioperl-l] Bio::Index::Fasta difficulty

Brian Osborne brian_osborne at cognia.com
Tue Oct 26 08:15:26 EDT 2004


Yang,

Any error messages?

Brian O.

-----Original Message-----
From: bioperl-l-bounces at portal.open-bio.org
[mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Guojun Yang
Sent: Monday, October 25, 2004 4:38 PM
To: bioperl-l at portal.open-bio.org
Subject: [Bioperl-l] Bio::Index::Fasta difficulty

Hi, everybody,
I encountered a difficulty when I am trying to index a database and retrieve
items. The following is the sub:

$ENV{BIOPERL_INDEX_TYPE}="SDBM_File";
$ENV{BIOPERL_INDEX}=".";

...

sub getseq {
use Bio::Index::Fasta;
use strict;
my $name=$_[0];
my $file_name=$_[1];
my $inx=Bio::Index::Fasta->new (-filename=>$file_name.".idx",
                                -write_flag=>1);
$inx->id_parser(\&get_id);
$inx->make_index($file_name);
my $seq =$inx->fetch($name);
return $seq;
      }

sub get_id {
    my $header=shift;
    $header=~ /^>(.*)/i;
$1;
}


when the script was run in windows 2000, it produced two files with .idx.pag
(fairly big file) and .idx.dir (relatively small file). Everything went
perfect. However, when I try to move the same code to a linux system (either
ReadHat or Suse). There is only one .idx file produced and is significantly
smaller than the .idx.pag from windows. It does not return a valid $seq
object in Linux. I tried to change some thing and tried the bioperl
/scripts/index/bp_index.PLS, nothing seems to work in linux. Is there any
idea about what is happening in this situation?
Thank you,
Yang


_______________________________________________
Bioperl-l mailing list
Bioperl-l at portal.open-bio.org
http://portal.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list