ExposureCorrelation: Exposure correlation analysis (given a known sample feature)

ExposureCorrelationR Documentation

Exposure correlation analysis (given a known sample feature)

Description

ExposureCorrelation : Identify signatures which are significantly correlated with a provided (numeric) sample feature.

Usage

## S4 method for signature 'SignExp,numeric'
ExposureCorrelation(Exposures, feature,
    method="spearman", max_instances=200, cutoff_pvalue=0.05, quant=0.5,
    plot_to_file=FALSE, file="ExposureCorrelation_plot.pdf",
    colors=TRUE,...)

Arguments

Exposures

a SignExp object returned by signeR function or a matrix of exposures (with signatures in rows and a column for each sample).

feature

numeric feature associated with each sample, such as age, weight or the expression of a gene.

method

a character string indicating which correlation coefficient should be used for the test. Options are "pearson", "kendall", or "spearman" (default).

max_instances

Maximum number of the exposure matrix instances to be analyzed. If the number of available E instances is bigger than this parameter, a subset of those will be randomly selected for analysis.

cutoff_pvalue

threshold for p-values quantile for signatures to be considered as showing significant correlation.

quant

the p-values quantile which, after log-transform, will be used for selecting significantly correlated signatures. Default is 0.5, which means the median p-value will be considered.

plot_to_file

Whether to save the plot to the file parameter. Default is FALSE.

file

Output file to export p-values boxplot and scatterplots showing the correlations of exposures and the provided feature.

colors

Boolean variable, if TRUE p-values boxplots of significantly correlated signatures will be colored in green, cutoff line will be colored in red and line segments showing the transformed p-value quantile used for significance evaluation will be colored in blue. Otherwise the plot will be black & white.

...

additional parameters for test algorithm defined by the method parameter.

Value

A list with the following items:

Significance

boolean array with one entry for each signature, indicating whether it shows significant correlation with the provided feature.

Correlation_quantiles

vector of correlation quantiles, with one entry for each signature.

Pvalues_quantiles

vector of p-values quantiles used for significance evaluation.

Correlations

matrix containing all computed correlations, with one row for each signature.

Pvalues

matrix containing all computed p-values, with one row for each signature.

Examples

# assuming signatures is the return value of signeR()

# feature vector, with one value for each sample
my_feature <- rnorm(30,100,20)+signatures$SignExposures@Exp[1,,1]

Exp_corr <- ExposureCorrelation(signatures$SignExposures,feature=my_feature)

# see also
vignette(package="signeR")

rvalieris/signeR documentation built on April 20, 2024, 2:08 p.m.