Last data update: 2014.03.03

R: Function to use PWEA method on microarray or RNA-Seq data
PWEAR Documentation

Function to use PWEA method on microarray or RNA-Seq data

Description

The function runs PWEA method (please see References for the details) on gene expression data matrix, vector specifing to which group a sample belongs and a list of pathway graphs. Briefly, it is a weighted GSEA-like method. The weightes are based on the distance and Pearson's correlation between genes in a pathway.

Usage

PWEA(x, group, pathways, type, preparePaths=TRUE, norm.method=NULL, test.method=NULL, tif=NULL, alpha=0.05, nperm=1000,  ncores=NULL, 
  both.directions=TRUE, maxNodes=150, minEdges=0, commonTh=2, filterSPIA=FALSE, convertTo="none", convertBy=NULL)

Arguments

x

An ExpressionSet object or a gene expression data matrix or count matrix, rows refer to genes, columns to samples. Or a list of two data.frames: observed and random (after group permutations) of statistics of differential expression of genes

group

Name or number of the phenoData column or a character vector or factor that contains required class assigments

pathways

A list of pathways in a form from graphite package or created by preparePathways()

type

Type of the data, "MA" for microarray, "RNASeq" for RNA-Seq or "DEtable" for a list of observed and random gene-level statistics

preparePaths

Logical, by default the pathways are transformed with preparePathways(). Use FALSE, if you have done this transformation separately

norm.method

Character, the method to normalize RNAseq data. If NULL then TMM-normalization is performed. Possible values are: "TMM", "DESeq2", "rLog", "none"

test.method

Character, the method for differentiall expression analysis of RNAseq data. If NULL then "voomlimma" is used. Possible values are: "DESeq2", "voomlimma", "vstlimma", "edgeR".

tif

A list of Topology Influence Factor's. One slot refers to one pathway. Use prepareTIF() to create it. It is required only if type=="DEtable"

alpha

Numeric, a theshold value used during TIF calculation

nperm

Numeric, number of permutations. Used only if x %in% c("MA", "RNASeq")

ncores

Numeric, number of cores. Used only if x %in% c("MA", "RNASeq"). The permutations are calculated in parallel way

both.directions, maxNodes, minEdges, commonTh, filterSPIA, convertTo, convertBy

Arguments for the preparePathways()

Value

A list

res

A data frame, rows refer to pathways. It contains: Enrichment score for a pathway, p-value and p-value adjusted for multiple hypothesis testing by Benjamini-Hochberg's FDR method. NA's if less than 2 nodes are present in the data

topo.sig

A list, topology influence factors for the genes in individual pathways. NULL if less than 2 nodes are present in the data

degtest

A named vector of statistics from testing the differential expression

Author(s)

Ivana Ihnatova

References

Hung, JH., Whitfield, T. W., Yang, TH., Hu, Z., Weng, Z., DeLisi, Ch. (2010) Identification of functional modules that correlate with phenotypic difference: the influence of network topology, Genome Biology, 11:R23

See Also

preparePathways, prepareTIF

Examples

## Not run: 
if (require(DEGraph)) {
  data("Loi2008_DEGraphVignette")
  pathways<-pathways("hsapiens","biocarta")[1:10]
  PWEA(exprLoi2008, classLoi2008, pathways,  type="MA", nperm=100)
}


if (require(gageData)) {
 data(hnrnp.cnts)
 hnrnp.cnts<-hnrnp.cnts[rowSums(hnrnp.cnts)>0,]
 group<-c(rep("sample",4), rep("control",4))
 pathways<-pathways("hsapiens","biocarta")[1:10]
 PWEA(hnrnp.cnts, group, pathways,  type="RNASeq", test="vstlimma", nperm=100)
}

## End(Not run)

Results