[BioC] Ideas for plotting

James W. MacDonald jmacdon at med.umich.edu
Tue Aug 18 15:17:53 CEST 2009


Hi Priscila,

Priscila Grynberg wrote:
> Dear BioCs,
> I'd like to create a special volcano plot. Considering that I have genes
> with high B values, and with low B values but with adj.P.Values
> significantly. I'd like to highlight those with B and adj,P.values positive
> and those presenting only the adj.P.values positive.
> 
> Is it possible to do that?

Of course! But you might have to do the plotting by hand rather than 
using a particular function.

We can use the example for lmFit:

sd <- 0.3*sqrt(4/rchisq(100,df=4))
y <- matrix(rnorm(100*6,sd=sd),100,6)
rownames(y) <- paste("Gene",1:100)
y[1:2,4:6] <- y[1:2,4:6] + 2
design <- cbind(Grp1=1,Grp2vs1=c(0,0,0,1,1,1))
options(digit=3)

# Ordinary fit
fit <- lmFit(y,design)
fit <- eBayes(fit)

plot(fit$coef[,2], fit$lods[,2], pch = 16, cex = 0.35,
xlab = "log Fold Change", ylab = "log Odds")
bind <- fit$lods[,2] > 0
points(fit$coef[bind,2], fit$lods[bind,2], pch = 16, cex = 0.5, col = 
"blue")
pind <- p.adjust(fit$p.value[,2], "BH") < 0.05
points(fit$coef[pind,2], fit$lods[pind,2], pch = 16, cex = 0.5, col = "red")

These happen to color the same points, but from what you describe you 
will have both blue and red points.

Best,

Jim

> 
> Thanks for your help.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
University of Michigan
Department of Human Genetics
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826



More information about the Bioconductor mailing list