Module for the support of MEME motif format.

Parse the text output of the MEME program into a meme.Record object.


>>> from Bio.motifs import meme
>>> with open("motifs/meme.out") as f:
...     record =
>>> for motif in record:
...     for instance in motif.instances:
...         print(instance.motif_name, instance.sequence_name, instance.strand, instance.pvalue)
Motif 1 SEQ10; + 8.71e-07
Motif 1 SEQ9; + 8.71e-07
Motif 1 SEQ8; + 8.71e-07
Motif 1 SEQ7; + 8.71e-07
Motif 1 SEQ6; + 8.71e-07
Motif 1 SEQ5; + 8.71e-07
Motif 1 SEQ4; + 8.71e-07
Motif 1 SEQ3; + 8.71e-07
Motif 1 SEQ2; + 8.71e-07
Motif 1 SEQ1; + 8.71e-07
class, instances=None)

Bases: Bio.motifs.Motif

A subclass of Motif used in parsing MEME (and MAST) output.

This subclass defines functions and data specific to MEME motifs. This includes the motif name, the evalue for a motif, and its number of occurrences.

__init__(self, alphabet=None, instances=None)

Initialize the class.

class*args, **kwds)

Bases: Bio.Seq.Seq

A class describing the instances of a MEME motif, and the data thereof.

__init__(self, *args, **kwds)

Initialize the class.


Bases: list

A class for holding the results of a MEME run.

A meme.Record is an object that holds the results from running MEME. It implements no methods of its own.

The meme.Record class inherits from list, so you can access individual motifs in the record by their index. Alternatively, you can find a motif by its name:

>>> from Bio import motifs
>>> with open("motifs/meme.out") as f:
...     record = motifs.parse(f, 'MEME')
>>> motif = record[0]
>>> print(
Motif 1
>>> motif = record['Motif 1']
>>> print(
Motif 1


__getitem__(self, key)

Return the motif of index key.