\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} The mean of the interaction scores was taken over the two replicates. <>= PI = Interactions$piscore PI = (PI[,,,,,1]+PI[,,,,,2]) / 2 @ % The number of positive and negative interactions for each phenotypic feature was counted. Only significant interactions (FDR <= 0.01) were considered. % <>= 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) } @ % \Robject{npos} (\Robject{nneg}) contains the number of positive (negative) genetic interactions per phenotypic feature. The features were sorted by the total number (positive and negative) interactions starting with the largest number. % <>= I = order(-(npos+nneg)) npos = npos[I] nneg = nneg[I] @ A barchart was plotted showing the number of positive and negative interactions. <>= 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}