qqplot_condition_exp: Q-Q plot for examing the distributions across submatrices of...

Description Usage Arguments Value Note Examples

View source: R/functions_evaluation.R

Description

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.

Usage

1
qqplot_condition_exp(cor_mat,ave_exp, i,j)

Arguments

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).

Value

Invoked for the side effect of producing a plot.

Note

The mnemonic for condition_exp is ‘conditional on expression’.

Examples

1
2
3
4
5
6
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)
}

hansenlab/spqn documentation built on April 25, 2020, 5:15 p.m.