Question: Label gene name using EnhancedVolcano
0
Entering edit mode
3 months ago
jsutah08 • 0

Hello,

I am trying to make a volcano plot using EnchancedVolcano. I would like to label genes but when I draw the volcano plot, the genes were labeled with numbers instead name.

Could you let me know what I need to correct?

Thank you!

#Plot the most basic volcano plot
EnhancedVolcano(res,
              lab = rownames(res),
                x = 'Lg2Rto.A_C',
                y = 'AdjP.A_C',
                xlim = c(-4, 4),
                title = 'DEG',
                pCutoff = 0.05,
                FCcutoff = 1,
                transcriptPointSize = 3.0,
                transcriptLabSize = 3.0)
Entering edit mode
0

Can you provide the outputs of str(res) and head(rownames(res))?

ADD REPLYlink 3 months ago
SMK
♦ 1.3k
Entering edit mode
0
> str(res)
'data.frame':   72 obs. of  3 variables:
 $ Associated.gene.name: Factor w/ 72 levels "BCL2","C4A","C4BPA",..: 20 32 15 47 39 69 33 60 53 22 ...
 $ Lg2Rto.A_C          : num  2.922 3.135 2.19 -0.756 1.489 ...
 $ AdjP.A_C            : num  1.58e-07 7.94e-07 2.51e-06 3.16e-05 7.94e-04 ...

> head(rownames(res))
[1] "1" "2" "3" "4" "5" "6"

This is what I got.

ADD REPLYlink 3 months ago
jsutah08
• 0 • updated 3 months ago
genomax
68k
Entering edit mode
0

It looks like rownames(res) does not correspond to the gene names, are you sure there isn't a specific column of res that corresponds to gene names? Maybe paste the output of head(res).

ADD REPLYlink 3 months ago
shawn.w.foley
• 670
Entering edit mode
0
> head(res)
  Associated.gene.name Lg2Rto.A_C     AdjP.A_C
1                   F3  2.9221635 1.584893e-07
2                 IL10  3.1345298 7.943282e-07
3                CXCL3  2.1899018 2.511886e-06
4                 IRF3 -0.7561774 3.162278e-05
5                IL2RA  1.4894707 7.943282e-04
6              TNFRSF4 -1.1683134 7.943282e-04

This is what I got...

ADD REPLYlink 3 months ago
jsutah08
• 0 • updated 3 months ago
genomax
68k
0
Entering edit mode
3 months ago
SMK ♦ 1.3k
Ghent, Belgium

Try replacing lab = rownames(res) with lab = as.character(res$Associated.gene.name).

ADD COMMENTlink 3 months ago SMK ♦ 1.3k
Entering edit mode
0

Wonderful!! It worked!

Thank you very much!

ADD REPLYlink 3 months ago
jsutah08
• 0

Login before adding your answer.

Powered by the version 1.5