7 QC HTML report
Compiled: 2025-05-08 Written by Daihan Ji
If you have already performed preprocessing, you can directly run the
RunReport
function to generate a QC web report. If not, you can runRunPreprocess
to complete some basic workflows.
Function Descriptions: RunPreprocess
and RunReport
:
1. RunPreprocess
Function
RunPreprocess
is a function for data preprocessing and includes the following main features:
Calculate Quality Metrics: Adds quality metrics (e.g., number of genes, mitochondrial percentage) to the metadata.
Cell Type Annotation: Runs cell type annotation using the
RunScType
function.Doublet Detection: Detects doublets using specified methods (e.g.,
scDblFinder
).Low-Quality Cell Detection: Filters low-quality cells using specified methods (e.g., MAD).
Dimensionality Reduction: Runs a preprocessing pipeline (e.g., UMAP) for visualization and downstream analysis.
2. RunReport
Function
RunReport
allows you to freely choose the sections of the report you want to generate. The available sections are:
Sample QC Module
section.sample
: Sections to include in the Sample QC module. Default isc(1:3)
.1: Run Sample QC: Sample quality assessment.
2: Run Sample QC: Outlier sample detection by cell type.
3: Run Sample QC: Sample identity verification.
Cell QC Module
section.cell
: Sections to include in the Cell QC module. Default isc(1:2)
.1: Run Cell QC: Low-quality cell information.
2: Run Cell QC: Doublet information.
Feature QC Module
section.feature
: Sections to include in the Feature QC module. Default is1
.- 1: Run Feature QC: Feature quality assessment.
Batch QC Module
section.batch
: Sections to include in the Batch QC module. Default is1:3
.1: Run Batch QC: Sample level.
2: Run Batch QC: Cell level.
3: Run Batch QC: Feature level.
- Load data
library(SingleCellMQC)
library(Seurat)
library(BPCells)
#Load a pre-existing Seurat object or processed raw data using SingleCellMQC.
pbmc <- readRDS("/data/pbmc.rds")
- Run Preprocessing Pipeline for Single-Cell Data (If no prior preprocessing has been performed)
- Generate QC HTML Report
RunReport(
object=pbmc,
tissue = "blood", # tissue for PCT outlier sample detection.
RNA.batch.by = c("orig.ident", "Batch_EXP", "Time_point"), #Column name(s) in the metadata indicating RNA batch information (categorical variable) or other categorical variables for PCA or UMAP plot. Default is "orig.ident". Only for: section.batch (1, 2).
RNA.batch.covariate = c("nFeature_RNA", "percent.mt", "Batch_EXP", "Time_point") #Covariates (can be categorical or continuous) for RNA SVD and Variance Explained analysis. Default is c("orig.ident", "percent.mt", "nFeature_RNA", "nCount_RNA").Only for: section.batch (1, 3).
)