[Biopython] parsing an in memory sequence string with SeqIO

Kyle Ellrott kellrott at gmail.com
Mon Oct 19 17:48:17 UTC 2009


Try the StringIO interface. http://docs.python.org/library/stringio.html

Kyle

On Mon, Oct 19, 2009 at 10:35 AM, Michael Thon <mike.thon at gmail.com> wrote:
> I have been looking at the documentation but I can't figure out how to parse
> a string of text in a python variable into a SeqRecord object.  the main
> function (SeqIO.parse) requires a file handle.  I'm getting the text from a
> web server POST request and it seems a little inefficient to write it to a
> file before I do parsing with biopython.  Maybe there is some way in python
> to create a handle to a variable?
> Thanks
> Mike
> _______________________________________________
> Biopython mailing list  -  Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>




More information about the Biopython mailing list