Changes between Version 15 and Version 16 of SOP/scRNA-seq


Ignore:
Timestamp:
08/04/20 11:49:55 (4 years ago)
Author:
twhitfie
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SOP/scRNA-seq

    v15 v16  
    7575Many experiments are especially informative when compared to other experiments, either performed by the same or different laboratories.  This is challenging, however, especially when the different experiments profile different types of cells.  In these cases, biological and technical differences are confounded, and one needs to make thoughtful assumptions about how to perform batch correction and achieve "success" during dataset integration.
    7676
     77As of 2020 there are more than a dozen algorithms available for integrating single cell RNA-seq data-sets.  Three such methods are canonical correlation analysis (implemented in Seurat), iterative linear correction based on soft clustering (implemented in Harmony) and integrative nonnegative matrix factorization (implemented in LIGER). Commands for using each of these methods from within a Seurat workflow are given below.
     78 
     79    * Using CCA in Seurat (please see T. Stuart ''et al''. “Comprehensive Integration of Single-Cell Data”, ''Cell'' '''177''', 1888-1902 (2019), the associated Seurat v.3 vignette and the documentation for the FindIntegrationAnchors function):
     80{{{
     81library(Seurat)
     82
     83# Merge two or more Seurat objects, objA and objB, from different batches.
     84all <- merge(x=objA,y=objB,add.cell.ids=c("A","B"))
     85
     86# Split and re-integrate the merged object according to the batch slot.
     87s3.list <- SplitObject(all, split.by = "batch")
     88
     89# This loop normalizes each experiment separately first.
     90for (i in 1:length(s3.list)) {
     91    s3.list[[i]] <- NormalizeData(s3.list[[i]], verbose = FALSE)
     92    s3.list[[i]] <- FindVariableFeatures(s3.list[[i]], selection.method = "vst", nfeatures = 2000, verbose = FALSE)
     93}
     94
     95# Find so-called anchors.
     96s3.anchors <- FindIntegrationAnchors(object.list = s3.list)
     97s3.integrated <- IntegrateData(anchorset = s3.anchors)
     98DefaultAssay(s3.integrated) <- "integrated"
     99}}}
     100
     101    * Using Harmony from within Seurat (please see I. Korsunsky ''et al.'' “Fast, sensitive and accurate integration of single-cell data with Harmony”, ''Nature Methods'' '''16''', 1289-1296 (2019) and the documentation for the RunHarmony function):
     102{{{
     103library(Seurat)
     104library(harmony)
     105
     106# Merge two or more Seurat objects, objA and objB, from different batches.
     107all <- merge(x=objA,y=objB,add.cell.ids=c("A","B"))
     108
     109# In anticipation of using Harmony to integrate data-sets below, first use Seurat to run PCA on the un-corrected data.
     110
     111all <- NormalizeData(all, normalization.method = "LogNormalize", scale.factor = 10000)
     112all <- FindVariableFeatures(all, selection.method = "vst", nfeatures = 2000)
     113all <- ScaleData(all, features = rownames(all))
     114all <- RunPCA(all, features = VariableFeatures(object = all))
     115
     116# Do the integration using Harmony, indexing samples by the batch slot:
     117all <- RunHarmony(all, "batch")
     118
     119# When generating UMAP or another embedding, be sure to use the integrated "harmony" reduction.
     120all <- RunUMAP(all,reduction = "harmony")
     121}}}
     122
     123   * Using LIGER (v 0.4.2.9000) from within Seurat (please see J.D. Welsh ''et al.'' “Single-Cell Multi-omic Integration Compares and Contrasts Features of Brain Cell Identity”, ''Nature Biotechnology'' '''37''', 1873–1887 (2019) and the documentation for the RunOptimizeALS and RunQuantileAlignSNF functions):
     124{{{
     125library(Seurat)
     126library(SeuratWrappers)
     127library(liger)
     128
     129# Merge two or more Seurat objects, objA and objB, from different batches.
     130all <- merge(x=objA,y=objB,add.cell.ids=c("A","B"))
     131
     132# In anticipation of using LIGER to integrate data-sets below, first use Seurat to scale the data without centering.
     133
     134all <- NormalizeData(all, normalization.method = "LogNormalize", scale.factor = 10000)
     135all <- FindVariableFeatures(all, selection.method = "vst", nfeatures = 2000)
     136all <- ScaleData(all, do.center=FALSE, split.by = "batch")
     137
     138# Do the integration using LIGER, indexing samples by the batch slot:
     139all <- RunOptimizeALS(all, split.by = "batch")
     140all <- RunQuantileAlignSNF(all, split.by = "batch")
     141
     142# When generating UMAP or another embedding, be sure to use the reduction from integrated nonnegative factorization ("iNMF").
     143all <- RunUMAP(all, dims = 1:ncol(all[["iNMF"]]), reduction = "iNMF")
     144}}}
    77145=== Export expression and dimensional analysis data for interactive viewing ===
    78146