Bio.motifs.xms module¶
Parse XMS motif files.
-
class
Bio.motifs.xms.XMSScanner(doc)¶ Bases:
objectClass for scanning XMS XML file.
-
__init__(self, doc)¶ Generate motif Record from xms document, an XML-like motif pfm file.
-
handle_motif(self, node)¶ Read the motif’s name and column from the node and add the motif record.
-
get_property_value(self, node, key_name)¶ Extract the value of the motif’s property named key_name from node.
-
get_acgt(self, node)¶ Get and return the motif’s weights of A, C, G, T.
-
get_text(self, nodelist)¶ Return a string representation of the motif’s properties listed on nodelist .
-
-
class
Bio.motifs.xms.Record(iterable=(), /)¶ Bases:
listClass to store the information in a XMS matrix table.
The record inherits from a list containing the individual motifs.
-
__str__(self)¶ Return str(self).
-
-
Bio.motifs.xms.read(handle)¶ 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.