@classmethod
def load(cls, data):
    """Load a sequence from a json formatted dictionary."""
    sequence = cls(data['bases'], name=data['name'])
    sequence.cyclic = data['isCircular']
    sequence.name = data['name']
    sequence.description = data.get('description', None)
    for a in data['annotations']:
        sequence.annotate(a['start'], a['end'] - 1, a['name'], a['type'], a
            ['color'])
    return sequence
