[BioPython] Martel Parser error...
Peter
biopython at maubp.freeserve.co.uk
Wed Jul 11 08:03:58 UTC 2007
mmayhew at MCB.McGill.CA wrote:
> Tested a sample file with a single FASTA record at home with my Windows XP
> machine and produced the following set of results using Bio.SeqIO first
> and then Bio.Fasta (with Fasta.Iterator and Fasta.RecordParser()
> instances).
> Looks like the same error, with a completely different OS (received exact
> same error with Mac OSX v10.4 & biopython 1.42). Since Bio.SeqIO works
> fine (thank you for the reccomendation) I will use that, but the Bio.Fasta
> error may potentially be an error to look into.
Your example worked fine for me on Linux, I haven't tried on Windows XP
yet. While you get the same error on both Windows XP and Mac OS X?
My only suggestion right now is to check your line endings (CR versus
CRLF versus LF) are appropriate for the platform, and to try:
handle = open('test.txt', 'rU')
Also, what do these give?
print repr(open('test.txt', 'r').read())
print repr(open('test.txt', 'rU').read())
I'm looking for any difference in the new lines (e.g. \n versus \n\r)
Maybe Michiel can suggest something as I believe he sometimes uses
Biopython on Mac OS X.
On the bright side, Bio.SeqIO works for you (and we now recommend using
that instead of Bio.Fasta) but I would still like to sort this out.
Peter
More information about the Biopython
mailing list