I have many amino acids sequences in a fasta format that I did multiple sequence alignment. I was trying to plot something like binary a code as heatmap. If it had a change in the AA compared to the reference sequence it would be red, if it did not change would be yellow, for example.
I came across to msaplot
from ggtree
package. 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 with two colors based if the amino acid changed or not
here's some data example of what I doing, just instal ggmsa
and you can try this:
protein_sequences <- system.file("extdata", "sample.fasta", package = "ggmsa")
ggmsa(protein_sequences, start = 265, end = 300, color = "Chemistry_AA",font = NULL)
ggmsa
package $\endgroup$