[Biopython-dev] Bio.IntelliGenetics
Peter
biopython at maubp.freeserve.co.uk
Wed Jul 2 14:56:00 UTC 2008
>> If you did create an iterator class, would you make the
>> header available as a property of the iterator?
>
> I am not sure what you mean by a property of the iterator. I was
> thinking to simply add a field to the class.
Adding the file header field to the iterator class? You could do I suppose.
Right now all the Bio.SeqIO parsers use generator functions (although
not in AlignIO), although I have no objection to returning iterator
classes instead.
I don't really like the idea of Bio.SeqIO parsers returning anything
other than SeqRecord objects - even if it is indirectly via a richer
iterator object. I see the Bio.SeqIO as a common unified API, and the
downside is sometimes extra data doesn't really fit.
If there really is some important meta-data in a file format that
applies to all the records, then it cannot easily be represented in
the Bio.SeqIO system except as annotation added to every single
SeqRecord. e.g. Add the header to the annotations dictionary under
"file-header" or something.
Peter
More information about the Biopython-dev
mailing list