[Bioperl-l] dbEST read pb

Hilmar Lapp hlapp at gnf.org
Mon Apr 26 19:51:24 EDT 2004


Hi Gilles, just as an added piece of advice, whenever you find yourself 
calling a bioperl method that starts with an underscore you're almost 
certainly on the wrong path.

Methods that start with an underscore are to be considered private to 
the module or to the library; a 'normal mortal' should never ever need 
to call such a method.

	-hilmar

On Monday, April 26, 2004, at 10:42  AM, Gilles Parmentier wrote:

> 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
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------




More information about the Bioperl-l mailing list