skbio.alignment.PairAlignPath#

class skbio.alignment.PairAlignPath(lengths, states, starts)[source]#

Create a pairwise alignment path from segment lengths and states.

Parameters:
lengthsarray_like of int of shape (n_segments,)

Length of each segment in the alignment.

statesarray_like of uint8 of shape (n_segments,)

Bits representing character (0) or gap (1) status per sequence per segment in the alignment.

startsarray_like of (int, int), optional

Start position (0-based) of each sequence in the alignment.

Attributes

lengths

Array of lengths of segments in alignment path.

shape

Number of sequences (rows) and positions (columns).

starts

Array of start positions of sequences in the alignment.

states

Array of gap status of segments in alignment path.

Built-ins

__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.

__str__()

Return string representation of this AlignPath.

Methods

from_bits(bits)

Create a pairwise alignment path from a bit array.

from_cigar(cigar[, starts])

Create a pairwise alignment path from a CIGAR string.

from_coordinates(coords)

Generate an alignment path from an array of segment coordinates.

from_indices(indices[, gap])

Create an alignment path from character indices in the original sequences.

from_tabular(msa)

Create an alignment path from a TabularMSA object.

to_bits()

Unpack states into an array of bits.

to_cigar([seqs])

Generate a CIGAR string representing the pairwise alignment path.

to_coordinates()

Generate an array of segment coordinates in the original sequences.

to_indices([gap])

Generate an array of indices of characters in the original sequences.