\section{Distribution of positive and negative interactions}\label{distributionOfInteractions} \subsection{Preliminaries} <>= library(HD2013SGI) data("Interactions",package="HD2013SGI") data("mainEffects",package="HD2013SGI") data("nrOfInteractionsPerTarget",package="HD2013SGI") dir.create(file.path("result","Figures"),showWarnings=FALSE,recursive=TRUE) @ \subsection{Distribution of interactions} Count the number of positive and negative interactions for each phenotypic feature. <>= PI = Interactions$piscore PI = (PI[,,,,,1]+PI[,,,,,2]) / 2 npos = rep(NA_integer_, dim(PI)[5]) nneg = rep(NA_integer_, dim(PI)[5]) for (i in seq_len(dim(PI)[5])) { I = which(Interactions$padj[,,,,i] <= 0.01) pi = (PI[,,,,i])[I] npos[i] = sum(pi >= 0) nneg[i] = sum(pi < 0) } I = order(-(npos+nneg)) npos = npos[I] nneg = nneg[I] pdf(file.path("result","Figures","distributionOfInteractions.pdf"), width=5,height=5) barplot(rbind(npos,nneg),beside=TRUE, col=HD2013SGI:::Colors[c(3,1)], xlab="phenotypic features",ylab="number of interactions") legend("topright",legend=c("pos. interactions", "neg. interactions"), fill=HD2013SGI:::Colors[c(3,1)]) dev.off() @ \begin{center} \includegraphics[width=0.7\textwidth]{result/Figures/distributionOfInteractions.pdf} \end{center}