PairComp object draw a heatmap.
hmap.pc(x,eset,samples=rownames(pData(x)),scluster=standard.pearson,pcluster=standard.pearson,slabs,plabs,col="rbg",scale=T,spread=10,by.fc=F,gp=group(x),mbrs=members(x),show.legend=T,title=NULL,cex=0.1)PairComp object to get the probeset list (and other data) fromAffyBatch object containing expression data PairComp object and an AffyBatch object and plots a heatmap. At its simplest, all that is required are these two objects. The function will then draw a heatmap, coloured red-black-green in increasing intensity, scaled for each gene based on standard deviation. The legend shows how these colours translate into intensity. Col can be used to change the colouring. "bwr" specifies blue-white-red, "rbg" specifies red-black-green, and "ryw" specifies red-yellow-white. Alternatively, a vector of arbitrary colours can be supplied (try rainbow(21), for example).
Scaling is somewhat complex. If scale is TRUE, then each gene is coloured independently, on a scale based on its standard deviation. This is calculated as follows: 'group' supplies a column in the pData object of 'eset' that is used to collect samples together (generally as replicate groups). 'members' supplies the entries within this column that are to be used. (Unless specified, the function uses the same value for 'group' and 'members' used to calculate the PairComp object). The function uses these data to calculate the standard deviation for each probeset within each set of replicates, and then calculates the average sd for each gene. This is then used to scale the data so that each probeset is plotted on a scale that shows the number of standard deviations away from the mean it is for that sample. For more details on how all of this works see the website http://bioinf.picr.man.ac.uk/simpleaffy.
Alternatively, by setting by.fc to FALSE, scaling can be done simply in terms of fold-change, in which case, spread defines the maximum and minimum fold changes to show.
hmap.eset blue.white.red.cols standard.pearson ## Not run:
# pc <- pairwise.comparison(eset.mas,group="group",members=c("a","b"),spots=eset)
# pf <- pairwise.filter(pc)
# hmap.pc(pf,eset.mas)
# ## End(Not run)
Run the code above in your browser using DataLab