Label gene name using EnhancedVolcano
2
0
Entering edit mode
4.9 years 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)
RNA-Seq EnhancedVolcano • 6.7k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode
> 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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
> 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 REPLY
4
Entering edit mode
4.9 years ago
AK ★ 2.2k

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

ADD COMMENT
0
Entering edit mode

Wonderful!! It worked!

Thank you very much!

ADD REPLY

Login before adding your answer.

Traffic: 2609 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