Circular sequence comparison: Algorithms and applications