Bio.motifs.mast module

Module for the support of Motif Alignment and Search Tool (MAST).

class Bio.motifs.mast.Record

Bases: list

The class for holding the results from a MAST run.

A mast.Record holds data about matches between motifs and sequences. The motifs held by the Record are objects of the class meme.Motif.

The mast.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/mast.crp0.de.oops.txt.xml") as f:
...     record = motifs.parse(f, 'MAST')
>>> motif = record[0]
>>> print(motif.name)
1
>>> motif = record['1']
>>> print(motif.name)
1
__init__(self)

Initialize the class.

__getitem__(self, key)

Return the motif of index key.

Bio.motifs.mast.read(handle)

Parse a MAST XML format handle as a Record object.