Trajectory-guided dimension reduction for multi-sample single-cell RNA-seq data
Source:R/mustard.R
mustard.Rd
Trajectory-guided dimension reduction for multi-sample single-cell RNA-seq data
Usage
mustard(
expr,
pseudotime,
cellanno = NULL,
interval = NULL,
r = 3,
resolution = 101,
smooth = 0.001,
maxiter = 20,
epsilon = 1e-04
)
Arguments
- expr
The normalized and standardized gene expression matrix. Rows represent genes and columns represent cells
- pseudotime
The vector of user-provided pseudotime values
- cellanno
The vector indicating which sample each cell belongs to
- interval
Range of pseudotime (range of the original pseudotime by default)
- r
Number of components to decompose into (3 by default)
- resolution
Number of pseudotime values to evaluate in the temporal loading function (101 by default). It does not affect the sample or gene loading vector
- smooth
Smoothing parameter for RKHS norm (1e-3 by default). Larger value means smoother temporal loading functions
- maxiter
Maximum number of iterations (20 by default)
- epsilon
Convergence criteria for difference between iterations (1e-4 by default)
Value
A list including the estimated loadings and explained variances
- A.hat
Sample loading matrix
- B.hat
Gene loading matrix
- Phi.hat
Temporal loading matrix
- time
The pseudotime values where the temporal loading function is evaluated
- Lambda
Eigenvalue vector
- r.square
Variance explained by each component, which is the R-squared of the linear regression of the vectorized temporal tensor against the vectorized low-rank reconstruction using each component
- accum.r.square
Variance explained by the top components accumulated, which is the R-squared of the linear regression of the vectorized temporal tensor against the vectorized low-rank reconstruction using the top components