Hi,
I'm trying to create a volcano plot but I can't seem to figure out how. I tried using the NormalizeMets and ggplot2 package but I don't seem to understand how the syntax works. The syntax used for NormalizeMets doesn't seem in include Fold Change values and ggplot2 seems like its mostly used to make the graph pretty.
I have a table with a list of metabolite retention time/mass-to-charge ratio along with their corresponding fold-change values and p-values. My goal is to create a volcano plot which highlights p-values that are less than 0.05 and to label each point with the retention time/mass-to-charge ratio.
How should I go about doing this?
So far, I've only managed to upload the table and created variables of the Fold-Change and P-Value data.
Here's the script I used:
EM <- read.csv(file = "D:/metabolomics/4E5/em.csv", row.names = 1)
pvals = EM$pvalues
FC = EM$Fold.changes
log10FC <- log10(FC)
logpv <- -log2(pvals)
library (ggplot2)
I found this form (https://stackoverflow.com/questions/44322793/volcano-plot-in-r) which contains a script for building a volcano plot but it doesn't include assigning the log(10)FC values to the x-axis.
I have the same issue with NormalizeMets - I can't define the x-axis. I'm using the script provided in the reference manual: https://cran.r-project.org/web/packages/NormalizeMets/NormalizeMets.pdf