Question: Label gene name using EnhancedVolcano
0
gravatar for jsutah08
8 months ago by
jsutah080
jsutah080 wrote:

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 tool enhancedvolcano • 479 views
ADD COMMENTlink modified 8 months ago • written 8 months ago by jsutah080

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

ADD REPLYlink modified 8 months ago • written 8 months ago by SMK1.9k
> 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 modified 8 months ago by genomax78k • written 8 months ago by jsutah080

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 written 8 months ago by shawn.w.foley1.2k
> 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 modified 8 months ago by genomax78k • written 8 months ago by jsutah080
1
gravatar for SMK
8 months ago by
SMK1.9k
SMK1.9k wrote:

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

ADD COMMENTlink modified 8 months ago • written 8 months ago by SMK1.9k

Wonderful!! It worked!

Thank you very much!

ADD REPLYlink written 8 months ago by jsutah080
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: 1779 users visited in the last hour