In the following interactive session, we assume the FASTA file data01.fna1 to be located in the current directory.
>>> lcs('data01.fna', 'output01.fna') >>> print(open('output01.fna').read().rstrip()) >seq01 AACTTG
Bergroth L, Hakonen H, Raita T (2000). A survey of longest common subsequence algorithms. In: Proceedings of the Seventh International Symposium on String Processing and Information Retrieval, 39-48. 2
Chvatal V, Sankoff D (1975). Longest common subsequences of two random sequences. Journal of Applied Probability 12(2), 306-315. 3
Masek WJ, Paterson MS (1980). A faster algorithm computing string edit distances. Journal of Computer and System sciences 20(1), 18-31. 4