Learn R Programming

ToPASeq (version 1.6.0)

collectWeightsPRS: Function to calculate gene-level weights for topology-based pathway analysis

Description

The functions calculate gene-level weigths defined in various topology-based pathway analysis methods (PRS, SPIA, PWEA). In PRS, it is the number of downstream differentially expressed genes. TIF, the statistic defined in PWEA, is related to the ratio of correlation and distance of genes. SPIA defines the so called net pertubation factors.

Usage

collectWeightsPRS(de, all, pathways) collectWeightsSPIA(de, all, pathways) prepareTIF(pathways, exprs, alpha)

Arguments

de
Named numeric vector, the log fold-changes of the differentially expressed genes
all
Character vector of all genes meassured in the experiment
pathways
A list of pathways, each pathway is an object of class Pathway transformed via preparePathways() for the particular method
exprs
A numeric matrix, gene expression data matrix, rows refer to genes, columns to samples
alpha
Numeric, a threshold to control the magnitude. In TIF calculation, the effect of a gene on a few nearby and tightly correlated genes can be washed out if the gene influences many other genes weakly. The threshold supresses this washing-out

Value

A list, each slot is a vector of gene-level weights for one pathway

Examples

Run this code
pathways<-pathways("hsapiens","kegg")[1:3]
de<-setNames(rnorm(30),sample(nodes(pathways[[1]]),30))
all<-nodes(pathways[[1]])

path<-preparePathways(pathways[1:3], method="SPIA", genes=all, both.direction=TRUE, convertTo="none")
collectWeightsSPIA(de, all, path)

Run the code above in your browser using DataLab