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.
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¶
Score¶
A striped matrix storing scores obtained with a scoring matrix. |
Functions¶
- lightmotif.create(sequences)¶
Create a new motif from an iterable of sequences.
All sequences must have the same length, and must contain only valid DNA symbols (A, T, G, C, or N as a wildcard).
Example
>>> sequences = ["TATAAT", "TATAAA", "TATATT", "TATAAT"] >>> motif = lightmotif.create(sequences)
- Returns:
Motif
– The motif corresponding to the given sequences.
- lightmotif.stripe(sequence)¶
Encode and stripe a text sequence.