omarwagih / ggseqlogo

Publication-quality sequence logos in R
208 stars 30 forks source link

exclude WT sequence from seqlogo results #35

Open weipinghh opened 11 months ago

weipinghh commented 11 months ago

Hi,

I have a peptide variant sequences, I want to use seqlogo to visualize the amino acids compositions of each position. But I also want to exclude the WT sequence, I do not know how to achieve that with seqlogo in R. I will be very appreciate if anyone can help me. The WT sequence is GNNRPVYIPQPRPPHPRL. Thank you! Here is my R script in MacOS.

library(ggplot2) library(ggseqlogo) library(stringr) library(ggsci) library(tidyverse) header=T ggseqlogo(as.character(seqlog$seq), method = 'prob') + theme_bw() + scale_y_continuous(labels = scales::percent)