\section{Heatmaps of interaction profiles}\label{heatmaps} \subsection{Preliminaries} <>= library(HD2013SGI) data("Interactions",package="HD2013SGI") data("mainEffects",package="HD2013SGI") data("nrOfInteractionsPerTarget",package="HD2013SGI") dir.create(file.path("result","Figures"), recursive=TRUE) @ \subsection{Heatmap of all siRNA profiles} $\pi$-scores for each siRNA-pair are summarized over two replicates. <>= PI = Interactions$piscore for (k in seq_len(dim(PI)[5])) { PI[,,,,k,] = PI[,,,,k,] / Interactions$scale[k] } PI = (PI[,,,,,1]+PI[,,,,,2]) / 2 dim(PI) = c(prod(dim(PI)[1:2]),prod(dim(PI)[3:4]),dim(PI)[5]) dimnames(PI) = list( sprintf("%s_%d",rep(Interactions$Anno$target$Symbol,times=2), rep(seq_len(dim(Interactions$piscore)[2]), each=dim(Interactions$piscore)[1])), sprintf("%s_%d",rep(Interactions$Anno$query$Symbol,times=2), rep(seq_len(dim(Interactions$piscore)[4]), each=dim(Interactions$piscore)[3])), rep(dimnames(Interactions$piscore)[[5]])) @ The color scale for interaction scores is cutted from above and below by $\pm$6. Interaction scores between -2 and 2 and colored black. <>= cuts = c(-Inf, seq(-6, -2, length.out=(length(HD2013SGI:::colBY)-3)/2), 0.0, seq(2, 6, length.out=(length(HD2013SGI:::colBY)-3)/2), +Inf) @ A heatmap of $\pi$-scores for all siRNA pairs is plotted. <>= Y = PI hcAll = HD2013SGIorderDim(Y,1) I = hcAll$order J = HD2013SGIorderDim(Y,2)$order K = HD2013SGIorderDim(Y,3)$order pdf(file=file.path("result","Figures","heatmapAll.pdf"),height=14,width=9) HD2013SGIHeatmapHuman(x=Y[I,J,K],cuts=cuts,col=HD2013SGI:::colBY, colnames=TRUE,mcol=10,cexcol=0.5,mrow=0) dev.off() @ \begin{center} \includegraphics[width=0.5\textwidth]{result/Figures/heatmapAll.pdf} \end{center} \subsection{Heatmap of best correlating siRNA profiles} $\pi$-scores are summarized over all siRNA designs for the same gene and both replicates resulting in a single $\pi$-score per gene pair. <>= PI = Interactions$piscore for (k in seq_len(dim(PI)[5])) { PI[,,,,k,] = PI[,,,,k,] / Interactions$scale[k] } PI = (PI[,,,,,1]+PI[,,,,,2]) / 2 PI = (PI[,1,,1,] + PI[,2,,1,] + PI[,1,,2,] + PI[,2,,2,])/4 @ Target genes with a minimum of 5 $\pi$-scores with $\left|\pi_{ij}\right|\ge$ 5 are selected. <>= sel = which(nrOfInteractionsPerTarget >= 5) PI2 = PI[sel,,] @ Pearson correlation coefficient are computed comparing interaction profiles between all gene pairs. <>= Y = PI2 hcAll = HD2013SGIorderDim(Y,1) dim(Y) = c(dim(Y)[1],prod(dim(Y)[2:3])) dimnames(Y)[[1]] = Interactions$Anno$target$Symbol[sel] C2 = cor(t(Y),use="pairwise.complete") @ The heatmap of correlation coefficients is plooted. <>= dd = as.dendrogram(hcAll) pdf(file.path("result","Figures","heatmapSelection.pdf")) heatmap.2(C2,col=colorRampPalette(brewer.pal(9,"RdBu"))(255), breaks=seq(-1,1,length.out=256), trace="none",Rowv=dd,Colv=dd) dev.off() @ \begin{center} \includegraphics[width=0.7\textwidth]{result/Figures/heatmapSelection.pdf} \end{center}