<div dir="ltr"><div><div>Hi,<br><br></div>So the id I am matching to are in a set . <br>if <a href="http://seq.id">seq.id</a> in lset_id:<br></div> list_seq.append(seq)<br><div><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 9 September 2014 14:34, Peter Cock <span dir="ltr"><<a href="mailto:p.j.a.cock@googlemail.com" target="_blank">p.j.a.cock@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Sep 9, 2014 at 1:12 PM, Jurgens de Bruin <<a href="mailto:debruinjj@gmail.com">debruinjj@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> Thanks for the reply I am trying out the<br>
> Bio.SeqIO.FastaIO.SimpleFastaParser, what I want to achieve is to iterate<br>
> over the fasta and pull out sequences that are in a predefined list, based<br>
> on id and then write these to a new fasta file.<br>
<br>
</span>In that case, the problem could be as simple as using a list<br>
(slow for large lists) rather than a set (fast) for checking<br>
membership.<br>
<span class="HOEnZb"><font color="#888888"><br>
Peter<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/<br>distinti saluti/siong/duì yú/привет<br><br>Jurgens de Bruin
</div>