plot_signal_condition_exp: Plot the signal and background distribution of a correlation...

Description Usage Arguments Value Note Examples

View source: R/functions_evaluation.R

Description

This function allows users to visualize the distributions of (assumed) signal and background, conditional on expression levels. The predicted signals are defined by the 0.1% highest correlations in each bin.

Usage

1
plot_signal_condition_exp(cor_mat, ave_exp, signal)

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

signal

a value between 0 and 1 giving the fraction of correlations which should be considered signal. We often use a value of 0.001.

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
if(require(spqnData)) {
  data(gtex.4k)
  cor_mat <- cor(t(assay(gtex.4k)))
  ave_logrpkm <- rowData(gtex.4k)$ave_logrpkm
  plot_signal_condition_exp(cor_mat, ave_exp=ave_logrpkm, signal=0.05)}

spqn documentation built on Nov. 8, 2020, 8:10 p.m.