[Biopython-dev] [Bug 2585] Error in Bio.SeqUtils.apply_on_multi_fasta

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Sep 17 07:34:34 EDT 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2585





------- Comment #2 from biopython-bugzilla at maubp.freeserve.co.uk  2008-09-17 07:34 EST -------
This bug was introduced in CVS revision 1.13 of Bio/SeqUtils/__init__.py when
moving from Bio.Fasta.RecordParser (which used Fasta record objects with a
title property) to Bio.SeqIO (which uses SeqRecord objects instead).  With
hindsight this is a clear oversight (which also changed the usage of the
function).  Your fix looks fine for recovering some of the original behaviour.

We should also clarify the docstrings of these (and other functions in this
module) to make it explicit where the "file" argument should be a filename.

However, I am tempted however to deprecate apply_on_multi_fasta and
quicker_apply_on_multi_fasta (and some of the other code here) as to me using a
Bio.SeqIO with a for loop is much clearer.

e.g.

def my_function ...
for record in SeqIO.parse(open(filename), "fasta") :
   my_function(record)

versus:

def my_function ...
apply_on_multi_fasta(filename, my_function)

What do you think Sebastian?  Did you have a real example for using
apply_on_multi_fasta or did you happen to spot the bug?

Thanks,

Peter


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Biopython-dev mailing list