Hi,
I am trying to plot protein position weighted matrices in seqLogo and DiffLogo and seem to be have a similar problem in which the correct letter for the amino acid is not displayed properly in the plot. It works fine for DNA sequences, but not proteins.
Cheers, Jeff
library(Biostrings)
library(seqLogo)
#Logo of DNA alignment
sequences <- c("ATCCG","TACCG","AACGC")
pwm1 <- consensusMatrix(sequences, as.prob = TRUE)
pwm1
seqLogo(pwm = pwm1)
#Logo of protein alignment
sequences <- c("SCPCA", "PCPTQ", "ECPCQ")
pwm2 <- consensusMatrix(sequences, as.prob = TRUE)
pwm2
seqLogo(pwm=pwm2, alphabet=ASN)
Values for all 20 amino acids need to be in the matrix to plot correctly.