Question: Error in plotting Enhanced Volcano plot
0
gravatar for Sib
11 months ago by
Sib20
Sib20 wrote:

I performed a differential expression analysis of microarray data. Now, I have a top table (tT) of results. The tT has logFC, adj.P.Val, GENE-SYMBOL columns. I want to plot a volcano plot by EnhancedVolcano: Publication-ready volcano plots with enhanced colouring and labeling so I enter these codes:

library(EnhancedVolcano)
EnhancedVolcano(tT, lab = tT$GENE_SYMBOL, x = 'logFC', y = 'adj-P-Val', xlim = c(-6, 6),title = 'Volcano plot', pCutoff = 0.01, FCcutoff = 1.5,pointSize = 2.0,labSize = 2.0)

and I get this error:

Error in EnhancedVolcano(tT, lab = tT$GENE_SYMBOL, x = "logFC", y = "adj-P-Val",  : 
  adj-P-Val is not numeric!

But actually the class of adj-P-Val is numeric

class(tT$adj.P.Val)
[1] "numeric"

How can I fix it?

ADD COMMENTlink modified 11 months ago by dsull1.6k • written 11 months ago by Sib20
2
gravatar for dsull
11 months ago by
dsull1.6k
UCLA
dsull1.6k wrote:

Hello, the column name in your dataframe is adj.P.Val, not adj-P-Val. Therefore, when you call EnhancedVolcano, you should use:

EnhancedVolcano(tT, lab = tT$GENE_SYMBOL, x = 'logFC', y = 'adj.P.Val', xlim = c(-6, 6),title = 'Volcano plot', pCutoff = 0.01, FCcutoff = 1.5,pointSize = 2.0,labSize = 2.0)

If you want to preserve the name adj-P-Val with the hyphens instead of periods, when you first create your data frame, you should use the parameter: check.names=FALSE. This will permit the code you wrote in your original post to work.

ADD COMMENTlink modified 11 months ago • written 11 months ago by dsull1.6k

Thanks for answering.

ADD REPLYlink written 11 months ago by Sib20

Please don't delete a question after you received help. The content might be useful for someone else. We don't answer questions just for you but for the entire community.

Please upvote helpful answers and mark the answer as accepted if it solved your problem.

ADD REPLYlink written 11 months ago by WouterDeCoster44k

I already have up-voted to the answer and ticked accept and after that, I deleted the post because I thought that it was not useful for the entire community.

ADD REPLYlink modified 11 months ago • written 11 months ago by Sib20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1548 users visited in the last hour