Algorithms for Next-Generation Sequencing