Volcano-plot with vertical lines for FC at wrong place in downloaded image

Hi,

I have discovered a problem/possible bug with the vertical lines in the volcano plots I make in metaboAnalyst.ca.

When using FDR p=0.1 (default) it looks good with vertical lines at -1 and 1, respectively.
But as soon as I change p-value to 0.05 for some reason the vertical lines are suddenly closer to ±1.4
This is without changing the FC threshold which is 2.0 in both cases.
I hope you can help with this.
Best Regards

Georg

1 Like

Please follow our post guideline so that we can look into it.

Hi Jeff,

I have run into this issue as well. The problem appears to be that the same number is provided to ggplot to produce the horizontal and vertical lines in the volcano plot.

I used the test datasets for peak intensities to perform a one-factor analysis. Here is the Rhistory for my session:

PID of current job: 1397801

mSet<-InitDataObjects(“pktable”, “stat”, FALSE)
mSet<-Read.TextData(mSet, “Replacing_with_your_file_path”, “colu”, “disc”);
mSet<-SanityCheckData(mSet)
mSet<-ReplaceMin(mSet);
mSet<-SanityCheckData(mSet)
mSet<-FilterVariable(mSet, “iqr”, “F”, 25)
mSet<-PreparePrenormData(mSet)
mSet<-Normalization(mSet, “MedianNorm”, “LogNorm”, “NULL”, ratio=FALSE, ratioNum=20)
mSet<-PlotNormSummary(mSet, “norm_0_”, “png”, 72, width=NA)
mSet<-PlotSampleNormSummary(mSet, “snorm_0_”, “png”, 72, width=NA)
mSet<-Volcano.Anal(mSet, FALSE, 2.0, 0, F, 0.1, TRUE, “raw”)
mSet<-PlotVolcano(mSet, “volcano_0_”,1, 0, “png”, 72, width=NA)
mSet<-Volcano.Anal(mSet, FALSE, 2.0, 0, T, 0.1, FALSE, “raw”)
mSet<-PlotVolcano(mSet, “volcano_1_”,1, 0, “png”, 72, width=NA)
mSet<-Volcano.Anal(mSet, FALSE, 2.0, 0, T, 0.05, FALSE, “raw”)
mSet<-PlotVolcano(mSet, “volcano_2_”,1, 0, “png”, 72, width=NA)
mSet<-SaveTransformedData(mSet)
mSet<-Volcano.Anal(mSet, FALSE, 2.0, 0, T, 0.01, FALSE, “raw”)
mSet<-PlotVolcano(mSet, “volcano_3_”,1, 0, “png”, 72, width=NA)
mSet<-SaveTransformedData(mSet)

Note that the fold-change is set to 2 for each call of Volcano.Anal, while the p-values used are 0.1, 0.05, and 0.01. Each time, both the horizontal and vertical lines indicating the thresholds shift, while only the horizontal lines indicating the p-value threshold should be shifting.



In the PlotVolcano code, it looks like y-threshold is used for both the y and x-axes:

p ← ggplot(data = de, aes(x = de[, 1], y = de[, 2], col = Status,
label = delabel)) + scale_color_manual(values = mycols) +
geom_vline(xintercept = c(-vcn$thresh.y, vcn$thresh.y),
linetype = “dashed”, color = “black”) + geom_hline(yintercept = -log10(vcn$raw.threshy),
linetype = “dashed”, color = “black”) + geom_point() +
labs(x = “log2(FC)”, y = “-log10(p)”)

Cheers,
racad

1 Like

Thank you for the precise note. The issue is fixed now

1 Like