Locating alignments with k differences for nucleotide and amino acid sequences
Department of Computer Science, School of Mathematical Sciences, Tel Aviv University Tel Aviv 69978, Israel
1Department of Computer Science, Courant Institute of Mathematical Sciences, New York University 251 Mercer Street, New York, NY 10012
2Sackler Institute of Molecular Medicine, Sackler Faculty of Medicine, Tel Aviv University Ramat Aviv 69978, Israel Laboratory of Mathematical Biology, National Cancer Institute Bldg 10, Rm 4B-56, NIH, Bethesda, MD 20892, USA
*To whom correspondence should be addressed
Given two sequences, a pattern of length m, a text of length n and a positive integer k, we give two algorithms. The first finds all occurrences of the pattern in the text as long as these do not differ from each other by more than k differences. It runs in O(nk) time. The second algorithm finds all subsequence alignments between the pattern and the test with at most k differences. This algorithm runs in O(nmk) time, is very simple and easy to program.
Received on August 12, 1987; accepted on December 31, 1987