[Biopython-dev] Creating a NCBIFastaIterator

Peter Cock p.j.a.cock at googlemail.com
Fri Oct 7 16:16:55 UTC 2011


On Fri, Oct 7, 2011 at 5:06 PM, Andrew Sczesnak
<andrew.sczesnak at med.nyu.edu> wrote:
>>
>> Maybe it is down to personal preference of coding style?
>
> I agree, there isn't much difference between specifying the callback
> function in parse() or within the loop. To me, this points out that
> re-implementing a FASTA parser simply for a format of description
> line seems unnecessary.
>
> If a user is interesting in extracting a particular piece of information
> from a FASTA description and knows the input format of the file, how
> difficult is it for them to split() it on their own? What exactly are the
> advantages of a separate parser?

Not enough of an advantage for me personally to have gone
and written it myself ;)

I can see some benefits in extracting information from the
NCBI identifier and storing them in the SeqRecord's dbxref
list and annotation dictionary (as consistently with our other
parsers as possible) if you are going to want to use those
fields yourself.

Perhaps Keith can explain his interest with some examples?

Peter



More information about the Biopython-dev mailing list