skbio.sequence.DNA.__bool__ΒΆ

DNA.__bool__()[source]ΒΆ

Returns truth value (truthiness) of sequence.

State: Stable as of 0.4.0.

Returns:

bool

True if length of sequence is greater than 0, else False.

Examples

>>> from skbio import Sequence
>>> bool(Sequence(''))
False
>>> bool(Sequence('ACGT'))
True