[Bioperl-l] dbEST read pb

Gilles Parmentier Gilles.Parmentier at ens-lyon.fr
Tue Apr 27 01:32:20 EDT 2004


Hello,

Yeah, thanks. In fact it was a test to remove the genbank header. I just 
forgot to remove this line and it caused some problems... BTW, is there 
a method (I didn't find one in the doc) to remove the first 9 lines or 
is the pipe the right way ro handle this problem ? In this case it is 
not easy to find and it should be (better) documented ?

Thanks,

Gilles

Hilmar Lapp wrote:

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




More information about the Bioperl-l mailing list