skbio.alignment.TabularMSA.__len__#

TabularMSA.__len__()[source]#

Return number of sequences in the MSA.

Returns:
int

Number of sequences in the MSA (i.e., size of the 1st dimension).

Notes

This is equivalent to msa.shape[0].

Examples

>>> from skbio import DNA, TabularMSA
>>> msa = TabularMSA([DNA('ACG'), DNA('AC-')])
>>> len(msa)
2
>>> msa = TabularMSA([])
>>> len(msa)
0