Entering edit mode
Voke AO
▴
760
@voke-ao-4830
Last seen 10.3 years ago
Hi all,
Thanks to Dan, I now know how to get genes highlighted in a Volcano
plot based on p-values from the results of my limma analysis. I would
like to get a list of the genes highlighted. For example, the code
below gives me a volcano plot with the top 10% genes based on p-values
highlighted.
windows()
pdf("VolcanoPlot_GSExxxxxx_10perc.pdf");
results$threshold =
as.factor(results$P.Value<=quantile(results$P.Value, 0.1))
g = ggplot(data=results, aes(x=logFC, y=-log10(P.Value),
colour=threshold)) +
geom_point(alpha=0.4, size=1.75) +
opts(legend.position = "none") +
xlim(c(-5, 5)) + ylim(c(0, 8)) +
xlab("log2 fold change") + ylab("-log10 p-value")
g
dev.off()
This code below gives me the exact 10% threshold value:
results = topTable(fit2, adjust ="BH", number =
nrow(gse25724dat[[1]]), sort.by="P")
results2 = quantile(results$P.Value, 0.1)
What I would like however is a list/table of the genes that meet this
criteria, i.e, the genes highlighted from the first code. Any help
will be greatly appreciated.
Thanks.
-Avoks