ssdGSA {ssdGSA}R Documentation

Single Sample Directional Gene Set Analysis (ssdGSA)

Description

This function is to calculate directional (disease weighted) gene set scores by incorporating each gene's correlation to a disease or pathway in the gene set.

Usage

ssdGSA(
  Data,
  Gene_sets,
  Direction_matrix = NULL,
  GSA_weight = "equal_weighted",
  GSA_weighted_by = "sum.ES",
  GSA_method = "gsva",
  min.sz = 1,
  max.sz = 2000,
  mx.diff = TRUE
)

Arguments

Data

Data matrix of gene expressions with gene ID as row names and columns corresponding to different samples.

Gene_sets

A list of gene sets with gene set names as component names, and each component is a vector of gene ID.

Direction_matrix

Matrix containing directionality information for each gene, such as effect size, t statistics, p value of summary statistics. Each row of the direction matrix is for one gene, and there should be at least two columns (with the 1st column containing gene entrez ID, and 2nd column containing directionality information). Note that the default is "Direction_matrix = NULL", meaning that no direction matrix is inputted, then the classic single sample gene set scores without direction information would be calculated and returned.

GSA_weight

Method to calculate weight in GSA. By default this is set to "group_weighted". Other option is "equal_weighted".

GSA_weighted_by

When "group_weighted" is chosen to calculate GSA_weight, further specifications are needed to specify how group weights are calculated. By default, this is set to "avg.ES" (average of group ES). Other options are "sum.ES" (sum of group ES) and "median.ES" (median of group ES).

GSA_method

Method to employ in the estimation of gene set enrichment scores per sample. By default this is set to "gsva" (Hanzelmann et al, 2013). Other options are "ssgsea" (Barbie et al, 2009), "zscore" (Lee et al, 2008), "avg.exprs" (average value of gene expressions in the gene set), and "median.exprs" (median of gene expressions in the gene set).

min.sz

GSVA parameter to define the minimum size of the resulting gene sets. By default this is set to 1.

max.sz

GSVA parameter to define the maximum size of the resulting gene sets. By default this is set to 2000.

mx.diff

GSVA parameter to offer two approaches to calculate the enrichment statistic from the KS random walk statistic. mx.diff = FALSE: enrichment statistic is calculated as the maximum distance of the random walk from 0. mx.diff=TRUE (default): enrichment statistic is calculated as the magnitude difference between the largest positive and negative random walk deviations.

Details

Single sample directional gene set analysis inherits the standard gene set variation analysis(GSVA) method, but also provides the option to use summary statistics from any analysis (disease vs healthy, lesional side vs nonlesional side, etc..) input to define the direction of gene sets used for directional gene set score calculation for a given disease or directional function. This function is specific for using group weighted scores.

Value

Matrix of directional gene set scores with rows corresponding to gene sets and columns corresponding to different samples will be return.

References

Xingpeng Li, Qi Qian. ssdGSA - Single sample directional gene set analysis tool.

Barbie, D.A. et al. Systematic RNA interference reveals that oncogenic KRAS-driven cancers require TBK1. Nature, 462(5):108-112, 2009.

Hanzelmann, S., Castelo, R. and Guinney, J. GSVA: Gene set variation analysis for microarray and RNA-Seq data. BMC Bioinformatics, 14:7, 2013.

Lee, E. et al. Inferring pathway activity toward precise disease classification. PLoS Comp Biol, 4(11):e1000217, 2008.

Tomfohr, J. et al. Pathway level analysis of gene expression using singular value decomposition. BMC Bioinformatics, 6:225, 2005.

See Also

ssdGSA_individual

Examples


ssdGSA(Data = data_matrix_entrezID,
       Gene_sets = gene_sets[c(1,2,4)],
       Direction_matrix = direction_matrix,
       GSA_weight = "group_weighted",
       GSA_weighted_by = "sum.ES",
       GSA_method = "gsva",
       min.sz = 1,
       max.sz = 2000,
       mx.diff = TRUE
       )



[Package ssdGSA version 0.1.1 Index]