[Biopython-dev] [Bug 2803] Insure Alignment objects are passed to AlignIO.write()
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Wed Apr 1 11:25:36 EDT 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2803
------- Comment #2 from biopython-bugzilla at maubp.freeserve.co.uk 2009-04-01 11:25 EST -------
Thanks for filing the bug (originally raised in our discussion on the mailing
list).
There is a major drawback to your proposed fix,
+ if isinstance(alignments, types.GeneratorType):
+ alignments = list(alignments)
This means if you gave the AlignIO.write function a generator returning
hundreds or large alignment objects, they would all get loaded into memory at
once. One of the big aims with Bio.SeqIO and AlignIO in using
generators/iterators is to allow memory efficient working where we try to keep
only one record/alignment in memory at a time.
Anyway, I'll take a look at this. I think we need to just check the case where
Bio.AlignIO.write uses Bio.SeqIO.write internally...
--
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