Hello All, I am using one of your sample scripts to test my data in volcano plots. My files has 3 columns: Gene; Log2FoldchangeC; and pvalue But by default i keep getting the rownames as labels - What i want to plot is "Gene" name as labels (and not rownames like 1, 2, 3, etc.)
Could you please help?
This is the sample script:
res <- read.table("results.txt", header=TRUE)
head(res)
#rownames(res) <- sub("Gene", "", rownames(res))
EnhancedVolcano(res,
lab = rownames(res),
x = "log2FoldChange",
y = "pvalue",
ylab = bquote(~-Log[10]~italic(Pvalue)),
pCutoff = 10e-5,
FCcutoff = 1.5,
#xlim=c(-5.5, 5.5),
#ylim=c(0, -log10(10e-12)),
transcriptLabSize = 3.5,
title = "Drug+Toxin VS Ctrl results",
legendPosition = "right",
legendLabSize = 14,
col = c("grey30", "forestgreen", "royalblue", "red2"),
colAlpha=0.9,
#DrawConnectors = TRUE,
widthConnectors=0.2)
Kevin, Thank you very much for your prompt response. Please also let me know how to: Put different shapes, size and colors to left and right labeled genes (for e.g., to have genes on right to be Red, Star shape, and of larger size than default).
P.S. I am installing your newer ver. for EV plots
Please use
ADD COMMENT/ADD REPLY
when responding to existing posts to keep threads logically organized.This comment belongs under @Kevin's answer.