[Biopython-dev] sff file

Sebastian Bassi sbassi at clubdelarazon.org
Mon Oct 26 18:09:57 UTC 2009


On Mon, Oct 26, 2009 at 3:00 PM, Peter <biopython at maubp.freeserve.co.uk> wrote:
> Try binary mode - although on my tests it isn't essential on Unix,
> it is on Windows.

I am in Linux Ubuntu 9.04 and I followed your advice and now I did:

fh = open('/home/sbassi/E3MFGYR02_random_10_reads.sff','rb')

And now it works:

>>> for rec in SeqIO.parse(fh,'sff'):
	print rec.seq

	
tcagGGTCTACATGTTGGTTAACCCGTACTGATTTGAATTGGCTCTTTGTCTTTCCAAAGGGAATTCATCTTCTTATGGCACACATAAAGGATAAATACAAGAATCTTCCTATTTACATCACTGAAAATGGCATGGCTGAATCAAGGAATGACTCAATACCAGTCAATGAAGCCCGCAAGGATAGTATAAGGATTAGATACCATGATGGCCATCTTAAATTCCTTCTTCAAGCGATCAAGGAAGGTGTTAATTTGAAGGGGCTTa
tcagTTTTTTTTGGAAAGGAAAACGGACGTACTCATAGATGGATCATACTGACGTTAGGAAAATAATTCATAAGACAATAAGGAAACAAAGTGTAAAAAAAAAACCTAAATGCTCAAGGAAAATACATAGCCATCTGAACAGATTTCTGCTGGAAGCCACATTTCTCGTAGAACGCCTTGTTCTCGACGCTGCAATCAAGAATCACCTTGTAGCATCCCATTGAACGCGCATGCTCCGTGAGGAACTTGATGATTCTCTTTCCCAAATGcc
(.... cut ...)

So looks that binary mode is also needed for Linux.




More information about the Biopython-dev mailing list