[BioPython] Bio.SeqIO and files with one record

Jan Kosinski kosa at genesilico.pl
Wed Jul 11 09:58:27 UTC 2007


I think this is a rare case that python program must be sure that no 
other sequences are in the file it reads. If a program reads a file with 
single sequence using SeqIO.parse and refer to that sequence by sth like 
"records[0]" it is not needed to check if there were other sequences in 
the file as far as the program was not design to notify the user that 
perhaps he made an error by providing a file with multiple sequences.

Actually, although parse_single would be useful, such function adds 
little new value to biopython and certainly adding this function could 
be postponed to the time when you really don't know what to add more to 
biopython ;-) Yet, I it is worth adding if it does not require much work 
and it would not mess up the interface at all.

Janek

Peter wrote:
>
>
> The question is, is this worth adding to the interface or is this a 
> relatively rare need?


:.




More information about the Biopython mailing list