qqplot_condition_exp {spqn} | R Documentation |
We partition the correlation matrix into 10x10 bins of equal size, with genes ordered according to expression level. As reference bin, we choose the (9,9) bin (ie. the almost-highest expressed genes). We then make a QQ-plot of the (i,j)'th submatrix vs. the (9,9) submatrix. See the SpQN paper for detail on these choices.
qqplot_condition_exp(cor_mat,ave_exp, i,j)
cor_mat |
Matrix, correlation matrix, generated by gene expression matrix. |
ave_exp |
Vector, average expression level of each gene for the normalized expression matrix. |
i |
Integer, row number of the submatrix (see details). |
j |
Integer, column number of the submatrix (see details). |
Invoked for the side effect of producing a plot.
The mnemonic for condition_exp
is ‘conditional on
expression’.
if(require(spqnData)) { data(gtex.4k) cor_mat <- cor(t(assay(gtex.4k))) ave_logrpkm <- rowData(gtex.4k)$ave_logrpkm qqplot_condition_exp(cor_mat, ave_exp=ave_logrpkm, 1, 1) }