skbio.alignment.AlignPath.from_coordinates#
- classmethod AlignPath.from_coordinates(coords)[source]#
Generate an alignment path from an array of segment coordinates.
- Parameters:
- coordsarray_like of int of shape (n_seqs, n_segments)
Array where each value defines the start positions (index) of each segment for each sequence.
- Returns:
- AlignPath
The alignment path created from the given coordinates.
Examples
>>> import numpy as np >>> from skbio.alignment import AlignPath >>> coordinates = np.array([[0, 1, 1, 3, 4], ... [0, 1, 3, 3, 3], ... [0, 1, 1, 3, 3]]) >>> path = AlignPath.from_coordinates(coordinates) >>> path AlignPath Shape(sequence=3, position=6) lengths: [1 2 2 1] states: [0 5 2 6]