i am using the Enhancedvolcano package to draw a volcano plot.
An extract from the dataframe res1 is
head(res1)
HGNC_Symbol Log2_FoldChange pvalue
1 PEPD 0.8480846 2.326743
2 MBD3 0.6007764 2.502897
3 IVNS1ABP 0.8026820 3.581674
4 VPS36 0.7569063 2.129111
5 NUP88 0.7448036 2.513232
6 MCM6 0.5858087 1.498180
and the code i am using is
library(EnhancedVolcano)
EnhancedVolcano(res1,
lab = 'res1$HGNC_Symbol',
x = 'Log2_FoldChange',
y = 'pvalue',
xlim = c(-5, 8))
This give rise to the following error and i get an empty volcano plot with no points
Warning message:
Removed 592 rows containing missing values (geom_point).
can anyone pls suggest what i am doing wrong?
Thanks
Assume this is a typo, but your
EnhancedVolcano
call usesres 1
rather thanres1
.Peter, can you confirm that this was the issue? Otherwise, there's no reason for an empty plot to be produced, unless you have some other devices open elsewhere that are interfering, and/or your
res1
object's columns are not encoded correctly.Kevin, I corrected the error that jared spotted but am still getting the same error message. I noticed in other posts some comments about version numbers. I am running r 3.5.2 is that the issue? The only other thing I can think of is the my spread on the y axis is very small. The largest number is only 2.20. The experiment didn't produce DE genes with huge fold changes.
Could it be related to the p-values all being > 1? As this would give negative values when -log10?
peter.berry5, are you sure you did not mix up p-value and FC column?
Indeed, your p-values are outside the range expected for p-values. For example:
So, they will not even appear in the plot space.
Kevin and AT point, Thanks for all the help. I caclulated my log 2 and -log 10 values previously (the column names aren't v clear but the data I provided is the results of those calculations) and it is these values I passed to the Enhanced Volcanos plot as my "x" and "y". Is there a way I can modify the package or graphing code to plot the data values I have?. If it helps my Log2 FC values range from 0.5 to 2.30 and my -log10 pvalues range from 1.35 to 9.69