Function create

Source
pub fn create(
    sequences: Bound<'_, PyAny>,
    protein: bool,
    name: Option<String>,
) -> PyResult<Motif>
Expand description

Create a new motif from an iterable of sequences.

All sequences must have the same length, and must contain only valid alphabet symbols (ATGCN for nucleotides, ACDEFGHIKLMNPQRSTVWYX for proteins).

Arguments: sequences (iterable of str): The sequences to use to build the count matrix for the motif. protein (bool): Pass True to build a protein motif. Defaults to False.

Example: >>> sequences = [“TATAAT”, “TATAAA”, “TATATT”, “TATAAT”] >>> motif = lightmotif.create(sequences)

Returns: ~lightmotif.Motif: The motif corresponding to the given sequences.

Raises: ValueError: When any of the sequences contain an invalid character, or when the sequence lengths are not consistent.