Using the Enhanced Volcano plot results in an empty plot with no data points displayed
1
0
Entering edit mode
17 months ago
peter.berry5 ▴ 60

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

R enhanced volcano package • 820 views
ADD COMMENT
1
Entering edit mode

Assume this is a typo, but your EnhancedVolcano call uses res 1 rather than res1.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

Indeed, your p-values are outside the range expected for p-values. For example:

-log10(2.326743)
[1] -0.3667484

So, they will not even appear in the plot space.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode
17 months ago

I see - thanks. The issue there is that EnhancedVolcano will perform the -log10 calculation for you, internally. So, you just need to pass the p-values to it.

ADD COMMENT
0
Entering edit mode

Kevin,

Thanks for that help. It works beautifully now. Can I just check if the dataframe must be called "res1" and the names of the X and Y columns in res1 must be called "Log2_FoldChange" and "pvalue"? The reason I ask is that I have several experiments summarised in the one dataframe and obviously can't have multiple columns with the same name. It's not an issue I just want to be clear about the naming requirements.

ADD REPLY
0
Entering edit mode

Hey, no, they can be called anything. So, for one occasion, you can try:

EnhancedVolcano(
  toptable = res1,
    lab = 'res1$HGNC_Symbol',
    x = 'Log2_FoldChange',
    y = 'pvalue')

For another, it could be:

EnhancedVolcano(
  toptable = resultstable,
    lab = 'rownames(resultstable)',
    x = 'log2FC',
    y = 'p')
ADD REPLY

Login before adding your answer.

Traffic: 1139 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6