[Bioperl-l] RE: [NORDNS] [Bioperl-guts-l] [Bug 1508] SeqIO allows fasta to masquerade as genbank or gcg or ace

Brian Osborne brian_osborne at cognia.com
Mon Sep 15 07:46:00 EDT 2003


Jason,

The problem is fundamentally one of consistency. If you give SeqIO a fasta
file and say "-format => genbank"  then there's no error. If you give the
same file with "-format => embl" there's an error. In my opinion there
should always be an error so one can use eval. One way or the other, let's
make up our minds!

Brian O.

~>perl -e 'use Bio::SeqIO; $io = Bio::SeqIO->new(-file => "test.fa", -format
=>
"genbank" ); $seq = $io->next_seq;

Giving SeqIO a fasta file with a stated format of "genbank", "ace", or "gcg"
and calling next_seq() results in no error. Change "genbank"
to "embl", "swiss", "raw", "fastq" or "pir" and it's a fatal error where the
message hints that the actual and stated formats are different. My guess is
that the latter result is preferable.



-----Original Message-----
From: bioperl-guts-l-bounces at portal.open-bio.org
[mailto:bioperl-guts-l-bounces at portal.open-bio.org]On Behalf Of
bugzilla-daemon at portal.open-bio.org
Sent: Saturday, September 13, 2003 6:21 PM
To: bioperl-guts-l at bioperl.org
Subject: [NORDNS] [Bioperl-guts-l] [Bug 1508] SeqIO allows fasta to
masquerade as genbank or gcg or ace

http://bugzilla.bioperl.org/show_bug.cgi?id=1508





------- Additional Comments From jason at open-bio.org  2003-09-13
18:21 -------
So you're wanting it to
   throw a nonfatal error when we've specified the format as 'FASTA'
   but in fact the format is not FASTA?

I don't know how to do this and not also throw an error when passed an empty
file. (Maybe we should be throwing non-fatal errors there as well).  My
strategy
would be to throw some sort of warning/error when we get to the end of the
file/stream and the numer of sequences read is still 0.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Bioperl-guts-l mailing list
Bioperl-guts-l at portal.open-bio.org
http://portal.open-bio.org/mailman/listinfo/bioperl-guts-l




More information about the Bioperl-l mailing list