Sequence Trimming Algorithms