Wonderful!! It worked!
Thank you very much!
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)
Try replacing lab = rownames(res) with lab = as.character(res$Associated.gene.name).
Wonderful!! It worked!
Thank you very much!
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"
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.
Log in to answer this question.
Can you provide the outputs of
str(res)andhead(rownames(res))?This is what I got.
It looks like
rownames(res)does not correspond to the gene names, are you sure there isn't a specific column ofresthat corresponds to gene names? Maybe paste the output ofhead(res).This is what I got...