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 (inherited)

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.

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.

to_bits()

Unpack states into an array of bits.

to_cigar([seqs])

Generate a CIGAR string representing the pairwise alignment path.

Methods (inherited)

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

Special methods

__str__()

Return string representation of this AlignPath.

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

__str__()[source]#

Return string representation of this AlignPath.