skbio.embedding.ProteinVector#
- class skbio.embedding.ProteinVector(vector, sequence, **kwargs)[source]#
Vector representation for a protein sequence.
- Parameters:
- vector1D or 2D array_like
The vector representation of the protein sequence. Typically a 1D array. Can also be a 2D array with only one row.
- sequencestr, Sequence, or 1D ndarray
Characters representing the protein sequence itself.
See also
Examples
>>> from skbio.embedding import ProteinVector >>> import numpy as np >>> vector = np.random.rand(10) >>> sequence = "ACDEFGHIKL" >>> ProteinVector(vector, sequence) ProteinVector -------------------------- Stats: length: 10 vector dimension: 10 has gaps: False has degenerates: False has definites: True has stops: False -------------------------- 0 ACDEFGHIKL
Attributes
Default write format for this object:
embed.Attributes (inherited)
The embedding tensor.
IDs corresponding to each row of the embedding.
String representation of the underlying sequence.
Vector representation for the biological entity.
Methods (inherited)
Bytes representation of string encoding.
Create a new
ProteinVectorinstance from a file.Write an instance of
ProteinVectorto a file.Special methods (inherited)
__eq__Return self==value.
__ge__Return self>=value.
__getstate__Helper for pickle.
__gt__Return self>value.
__hash__Return hash(self).
__le__Return self<=value.
__lt__Return self<value.
__ne__Return self!=value.
Return str(self).
Details
- default_write_format = 'embed'#
Default write format for this object:
embed.