[docs]@staticmethoddefencode_sequence(sequence:ReceptorSequence,params:EncoderParams):""" Encodes a receptor sequence into a sequence of k-mers Args: sequence: ReceptorSequence object params: EncoderParams object with information on k-mer length Returns: """k=params.model["k"]length=len(sequence.get_sequence(params.sequence_type))iflength<k:logging.warning(f'KmerSequenceEncoder: Sequence length {length} is less than {k}. Ignoring sequence...')returnNonekmers=KmerHelper.create_kmers_from_sequence(sequence=sequence,k=k,sequence_type=params.sequence_type)returnkmers