I am computing haplotypes from multiple sequence alignments and am getting stretches of repeats such as RNNNNNNNT and RNNNT. There are many variations, making it hard to make sense of the data.
The data is listed as below and am I'm interested in generating the column haplotypes_2 based on haplotypes_1 as indicated:
hap_code haplotypes_1 haplotypes_2
1 SKNNNRNNNNNKNNNNNNNKF SK(N3)R(N5)K(N7)KF
2 SKNNNNNNNNNKNNNNNNNNKF SK(N9)K(N8)KF
3 SKNNNNNNNNNNNNNNNNKF SK(N16)KF