[BioC] Top 10% of genes based on p-value in TopTable

Dan Du tooyoung at gmail.com
Mon May 7 14:38:19 CEST 2012


Hi Ovokeraye,

if your current approach works fine, just change the first line would
do, 

results$threshold = as.factor(results$P.Value<=quantile(results$P.Value,
0.1))

and btw, limma does provide a function volcanoplot to do exactly the
same thing.

HTH
Dan

On Mon, 2012-05-07 at 14:15 +0200, Ovokeraye Achinike-Oduaran wrote:
> Hi all,
> 
> I'm curious to know how I can get and highlight the top 10% of the
> genes based on p-values that I get from my limma analysis in a volcano
> plot.
> 
> I can get the genes highlighted based on an absolute logFC >2 and a
> p-value<0.01(code below) but I would like to have an idea of the
> number of genes in the top 10% based simply on p-values.
> 
> Any help will be greatly appreciated.
> 
> Thanks.
> 
> -Avoks
> 
> results$threshold = as.factor(abs(results$logFC) > 2 & results$P.Value < 0.01)
> windows()
> pdf("VolcanoPlot_GSE25724_9.pdf");
> 
> 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(-8, 8)) + ylim(c(0, 10)) +
>   xlab("log2 fold change") + ylab("-log10 p-value")
> g
> dev.off()
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list