[Bioperl-l] Bio::Index::Fasta difficulty
Guojun Yang
gyang at plantbio.uga.edu
Mon Oct 25 16:38:25 EDT 2004
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
More information about the Bioperl-l
mailing list