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
Hi Seurat team and community, thank you all for your contributions in science.
I’m currently integrating multiple samples using a sketch-based approach on SCTransformed data, because running full-dataset integration per sample is exceeding our computational capacity. The standard sketch-integration tutorial (1 million cell dataset from Parse Biosciences) does something like:
However, when I try to adapt this to SCTransform, I can't re-apply variable-feature selection or re-scaling on the downsampled SCT assay. To work around this, I've devised two approaches:
Approach 1: Sketch after SCTransform, then skip re-selection & scaling
# Full SCTransform on each sample
object[["RNA"]] <- split(object[["RNA"]], f = object$sample)
object <- SCTransform(object)
# Sketch on the SCT assay
object <- SketchData(object = object, assay = "SCT", sketched.assay = "sketch", ncells = 3000*length(unique(object$SampleID)), method = "LeverageScore")
# Proceed with PCA and integration
DefaultAssay(object) <- "sketch"
object <- RunPCA(object, reduction.name = "sketch_PCA", features = VariableFeatures(object))
object <- IntegrateLayers(object, orig.reduction = "sketch_PCA", new.reduction = "sketch_RPCA", method = RPCAIntegration, normalization.method = "SCT")
# Project back to full SCT assay
object <- ProjectIntegration(object = object, sketched.assay = "sketch", reduction = "sketch_RPCA", assay = "SCT", reduction.name = "SCT_RPCA")
Approach 2: Re-SCTransform on the downsampled RNA assay
object[["RNA"]] <- split(object[["RNA"]], f = object$sample)
object <- SCTransform(object)
# Sketch on SCT assay
object <- SketchData(object = object, assay = "SCT", sketched.assay = "sketch", ncells = 3000*length(unique(object$SampleID)), method = "LeverageScore")
# Subset the original RNA assay to the sketched cells
object_sub <- subset(object, cells = colnames(object@assays$sketch))
# Re-apply SCTransform on RNA to create a new "sketch" assay
object_sub <- SCTransform(object_sub, assayIn = "RNA", assayNew = "sketch")
# Replace the sketch assay in the main object
object@assays$sketch <- object_sub@assays$sketch
# Proceed with PCA and integration as above
DefaultAssay(object) <- "sketch"
object <- RunPCA(object, reduction.name = "sketch_PCA", features = VariableFeatures(object))
object <- IntegrateLayers(object, orig.reduction = "sketch_PCA", new.reduction = "sketch_RPCA", method = RPCAIntegration, normalization.method = "SCT")
object <- ProjectIntegration(object = object, sketched.assay = "sketch", reduction = "sketch_RPCA", assay = "SCT", reduction.name = "SCT_RPCA")
Question:
Which approach best follows Seurat's intended workflow for sketch-based integration on SCTransformed data? Or is there a more canonical method I'm missing?
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.
-
Hi Seurat team and community, thank you all for your contributions in science.
I’m currently integrating multiple samples using a sketch-based approach on SCTransformed data, because running full-dataset integration per sample is exceeding our computational capacity. The standard sketch-integration tutorial (1 million cell dataset from Parse Biosciences) does something like:
However, when I try to adapt this to SCTransform, I can't re-apply variable-feature selection or re-scaling on the downsampled SCT assay. To work around this, I've devised two approaches:
Question:
Which approach best follows Seurat's intended workflow for sketch-based integration on SCTransformed data? Or is there a more canonical method I'm missing?
Thank you for your guidance!
Thien
Beta Was this translation helpful? Give feedback.
All reactions