Diffexp: Differential Exposure Analysis

DiffExpR Documentation

Differential Exposure Analysis

Description

DiffExp : Identify signatures with significantly different activities among sample groups.

Usage

## S4 method for signature 'SignExp,character'
DiffExp(signexp_obj, labels, max_instances=200, 
    method=kruskal.test, contrast="all", quant=0.5, cutoff=0.05,
    p.adj= "BH",plot_to_file=FALSE, file="Diffexp_boxplot.pdf",
    colored=TRUE, relative = FALSE, ...)

Arguments

signexp_obj

a SignExp object returned by signeR function.

labels

sample labels used to define sample groups.

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.

method

algorithm used to compare each signature exposure among sample groups. Default is kruskal.test, which leads to the use of Kruskal-Wallis Rank Sum Test.

contrast

defines which sample groups will be considered in the analysis. Default is "all", which leads the algorithm to evaluate the null hypothesis of exposure levels being constant in all groups. Instead, if this parameter contains a list of group labels, the algorithm will evaluate the null hypothesis of exposure levels being constant among those groups.

quant

the p-values quantile which, after log-transform, will be used as DES (Differential Exposure Score). Default is 0.5, which means the median log-transformed p-value will be considered as DES.

p.adj

correction method for p-values adjust at the post-hoc tests performed when there are more than two group labels. See p.adjust for options.

cutoff

threshold for p-values quantile for signatures to be considered as showing differential exposure.

plot_to_file

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

file

Output file to export p-values boxplot.

colored

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

relative

Whether tests should be performed on absolute or relative signature contributions to each sample mutation. Default is FALSE (absolute contributions will be tested).

...

additional parameters for test algorithm defined by the method parameter.

Value

A list with the following items:

Pvquant

boolean array with one entry for each signature, indicating whether it shows differential exposure.

Pvalues

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

MostExposed

for each differentially exposed signature, this array contains the label of the group where it showed higher levels of exposure. Contains NA for signatures not showing differential exposure.

Differences

List of matrices, exported only when there are more than two groups in the analysis and any signature is found to be differentially active. Each matrix corresponds to one of the highlighted signatures and show the results of comparisons among groups, with the significant ones marked as TRUE.

Examples

# assuming signatures is the return value of signeR()

# labels vector, one for each sample
my_labels <- c("a","a","b","b")

diff_exposure <- DiffExp(signatures$SignExposures,labels=my_labels)

# see also
vignette(package="signeR")

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