[Bioperl-l] Bio::SeqIO issue

Chris Fields cjfields at illinois.edu
Thu Aug 6 16:30:01 UTC 2009


On Aug 6, 2009, at 8:36 AM, Hilmar Lapp wrote:

> Why is specifying fasta format when your input is not in fast format  
> not a user error?

Agreed.  My point is should we worry about adding an exception (which  
may be a little more user-friendly).  Right now the bad stuff happens  
silently.

> I agree with the not removing newlines in raw format being a bug.
>
> 	-hilmar

Acc. to the SeqIO::raw docs, this is a little trickier.  The  
documented behavior explicitly indicates that each line (sans non- 
whitespace) is assumed to be a separate sequence, so changing that  
behavior breaks API.

I suppose we can have $/ set locally to a cached $/ default value or  
undef:

# assumes entire file is read in
my $io = Bio::SeqIO->new(-format => 'raw', -gulp => 1);

chris



More information about the Bioperl-l mailing list