Entering edit mode
9.5 years ago
gable91794
•
0
I am having trouble reading/parsing a meme output file with Biopython. Here is the code I am using:
>>> from Bio import motifs
>>> with open('meme.txt') as f:
record = motifs.parse(f, 'MEME')
I receive this ValueError:
Traceback (most recent call last):
File "<pyshell#55>", line 2, in <module>
record = motifs.parse(f, 'MEME')
File "C:\Python34\Scripts\Bio\motifs\__init__.py", line 77, in parse
record = meme.read(handle)
File "C:\Python34\Scripts\Bio\motifs\meme.py", line 41, in read
length, num_occurrences, evalue = __read_motif_statistics(line)
File "C:\Python34\Scripts\Bio\motifs\meme.py", line 219, in __read_motif_statistics
length = int(ls[3])
ValueError: invalid literal for int() with base 10: '='
How can I fix this so the ValueError does not occur?
which version of biopython are you using ?
the newest version: 1.65
can you post first few lines of the "meme.txt" file ?
I believe the output format is the same as all other meme runs I have used.
The run was of 4000 peptide sequences.
See discussions here: https://github.com/biopython/biopython/issues/461
This may be due to format of meme.txt. Whether your file has "MEME" in it like:
or just
?