Bio.motifs.xms module

Parse XMS motif files.

class Bio.motifs.xms.XMSScanner(doc)

Bases: object

Class for scanning XMS XML file.


Generate motif Record from xms document, an XML-like motif pfm file.


Read the motif’s name and column from the node and add the motif record.

get_property_value(node, key_name)

Extract the value of the motif’s property named key_name from node.


Get and return the motif’s weights of A, C, G, T.


Return a string representation of the motif’s properties listed on nodelist .

class Bio.motifs.xms.Record(iterable=(), /)

Bases: list

Class to store the information in a XMS matrix table.

The record inherits from a list containing the individual motifs.


Return a string representation of the motifs in the Record object.

Read motifs in XMS matrix format from a file handle.

XMS is an XML format for describing regulatory motifs and PSSMs. This format was defined by Thomas Down, and used in the NestedMICA and MotifExplorer programs.