skbio.alignment.TabularMSA.__bool__#
- TabularMSA.__bool__()[source]#
Boolean indicating whether the MSA is empty or not.
- Returns:
- bool
False
if there are no sequences, OR if there are no positions (i.e., all sequences are empty).True
otherwise.
Examples
>>> from skbio import DNA, TabularMSA
MSA with sequences and positions:
>>> msa = TabularMSA([DNA('ACG'), DNA('AC-')]) >>> bool(msa) True
No sequences:
>>> msa = TabularMSA([]) >>> bool(msa) False
No positions:
>>> msa = TabularMSA([DNA(''), DNA('')]) >>> bool(msa) False