[Bioperl-l] dbEST read pb

Gilles Parmentier Gilles.Parmentier at ens-lyon.fr
Mon Apr 26 13:42:12 EDT 2004


Sorry,

Forget this, I'm dumb !

Gilles (The one that knows how to waste 3 hours :) )

Gilles Parmentier wrote:
> Hello all,
> 
> I tried the followin code to read a dbEST file (ie dbestXX.gb.gz):
> 
> ####
> 
> use Bio::SeqIO ;
> use Bio::Annotation::Collection ;
> 
> #This scripts extracts all ESTs for a given species from a local dbEST 
> copy.
> 
> $| = 1 ;
> 
> system "ls $ARGV[0]/*.gz > dbest.list" ;
> open (dblist_hnd, "dbest.list") || die ("Cannot open dbest.list\n") ;
> my @dbest_files = <dblist_hnd> ;
> close dblist_hnd ;
> 
> #This should be repeated for each dbEST file:
> #for (my $ind_dbfile = 0 ; $ind_dbfile <= $#dbest_files ; $ind_dbfile++)
> for (my $ind_dbfile = 0 ; $ind_dbfile <= 1 ; $ind_dbfile++)
>     {
>      $dbest_files[$ind_dbfile] =~ s/\n// ;
>      $dbest_files[$ind_dbfile] =~ s/\r// ;
>      print "Working for $dbest_files[$ind_dbfile]\n" ;
>      system "gunzip -c $dbest_files[$ind_dbfile] > dummy" ;
>      #Forgot header:
>      my $in = Bio::SeqIO->new (-file =>"tail -9 dummy |",
>                                -format => 'Genbank') ;
>     $in->_read_GenBank_References ;
> 
>      while (my $seq = $in->next_seq ())
>            {
>             if ($seq->species->binomial eq "$ARGV[1] $ARGV[2]")
>                {
>                 #...
>                 }
>             }
>      }
> 
> ####
> 
> I have this output:
> 
> Working for ../../../dbEST//gbest1.seq.gz          <------- my output
> Can't use an undefined value as a SCALAR reference at 
> /Library/Perl/5.8.4/Bio/SeqIO/genbank.pm line 929.   <---bioperl error msg
> 
> I tried this with linux/debian and macosx, and I got the same.
> 
> Do I miss something or is this a bug ?
> 
> Thanks in adavance
> 
> Gilles
> 
> _______________________________________________
> 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