skbio.alignment.AlignPath.from_aligned#
- classmethod AlignPath.from_aligned(aln, gap_chars='-', starts=None)[source]#
Create an alignment path from aligned sequences.
- Parameters:
- alniterable of
Sequence
, str or sequence Aligned sequences. Can be skbio sequences, strings or sequences of any scalars.
- gap_charsstr or container, optional
Characters that should be treated as gaps in aligned sequences. Default is “-“.
- startsarray_like of int of shape (2,), optional
Start positions of sequences. If omitted, will be all zeros.
- alniterable of
- Returns:
- AlignPath
The alignment path created from the aligned sequences.
See also
Notes
This method is more general but less efficient than
from_tabular
. It works with various sequence formats.Examples
>>> from skbio.alignment import AlignPath >>> aln = [ ... 'CGTCGTGC', ... 'CA--GT-C', ... 'CGTCGT-T' ... ] >>> path = AlignPath.from_aligned(aln) >>> path <AlignPath, sequences: 3, positions: 8, segments: 5>