Learn R Programming

SETPath (version 1.0)

SETPath-package: Spiked Eigenvalue Test for Pathway data

Description

Tests gene expression data from a biological pathway for biologically meaningful differences in the eigenstructure between two classes. Specifically, it tests the null hypothesis that the two classes' leading eigenvalues and sums of eigenvalues are equal. A pathway's leading eigenvalue arguably represents the total variability due to variability in pathway activity, while the sum of all its eigenvalues represents the variability due to pathway activity and to other, unregulated causes.

Arguments

Details

Package:
SETPath
Type:
Package
Version:
1.0
Date:
2014-11-26
License:
GPL-2
The SETPath provides two functions for the implementation of the SETPath method. The function setpath() runs the test on data from a single pathway. The function setpath.wrapper() runs the test on a list of pathways within a dataset.

References

Patrick Danaher, Debashis Paul, and Pei Wang. "Covariance-based analyses of biological pathways." Biometrika (2015)

Examples

Run this code
#load data:
data(setpath.data)
# identify desired gene list:
genes.in.pathway = pathwaygenes[[1]]
# run test using theoretical quantiles to derive a p-value:
setpath(d1[,genes.in.pathway],d2[,genes.in.pathway],M=1,transform=NULL,verbose=TRUE,minalpha=NULL,
	normalize=TRUE,pvalue="chisq")
# now using a permutation test:
setpath(d1[,genes.in.pathway],d2[,genes.in.pathway],M=1,transform=NULL,verbose=TRUE,minalpha=NULL,
	normalize=TRUE,pvalue="permutation",npermutations=1000)
# now using the "transform" argument to test the null hypothesis that variability unrelated to the
#  first principal component (i.e. the sum of the second through final eigenvalues) is the same 
#  between classes:
setpath(d1[,genes.in.pathway],d2[,genes.in.pathway],M=1,transform=c(-1,1),verbose=TRUE,
	minalpha=NULL,normalize=TRUE,pvalue="chisq",npermutations=1000)
# now using the "transform" argument to test the compound null hypothesis that the second and third
#  eigenvalues are the same between classes:
linear.transformation = matrix(c(0,1,0,0,0,0,1,0),4)
print(linear.transformation)
setpath(d1[,genes.in.pathway],d2[,genes.in.pathway],M=3,transform=linear.transformation,
	verbose=TRUE,minalpha=NULL,normalize=TRUE,pvalue="chisq",npermutations=1000)

# use the function setpath.wrapper to analyze several pathways simultaneously
setpath.wrapper(d1,d2,pathwaygenes,pathwaynames,M=1,transform=NULL,minalpha=NULL,normalize=TRUE,
	pvalue="chisq",npermutations=10000)

Run the code above in your browser using DataLab