Implementation of MaSigPro for scRNA-Seq Data
Introduction
scMaSigPro
is an R package designed for analyzing single-cell RNA-seq data over pseudotime. Building on the maSigPro package, it identifies genes with significant expression changes across branching paths in a pseudotime-ordered dataset. This guide provides a step-by-step workflow for ScMaSigPro, making it accessible for users.
Installation
To install scMaSigPro
from GitHub, use the following R code:
# Install devtools if not already installed
if (!requireNamespace("devtools", quietly = TRUE)) {
install.packages("devtools")
}
# Install scMaSigPro
devtools::install_github("BioBam/scMaSigPro",
ref = "main",
build_vignettes = FALSE,
build_manual = TRUE,
upgrade = "never",
force = TRUE,
quiet = TRUE)
Basic Usage
The basic workflow of scMaSigPro
involves the following steps:
1. Load Package and Dataset
set.seed(123)
library(scMaSigPro)
data("splat.sim", package = "scMaSigPro")
2. Create scMaSigPro
Object
# Helper Function to convert annotated SCE object to scmpObject
scmp.ob <- as_scmp(
object = splat.sim, from = "sce",
align_pseudotime = FALSE,
verbose = TRUE,
additional_params = list(
labels_exist = TRUE,
exist_ptime_col = "Step",
exist_path_col = "Group"
)
)
3. Pseudo-bulking with sc.squeeze()
This function discretizes a continuous pseudotime column into bins:
scmp.ob <- sc.squeeze(scmp.ob)
4. Setting up the Polynomial Model
scmp.ob <- sc.set.poly(scmp.ob)
5. Detecting Genes with Non-Flat Profiles
scmp.ob <- sc.p.vector(scmp.ob)
6. Model Refinement
scmp.ob <- sc.t.fit(scmp.ob)
7. Gene selection with R2
scmp.ob <- sc.filter(scmp.ob, vars = "all")
8. Gene Trend Visualization
plotTrend(scmp.ob, "Gene10")
For detailed instructions and additional steps, please refer to the following vignettes.