I am making a volcano plot for my phosphoproteomics data and seemingly the data are not centered around the origin. The reason that I know there is something wrong is because before my code was producing the correct volcano plot, and now it is shifted. What are some reasons why it could be shifted without showing all my code? The only difference between the two is that I didn’t filter out as many phosphopeptides in the second plot. Any obvious red flags that I am not seeing?
I am making the plot in Enhaced Volcano in R with this code:
Rap_nutri_df <- cbind(final_phosphoproteomics_nutri_caltech$Phosphorylation_Site,
final_phosphoproteomics_nutri_caltech$`Log2(Ratio_Rap_v_Control)`, #this is shifted!!!!
final_phosphoproteomics_nutri_caltech$`Adj_p-val_Rap_v_Control`)
colnames(Rap_nutri_df) <- c("phosphopeptide", "log2FoldChange","adj_pvalue")
R_nutri_df <- transform(R_nutri_df, log2FoldChange = as.numeric(log2FoldChange),
adj_pvalue = as.numeric(adj_pvalue),
phosphopeptide = as.character(phosphopeptide))
options(ggrepel.max.overlaps = Inf)
EnhancedVolcano(R_nutri_df,
lab = '', #R_nutri_df$phosphopeptide,
x = 'log2FoldChange',
y = 'adj_pvalue',
title="R vs Control",
labSize = 1.0,
pCutoff = 0.05,
FCcutoff = 1.5,
legendPosition = 'top',
legendLabSize = 12,
legendIconSize = 4.0,
col=c('black', 'black', 'black', 'green1'),
xlim = c(-5, 5),
gridlines.major = TRUE,
gridlines.minor = TRUE,
#drawConnectors = TRUE, #draw arrows from data points
widthConnectors = 0.75,
shape=15) + #square shape of data points
ggplot2::coord_cartesian(xlim=c(-3.1, 3.1))
Read more here: Source link