# Bio.motifs.meme module

Module for the support of MEME motif format.

Bio.motifs.meme.read(handle)

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

  Examples

      >>> from Bio.motifs import meme
      >>> with open("motifs/meme.INO_up800.classic.oops.xml") as f:
      ...     record = meme.read(f)
      >>> for motif in record:
      ...     for sequence in motif.alignment.sequences:
      ...         print(sequence.motif_name, sequence.sequence_name, sequence.sequence_id, sequence.strand, sequence.pvalue)
      GSKGCATGTGAAA INO1 sequence_5 + 1.21e-08
      GSKGCATGTGAAA FAS1 sequence_2 - 1.87e-08
      GSKGCATGTGAAA ACC1 sequence_4 - 6.62e-08
      GSKGCATGTGAAA CHO2 sequence_1 - 1.05e-07
      GSKGCATGTGAAA CHO1 sequence_0 - 1.69e-07
      GSKGCATGTGAAA FAS2 sequence_3 - 5.62e-07
      GSKGCATGTGAAA OPI3 sequence_6 + 1.08e-06
      TTGACWCYTGCYCWG CHO2 sequence_1 + 7.2e-10
      TTGACWCYTGCYCWG OPI3 sequence_6 - 2.56e-08
      TTGACWCYTGCYCWG ACC1 sequence_4 - 1.59e-07
      TTGACWCYTGCYCWG CHO1 sequence_0 + 2.05e-07
      TTGACWCYTGCYCWG FAS1 sequence_2 + 3.85e-07
      TTGACWCYTGCYCWG FAS2 sequence_3 - 5.11e-07
      TTGACWCYTGCYCWG INO1 sequence_5 + 8.01e-07

class Bio.motifs.meme.Motif(alphabet=None, alignment=None)

  Bases: `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__(alphabet=None, alignment=None)

    Initialize the class.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 62
  __static_attributes__ = ('alt_id', 'evalue', 'id', 'name', 'num_occurrences')

class Bio.motifs.meme.Instance(*args, **kwds)

  Bases: `Seq`

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

  __init__(*args, **kwds)

    Initialize the class.

  __abstractmethods__ = frozenset({})
  __annotate_func__ = None
  __annotations_cache__ = {'_data': 'bytes | SequenceDataAbstractBaseClass'}
  __firstlineno__ = 80
  __static_attributes__ = ('length', 'motif_name', 'pvalue', 'sequence_id', 'sequence_name', 'start', 'strand')

class Bio.motifs.meme.Record

  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.INO_up800.classic.oops.xml") as f:
      ...     record = motifs.parse(f, 'MEME')
      >>> motif = record[0]
      >>> print(motif.name)
      GSKGCATGTGAAA
      >>> motif = record['GSKGCATGTGAAA']
      >>> print(motif.name)
      GSKGCATGTGAAA

  __init__()

    Initialize the class.

  __getitem__(key)

    Return the motif of index key.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 102
  __static_attributes__ = ('alphabet', 'command', 'datafile', 'sequences', 'version')

Biopython v: 1.86

Versions
  Previous
  Latest
  Develop

Biopython Project
  Homepage
  On GitHub