Alignment#
- class pyfamsa.Alignment#
An alignment, stored as a list of
GappedSequenceobjects.An alignment can be created from an iterable of
GappedSequencethat are all the same gapped size:>>> s1 = GappedSequence(b"seq1", b"MA-WMRLLPL") >>> s2 = GappedSequence(b"seq2", b"MALWTR-RPL") >>> alignment = Alignment([s1, s2])
The individual rows of the alignment can be accessed using the usual indexing operation, and the alignment can be sliced to select only certain rows:
>>> alignment[0].id b'seq1' >>> len(alignment[:1]) 1
- __getitem__(key, /)#
Return self[key].
- __init__(*args, **kwargs)#
- __len__()#
Return len(self).
- copy()#
Copy the sequence object, and return the copy.