I have many amino acids sequences like in a fasta format that I did multiple sequence alignment. I was trying to plot something like binary code as heatmap. If it had a change it would be red, if it did not change would be yellow, for example.
I came across to msaplot from ggtreepackage. I also checked ggmsa package for that. But so far, I did not get what I wanted.
So basically I wanted to:
change the multiple sequence alignment to a binary matrix (if the amino differs from the reference sequence, plot x, if not y)
plot as a heatmap
A multiple sequence alignment is something like this for those who don't know.
I know that I should provide some type of data example but I am not sure how to create an example of multiple sequence alignment
if you install ggmsa you can have an example of the data and plot in r using:
protein_sequences <- system.file("extdata", "sample.fasta", package = "ggmsa")
ggmsa(protein_sequences, start = 265, end = 300)


ggmsa- rodrigarco