# skbio.sequence.DNASequence.__eq__¶

DNASequence.__eq__(other)[source]

The equality operator.

Biological sequences are equal if their sequence is the same and they are the same type. Identifier, description, and quality scores are ignored.

Parameters: other : BiologicalSequence The sequence to test for equality against. bool Indicates whether self and other are equal.

Notes

See BiologicalSequence.equals for more fine-grained control of equality testing.

This method is equivalent to self.equals(other, ignore=['id', 'description', 'quality']).

Examples

>>> from skbio.sequence import BiologicalSequence
>>> s = BiologicalSequence('GGUCGUGAAGGA')
>>> t = BiologicalSequence('GGUCGUGAAGGA')
>>> s == t
True
>>> u = BiologicalSequence('GGUCGUGACCGA')
>>> u == t
False


Note that even though the quality scores do not match between u and v, they are considered equal:

>>> v = BiologicalSequence('GGUCGUGACCGA',
...                        quality=[1, 5, 3, 3, 2, 42, 100, 9, 10, 55,
...                                 42, 42])
>>> u == v
True