splineFilter filters an expression matrix based on spline
models fitted to time-series data, optionally considering treatment and
subject ID.
Usage
splineFilter(
exprMat,
subjectID = NULL,
time,
df,
pCut = 0.5,
ifFDR = FALSE,
treatment = NULL,
refTreatment = NULL
)Arguments
- exprMat
A
numericmatrix of expression data, where rows are features and columns are samples.- subjectID
Character. An optional vector of subject IDs corresponding to columns in exprMat. Default isNULL.- time
A
numericvector representing the time points corresponding to columns in exprMat.- df
A
numericvalue specifying the degrees of freedom for the spline basis.- pCut
A
numericvalue for the p-value cutoff to filter significant features. Default is 0.05.- ifFDR
A
logicalvalue indicating if the false discovery rate (FDR) should be used for filtering. IfFALSE, raw p-values are used. Default isFALSE.- treatment
Character. An optional vector of treatment labels corresponding to columns in exprMat. Default isNULL.- refTreatment
Character. An optional reference treatment label for the treatment vector. Default isNULL.
Value
A filtered expression matrix containing only the features that
meet the significance criteria.
Details
The function performs the following steps:
Converts time points from minutes to hours if both units are present.
Removes rows with missing values from the expression
matrix.Constructs a design matrix for the spline model, optionally including subject IDs and treatments.
Fits a linear model using the design matrix and performs empirical Bayes moderation.
Extracts significant features based on the specified p-value or FDR cutoff.