API Reference#
PyO3 bindings to lightmotif, a library for fast PWM motif scanning.
The API is similar to the Bio.motifs module from Biopython on purpose.
Note
Arbitrary alphabets cannot be configured, as lightmotif uses
constant definitions of alphabets that cannot be changed at runtime.
The different sequences are treated as nucleotide sequences. To use
a protein sequence instead, most classes and functions
have a protein keyword True:
>>> sequences = ["PILFFRLK", "KDMLKEYL", "PFRLTHKL"]
>>> lightmotif.create(sequences)
Traceback (most recent call last):
...
ValueError: Invalid symbol in sequence
>>> lightmotif.create(sequences, protein=True)
<lightmotif.lib.Motif object at ...>
Functions#
Create a new motif from an iterable of sequences. |
|
Encode and stripe a text sequence. |
|
Scan a sequence using a fast scanner implementation to identify hits. |
|
Load the motifs contained in a file. |
Sequence#
A biological sequence encoded as digits. |
|
An encoded biological sequence stored in a column-major matrix. |
Matrices#
A matrix storing the count of a motif letters at each position. |
|
A matrix storing position-specific odds-ratio for a motif. |
|
A matrix storing position-specific odds-ratio for a motif. |
Motif#
A base object storing information about a motif. |
|
A motif loaded from a TRANSFAC file. |
|
A motif loaded from a JASPAR or JASPAR16 file. |
|
A motif loaded from a UniPROBE file. |
Scores#
A striped matrix storing scores obtained with a scoring matrix. |
Scanner#
A fast scanner for identifying high scoring positions in a sequence. |
|
A hit found by a |
Loader#
An iterator for loading motifs from a file. |