[Biopython-dev] Bio.SeqIO
Peter
biopython-dev at maubp.freeserve.co.uk
Tue Mar 6 06:18:09 EST 2007
Michiel de Hoon wrote:
> Peter wrote:
>> SequenceIterator(handle, format)
>> SequencesToDict(sequences, key_function=None)
>> SequencesToAlignment(sequences, ...)
>> WriteSequences(sequences, handle, format)
>>
>> Does anyone want to suggest different names for these functions?
Only Michiel has replied, so I assume there are no other strong views on
the dev mailing list.
Michiel de Hoon wrote:
> I would prefer
>>>> from Bio import SeqIO
>>>> SeqIO.read(handle, format)
>>>> SeqIO.write(sequences, handle, format)
You have persuaded me to rename SequenceIterator and WriteSequences.
BioPython uses the term "parser" all over the place. Doing a quick
search of the code, I found ten files with "def read(" and fifty eight
with "def parse(" - so I would rather have "parse" than "read".
That would give us the core functions:
Bio.SeqIO.parse(handle, format)
Bio.SeqIO.write(sequences, handle, format)
or,
Bio.SeqIO.read(handle, format)
Bio.SeqIO.write(sequences, handle, format)
I'll let you [Michiel] make the call. Say the word and I'll update the
code and the wiki today.
Are you happy with Bio.SeqIO.SequencesToDict(...) name?
I think we should keep Bio.SeqIO.SequencesToAlignment(...) for the time
being, until we do some work on the Bio.Align class. I don't think we
should tackle this before the next release. I'm happy to document this
particular function as "experimental/beta" and liable to be removed or
replaced in future.
After the renaming, I would say the Bio.SeqIO code is OK for release.
After BioPython 1.43 is out, I would like to mark the old code in
Bio/SeqIO/FASTA.py and Bio/SeqIO/generic.py as depreciated.
Peter
More information about the Biopython-dev
mailing list