Greetings, I have some protein sequences in which I want to align, and highlight the mismatches using python. Here's what I have so far (after creating a list of the AA seqs):
new = 
for seq1 in allkeeps_sorted:
if len(seq1) != len(VJ):
xlen = (len(VJ) - len(seq1))*"X"
newseq = seq1 + str(xlen)
for seq1 in new:
for x in range(0, len(VJ)):
if (seq1[x] != VJ[x]):
match = colored(seq1[x], "red")
match = colored(seq1[x], "white")
In the list "seqs" some of the AA sequencs are shorter than the "VJ" sequence. So I attempted to add "X"'s to the end of the sequence to make the strings within the list equal, in order to highlight mismatches. However, this did not work. I'm doing this in a Linux terminal, so I want the mismatched AA's to the VJ sequence to be colored red.
All help is appreciated.