[Bioperl-l] fetching a fasta file

Marc Logghe Marc.Logghe at devgen.com
Fri Feb 6 04:52:20 EST 2004



> -----Original Message-----
> From: KHOUEIRY pierre [mailto:khoueiry at ibsm.cnrs-mrs.fr]
> Sent: Friday, February 06, 2004 10:33 AM
> To: bioperl-l at bioperl.org
> Subject: [Bioperl-l] fetching a fasta file
> 
> 
> Hello,
> I have to search for sequences from a local fasta file. my sequences 
> Id's are in a table
> my @ID = 
> ('AAS_ECOLI','ABGT_ECOLI','ABRB_ECOLI','ACFD_ECOLI','ACRA_ECOL
> I','ACRB_ECOLI'). 
> 
> I tried to index my file but it doesn't work.
> I used something like:
>  $index = Bio::Index::Fasta->new("$file", 'WRITE');
>  $index->make_index($file);
> 
> Sometimes I'm getting  message
> Can't open 'DB_File' dbm file '/home/pierre/Perl/col2.fasta' 
> : File exists

Hi,
the problem is that you use the same name for your index file as for your fasta file.
this should do it:
 $index = Bio::Index::Fasta->new("${file}.idx", 'WRITE');
 $index->make_index($file);
HTH,
Marc



More information about the Bioperl-l mailing list