FPCA.Fstats: Functional F-statistics for time-course gene expression data

Description Usage Arguments Details Value Author(s) References Examples

Description

This function takes time-course expression data and time points as input values. By using Functional Principal Component Analysis (FPCA) techniques, it returns the functional F-statistic for each gene.

Usage

1
FPCA.Fstats(X, tt, rr=rep(1,length(tt)), selection_k="FVE", FVE_threshold=0.9)

Arguments

X

A gene expression matrix. Genes must be ordered as rows and each column represent a time point. Columns must be ordered by tt.

tt

A vector of ordered unique time points.

rr

Number of repetitions at each unique time points.

selection_k

Method of choosing the number of principal components. Choices are: "FVE" (fraction of variance explained), which use scree plot approach to select number of principal components. See FVE_threshold below; a positive integer K: user-specified number of principal components. Default value: "FVE".

FVE_threshold

A positive number between 0 and 1. It is used with the option selection_k = "FVE" to select the number of principal components that explain at least FVE_threshold of total variation. Default value: 0.9.

Details

Technical details of FPCA procedure on time-course expression data is documented in Wu, S. and Wu, H., 2013. BMC bioinformatics.

Value

A vector of F-statistics. The larger the F-statistic is, the more evidence there is for the temporally differentially expressed gene (TDEG).

Note: although the functional F-statistics are defined as ratios of variance between the constant expression model (null model) and the alternative model; due to the nature of functional data analysis, the functional F-statistics may not follow a standard F-distribution under the null. To select significant TDEGs, we must resort to a resampling method. Please consult the following paper for more details.

Author(s)

Shuang Wu

References

Wu, S. and Wu, H., 2013. More powerful significant testing for time course gene expression data using functional principal component analysis approaches. BMC bioinformatics, 14(1), p.1.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Load the sample data
data("H3N2-Subj1")

## Standardize time and X as in FUNNEL.GSEA
tt2 <- (tt - min(tt))/diff(range(tt))
X2 <- t(scale(t(X)))

## Get functional F-statistics
Fstats <- FPCA.Fstats(X2, tt2)

## Sort the F-statistics from the largest to the smallest. 
## The top genes are more "significant".
sorted.genes <- names(sort(Fstats, decreasing = TRUE))

Thakar-Lab/FUNNEL-GSEA-R-Package documentation built on May 8, 2019, 9:57 p.m.