skbio.sequence.DNASequence.__repr__

DNASequence.__repr__()[source]

The repr method.

Returns:

str

Returns a string representation of the object.

Notes

String representation contains the class name, the first ten characters of the sequence followed by ellipses (or the full sequence and no ellipses, if the sequence is less than 11 characters long), followed by the sequence length.

Examples

>>> from skbio.sequence import BiologicalSequence
>>> s = BiologicalSequence('GGUCGUGAAGGA')
>>> repr(s)
'<BiologicalSequence: GGUCGUGAAG... (length: 12)>'
>>> t = BiologicalSequence('ACGT')
>>> repr(t)
'<BiologicalSequence: ACGT (length: 4)>'
>>> t
<BiologicalSequence: ACGT (length: 4)>