How to create histograms of microarray data

From BITS wiki
Jump to: navigation, search
Go to parent Analyze your own microarray data in R/Bioconductor

The code on this page works for both affy and oligo

You might want to fit all histograms on the same figure:


BioC12.png

The code for this is as follows:

op = par(mfrow = c(2,3))
for(i in 1:6){hist(data[,i],lwd=2,which='pm',ylab='Density',xlab='Log2 intensities',main=ph@data$sample[i])}

You can further play with the appearance of the plot.


BioC13.png

Although the hist() method is very useful and easy to use, you might want to generate the histogram with ggplot(), since this gives you more freedom to make more changes to the plot. Check out the ggplot documentation.


BioC14.png