[BioRuby] fastacmd.rb: iteration

GOTO Naohisa ngoto at gen-info.osaka-u.ac.jp
Wed Mar 22 10:29:27 UTC 2006


Hi jan,

I found a bug in the Bio::FlatFile. Because io/fastacmd.rb
internally uses FlatFile, the bug may be related to the problem.

The bug is that IO#pos raises error when the IO object isn't
a regular file (e.g. pipe) but FlatFile always tried to get pos.
It is fixed in the CVS now.

On Tue, 21 Mar 2006 12:38:30 -0000
"jan aerts \(RI\)" <jan.aerts at bbsrc.ac.uk> wrote:

> Hi,
> 
> Could someone please have a look at the each_entry method of
> io/fastacmd.rb (in cvs)? The code below gives the sequences of
> 'id_of_entry1' and 'id_of_entry2', but the each_entry method gives no
> output. Any ideas?
> 
>   fastacmd = Bio::Blast::Fastacmd.new("/path_to_my_db/db_name")
>   seqs = fastacmd.fetch(['id_of_entry1','id_of_entry2'])
>   seqs.each do |seq|
>     puts seq                        => works fine
>   end
> 
>   fastacmd.each_entry do |fasta|
>     puts 'hi'                       => it never seems to get here...
>   end
> 
> Thanks,
> Jan Aerts, PhD
> Bioinformatics Group
> Roslin Institute
> Roslin, Scotland, UK
> +44 131 527 4200
> 
> ---------The obligatory disclaimer--------
> The information contained in this e-mail (including any attachments) is
> confidential and is intended for the use of the addressee only.   The
> opinions expressed within this e-mail (including any attachments) are
> the opinions of the sender and do not necessarily constitute those of
> Roslin Institute (Edinburgh) ("the Institute") unless specifically
> stated by a sender who is duly authorised to do so on behalf of the
> Institute. 

-- 
Naohisa GOTO
ngoto at gen-info.osaka-u.ac.jp
Department of Genome Informatics, Genome Information Research Center,
Research Institute for Microbial Diseases, Osaka University, Japan



More information about the BioRuby mailing list