You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am analyzing a scRNA-seq dataset with two conditions Control and Disease. I am specifically looking for subset that appears in the disease condition. I am concerned that standard integration might "over-correct" and blend this distinct population into the control clusters.
I have set up a Seurat v5 workflow that: Splits layers (to handle V5 requirements). Runs SCTransform (v2) for normalization. Benchmarks CCA, RPCA, and Harmony side by side. Joins layers and log-normalizes the RNA assay at the end for downstream analysis.
My Questions are: Is this order of operations correct for v5? Specifically, the split - SCT - Integrate - Join - Normalize sequence? For downstream analysis (finding markers for this subset), is it standard practice to switch back to the "RNA" assay (LogNormalized) as I have done in step 7? Or should I be using the SCT residuals?
Here is the minimal code I am using. Any feedback on the workflow is appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am analyzing a scRNA-seq dataset with two conditions Control and Disease. I am specifically looking for subset that appears in the disease condition. I am concerned that standard integration might "over-correct" and blend this distinct population into the control clusters.
I have set up a Seurat v5 workflow that: Splits layers (to handle V5 requirements). Runs SCTransform (v2) for normalization. Benchmarks CCA, RPCA, and Harmony side by side. Joins layers and log-normalizes the RNA assay at the end for downstream analysis.
My Questions are: Is this order of operations correct for v5? Specifically, the split - SCT - Integrate - Join - Normalize sequence? For downstream analysis (finding markers for this subset), is it standard practice to switch back to the "RNA" assay (LogNormalized) as I have done in step 7? Or should I be using the SCT residuals?
Here is the minimal code I am using. Any feedback on the workflow is appreciated.
raw_con <- Read10X("path/to/con_matrix")
raw_dis <- Read10X("path/to/dis_matrix")
obj_con <- CreateSeuratObject(counts = raw_con, project = "con")
obj_dis <- CreateSeuratObject(counts = raw_dis, project = "dis")
obj_con$sample <- "con"
obj_dis$sample <- "dis"
Merge into one object 'seu'
seu <- merge(obj_con, y = obj_dis)
seu$sample <- seu$orig.ident
seu <- subset(seu, subset = nFeature_RNA > 200 & nFeature_RNA < 3000 & mt< 10)
seu[["RNA"]] <- split(seu[["RNA"]], f = seu$sample)
seu <- SCTransform(
seu,
assay = "RNA",
vst.flavor = "v2",
return.only.var.genes = FALSE,
verbose = FALSE
)
seu <- RunPCA(seu, npcs = 30, verbose = FALSE)
Benchmark Integrations (CCA vs RPCA vs Harmony)
All integrations use the 'SCT' assay but save to different reductions
seu <- IntegrateLayers(
object = seu, method = CCAIntegration,
orig.reduction = "pca", new.reduction = "integrated.cca",
normalization.method = "SCT", verbose = FALSE
)
seu <- IntegrateLayers(
object = seu, method = RPCAIntegration,
orig.reduction = "pca", new.reduction = "integrated.rpca",
normalization.method = "SCT", verbose = FALSE
)
seu <- IntegrateLayers(
object = seu, method = HarmonyIntegration,
orig.reduction = "pca", new.reduction = "integrated.harmony",
normalization.method = "SCT", verbose = FALSE
)
methods <- c("integrated.cca", "integrated.rpca", "integrated.harmony")
for (red in methods) {
seu <- FindNeighbors(seu, reduction = red, dims = 1:30, verbose = FALSE)
seu <- FindClusters(seu, resolution = 0.5, cluster= paste0(red, "_clusters"), verbose = FALSE)
seu <- RunUMAP(seu, reduction = red, dims = 1:30, reduction= paste0("umap.", red), verbose = FALSE)
}
Re-join RNA layers for DE analysis and Standard Normalization
seu[["RNA"]] <- JoinLayers(seu[["RNA"]])
seu <- NormalizeData(seu, assay = "RNA", normalization.method = "LogNormalize")
seu <- PrepSCTFindMarkers(seu) # Update SCT models for downstream DE
8. Plot Comparison
Beta Was this translation helpful? Give feedback.
All reactions