Skip to main content
`Ctrl`+`K`

# skbio.embedding.SequenceEmbedding

class skbio.embedding.SequenceEmbedding(embedding, sequence, **kwargs)

  Embedding for a biological sequence.

  Parameters:
    embedding array_like

      The embedding of the sequence. Row vectors correspond to the latent character coordinates.

    sequence str, Sequence, or 1D ndarray

      Characters representing the sequence itself.

  See also

  `Embedding`
  `skbio.sequence.Sequence`

  Attributes

  `sequence` | String representation of the underlying sequence.

  Attributes (inherited)

  `embedding` | The embedding tensor.
  `ids` | IDs corresponding to each row of the embedding.

  Methods (inherited)

  `bytes`() | Bytes representation of string encoding.
  `read`([format]) | Create a new `SequenceEmbedding` instance from a file.
  `write`(file[, format]) | Write an instance of `SequenceEmbedding` to a file.

  Special methods

  `__str__`() | String representation of the underlying sequence.

  Special methods (inherited)

  `__eq__`(value, /) | Return self==value.
  `__ge__`(value, /) | Return self>=value.
  `__getstate__`(/) | Helper for pickle.
  `__gt__`(value, /) | Return self>value.
  `__hash__`(/) | Return hash(self).
  `__le__`(value, /) | Return self<=value.
  `__lt__`(value, /) | Return self<value.
  `__ne__`(value, /) | Return self!=value.

  Details

  sequence

    String representation of the underlying sequence.

  __str__()

    String representation of the underlying sequence.