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

Guojun Yang gyang at plantbio.uga.edu
Tue Oct 26 10:03:23 EDT 2004


Hi, Brian,
I tried Bio::DB::Fasta, it does not work either on Linux or Windows 2000. No error messages, but not $seq object. Currently, the only working system is Bio::Index::Fasta on Windows 2000. I really need to make it working on Linux. Appreciate you help!
Yang



Hi, Brian,
Thank you for your reply. There is no error message when the idx file was made. No error message when retrieving. But there is no result, so the continuing operation(not included in my script shown) of $seq->length() returned error saying "can't call method length() on an undefined data. Apparently, there is nothing return for $seq. My feeling is that the indexing is not working. BTW, by database file contains a single word such as ">protein1" as the header for each entry. It worked perfectly in Windows! I will also try Bio::DB::FASTA. I look forward to hearing more from you.
Yang

----- Original Message -----
From: Brian Osborne <brian_osborne at cognia.com>
To: Guojun Yang <gyang at plantbio.uga.edu>, bioperl-l at portal.open-bio.org
Sent: Tue, 26 Oct 2004 08:15:26 -0400
Subject: RE: [Bioperl-l] Bio::Index::Fasta difficulty


> 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
> 
> 
> _______________________________________________
> 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