Source code for immuneML.simulation.implants.Motif

import abc
from dataclasses import dataclass
from typing import List

from immuneML.environment.SequenceType import SequenceType
from immuneML.simulation.implants.MotifInstance import MotifInstance


[docs] @dataclass class Motif: ''' Motifs are the objects which are implanted into sequences during simulation. They are defined under :code:`definitions/motifs`. There are several different motif types, each having their own parameters. ''' identifier: str
[docs] @abc.abstractmethod def get_max_length(self) -> int: pass
[docs] @abc.abstractmethod def get_alphabet(self) -> List[str]: pass
[docs] @abc.abstractmethod def get_all_possible_instances(self, sequence_type: SequenceType): pass
[docs] @abc.abstractmethod def instantiate_motif(self, sequence_type: SequenceType = SequenceType.AMINO_ACID) -> MotifInstance: pass