skbio.alignment.TabularMSA.__bool__¶
- TabularMSA.__bool__()[source]¶
Boolean indicating whether the MSA is empty or not.
State: Experimental as of 0.4.1.
- Returns
False
if there are no sequences, OR if there are no positions (i.e., all sequences are empty).True
otherwise.- Return type
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