On Mon, Jun 14, 2010 at 11:02 AM, madhuri vio <madhuri....@gmail.com> wrote: > TypeError: Need a file handle, not a string (i.e. not a filename)
This says that the error is that you are using a filename where you should be using a filehandle. So this line: for seq_record in SeqIO.read("ls_MTbH37Rv.fasta", "fasta"): Should be changed to: fh = open("ls_MTbH37Rv.fasta") for seq_record in SeqIO.read(fh, "fasta"): I think that in some version of Biopython you would be able to use just the name. Best, SB. Python for Bioinformatics book: http://www.tinyurl.com/biopython Python for Bioinformatics blog: http://www.py4bio.com -- http://mail.python.org/mailman/listinfo/python-list