When trying out the examples from chapter 2.3 of the biopython 1.54b tutorial I keep running into this very annoying problem: When I use:
from Bio import SeqIO for seq_record in SeqIO.parse("ls_orchid.fasta", "fasta"): print seq_record.id print repr(seq_record.seq) print len(seq_record)
The Python interpreter tells me I should use a handle in stead of filenames. I use biopython 1.53 and not 1.54b for which this tutorial was meant. I can't find an older archived version of the tutorial I could use to help me learn how to use a handle in stead of the simple filename method (ls_orchid.fasta in this case.). I know that in older versions of biopython you have to do everything in handlers but not in the newer versions.
The new tutorial now on-line has an obscure last chapter on how to use handlers but that's hardly helpfull.
I think the tutorial is great, I just havent got the right version installed. I use Ubuntu and downloaded biopython via ubuntu software center.
Can anyone help me use a handler and get the above parsing example working in 1.53?