Repository navigation
Description
It looks like MEME now skips over providing sequences from the training set when the number of sequence is greater than the argument to -brief (1000 by default), which is documented to do the following:
-brief | nbrief
If there are more than nbrief (primary) sequences, the size of MEME's output will be reduced by suppressing the inclusion of the sequence names, motif sites and scanned sites in MEME's HTML and XML outputs, and by suppressing the tables of sequence lengths, sites and block diagrams in MEME's text output.
I am also not sure if this option is new (see below for how it affects the meme.txt output).
MEME documentation: http://meme-suite.org/doc/meme.html
I am happy to try contributing a fix, if someone could point me in the right direction.
Setup
I am reporting a problem with
- Biopython version: 17.2
- Python version: 3.5.6 (Anaconda 64 bit)
- Operating system: RedHat 6.10
- Using the output of MEME version 5.0.2 (Release date: Thu Aug 30 14:26:08 2018 -0700)
from Bio import motifs
with open("./tcruzi_lasttmd/meme.txt", "r") as handle:
motifs = motifs.parse(handle, "meme")Expected behaviour
Continue to read the motifs, skipping over the lack of training set information information
Actual behaviour
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-55-fa64ff49a289> in <module>()
1 from Bio import motifs
2 with open("./tcruzi_lasttmd/meme.txt", "r") as handle:
----> 3 motifs = motifs.parse(handle, "meme")
4
5 motifs
~/anaconda3/envs/tfgpu35/lib/python3.5/site-packages/Bio/motifs/__init__.py in parse(handle, format)
71 elif format == "meme":
72 from Bio.motifs import meme
---> 73 record = meme.read(handle)
74 return record
75 elif format == "mast":
~/anaconda3/envs/tfgpu35/lib/python3.5/site-packages/Bio/motifs/meme.py in read(handle)
27 record = Record()
28 __read_version(record, handle)
---> 29 __read_datafile(record, handle)
30 __read_alphabet(record, handle)
31 __read_sequences(record, handle)
~/anaconda3/envs/tfgpu35/lib/python3.5/site-packages/Bio/motifs/meme.py in __read_datafile(record, handle)
162 raise ValueError("Unexpected end of stream: Expected to find line starting with 'DATAFILE'")
163 if not line.startswith('DATAFILE'):
--> 164 raise ValueError("Line does not start with 'DATAFILE':\n%s" % line)
165 line = line.strip()
166 line = line.replace('DATAFILE= ', '')
ValueError: Line does not start with 'DATAFILE':
PRIMARY SEQUENCES= tcruzi_lasttmd.faaSteps to reproduce (try reading this file with the code above):
********************************************************************************
MEME - Motif discovery tool
********************************************************************************
MEME version 5.0.2 (Release date: Thu Aug 30 14:26:08 2018 -0700)
For further information on how to interpret please access http://meme-suite.org.
To get a copy of the MEME software please access http://meme-suite.org.
********************************************************************************
********************************************************************************
REFERENCE
********************************************************************************
If you use this program in your research, please cite:
Timothy L. Bailey and Charles Elkan,
"Fitting a mixture model by expectation maximization to discover
motifs in biopolymers", Proceedings of the Second International
Conference on Intelligent Systems for Molecular Biology, pp. 28-36,
AAAI Press, Menlo Park, California, 1994.
********************************************************************************
********************************************************************************
TRAINING SET
********************************************************************************
PRIMARY SEQUENCES= tcruzi_lasttmd.faa
CONTROL SEQUENCES= --none--
ALPHABET= ACDEFGHIKLMNPQRSTVWY
********************************************************************************
********************************************************************************
COMMAND LINE SUMMARY
********************************************************************************
This information can also be useful in the event you wish to report a
problem with the MEME software.
command: meme tcruzi_lasttmd.faa -oc tcruzi_lasttmd -protein -mod zoops -nmotifs 10 -evt 1 -minw 15 -maxw 30 -bfile all_tmds.nr.bg -maxsize 1000000
Here is the actual file: meme.txt
Activity
smsaladi commentedon Dec 9, 2018
Update: Does look like it has to do with
-brief, although even if the sequences are listed, the error is still present -- perhaps the format is more different than expected:Except of MEME output (link to full file below):
...meme.txt
AvantiShri commentedon Jan 10, 2019
I also get a similar error when attempting to parse a MEME file:
The file I am trying to parse is attached
NFE2_meme_results.txt
jclachance commentedon Mar 14, 2019
It doesn't seem like this issue has been solved? I run into the same issue when running MEME (MEME version 5.0.4 (Release date: Wed Jan 23 14:05:40 2019 -0800) on my sequences on the online platform and then attempting to read the output using the most recent BioPython version (1.73). The same error message shows up:
ValueError: Line does not start with 'DATAFILE':
PRIMARY SEQUENCES= promoter_sequences.faa
peterjc commentedon Mar 14, 2019
@jclachance I'm guessing grihabor#3 was meant to be a pull requests on the main Biopython repository? If so, can you try that again (the pull request creation step, the same code branch should be fine).