[Biopython] writing sequences one by one using SeqIO

Iddo Friedberg idoerg at gmail.com
Fri Jun 7 19:15:02 UTC 2013


Hi,

Probably has been asked & answered on this list, but I cannot find it.

My problem is doing a SeqIO read and SeqIO.write of sequences one by one
instead of in bulk to save memory. The wiki  as an example of generating an
iterator in a single shot. .
http://biopython.org/wiki/SeqIO#Input.2FOutput_Example_-_Filtering_by_sequence_length

However, my processing of sequences is a bit more involved than that, and
requires several lines of code. Do I have to resorlt to calling an iterator
function, or is there a way to read a single sequence, process, & then
write it before the next iteration?

Thanks,

Iddo

-- 
Iddo Friedberg
http://iddo-friedberg.net/contact.html
++++++++++[>+++>++++++>++++++++>++++++++++>+++++++++++<<<<<-]>>>>++++.>
++++++..----.<<<<++++++++++++++++++++++++++++.-----------..>>>+.-----.
.>-.<<<<--.>>>++.>+++.<+++.----.-.<++++++++++++++++++.>+.>.<++.<<<+.>>
>>----.<--.>++++++.<<<<------------------------------------.



More information about the Biopython mailing list