Closed elcega closed 3 years ago
Hi, I don't know what you want to do. If you need to change gene names, then please do that outside of EnhancedVolcano
So I did the following to add a custom label and worked :) It is quite useful in case we are working with geneIDs and would like to label with the known-name gene.
res_volcano<- as.data.frame(res)
rownames(res_volcano)[rownames(res_volcano) == "OG_592"] <- "Gene 1"
And now I can run the code with the name changed:
EnhancedVolcano(res,
lab = rownames(res),
x = 'log2FoldChange',
y = 'pvalue',
selectLab = c('Gene 1','OG_232'),
xlab = bquote(~Log[2]~ 'fold change'),
pCutoff = 10e-14,
FCcutoff = 2.0,
pointSize = 4.0,
labSize = 6.0,
labCol = 'black',
labFace = 'bold',
boxedLabels = TRUE,
colAlpha = 4/5,
legendPosition = 'right',
legendLabSize = 14,
legendIconSize = 4.0,
drawConnectors = TRUE,
widthConnectors = 1.0,
colConnectors = 'black')
How can I define the gene names and plot them instead of the res geneIDs? OG_592 = "gene1" OG_232 = "gene2"
https://ibb.co/GMLDysX