实验方案(Protocols)

Single-cell sequencing data analysis

Summary

The DoubletFinder method identifies doublets based on the expression matrix, mixes the simulated doublets with the original cell matrix, performs dimensionality-decreasing clustering, and sorts and filters the simulated doublets based on the proportion of simulated doublets in the k nearest-neighbor cells of each cell in conjunction with the Poisson distribution.

Single-cell sequencing expects each single-cell reaction chamber (GEM) to contain one cell or nucleus, i.e., each barcode corresponds to one real cell, but the number of cells contained in a single barcode varies with the concentration of cells on board, and there are cases in which two or more cells share a single barcode, which is called doublets in the actual data. Doublets can be categorized into two types according to their transcription levels:

Homotypic doublets: doublets derived from transcriptionally similar cells

Heterotypic doublets: doublets derived from transcriptionally distinct cells

As the number of cells increases, the proportion of doublets increases. The following table shows the rate of doublets for the 10X platform, as determined by the Poisson distribution. You can refer to the table below to calculate the percentage of doublets in your own data.

Principle

The DoubletFinder method identifies doublets based on the expression matrix, mixes the simulated doublets with the original cell matrix, performs dimensionality-decreasing clustering, and sorts and filters the simulated doublets based on the proportion of simulated doublets in the k nearest-neighbor cells of each cell in conjunction with the Poisson distribution.

Operation method

DoubletFinder Removes Double Cells

Principle

The DoubletFinder method identifies doublets based on the expression matrix, mixes the simulated doublets with the original cell matrix, performs dimensionality-decreasing clustering, and sorts and filters the simulated doublets based on the proportion of simulated doublets in the k nearest-neighbor cells of each cell in conjunction with the Poisson distribution.

Materials and Instruments

R studio software
DoubletFinder R package
GEO:GSE136103

Move

This reproduction of the article Resolving the fibrotic niche of human liver cirrhosis at single-cell level, published in Nature in 2019, has been selected to demonstrate the use of the doubletFinder R package.


Install DoubletFinder

remotes::install_github('chris-mcginnis-ucsf/DoubletFinder')

library(DoubletFinder)

#install.packages("Seurat")

#install.packages('hdf5r')

#install.packages("tidyverse")

library(Seurat)

### Data preprocessing (cellranger data) ##########

###

data_dir<-"/home/shpc_100670/liver/mice CCL4/raw data/GSE136103-M liver healthy"

list.files(data_dir)

GSE136103_healthy<- Read10X(data.dir = data_dir)

dim(GSE136103_healthy)

Create seurat object

# Initial filtering, at least 200 genes can be detected in each cell, each gene is expressed in at least 3 cells GSE136103_healthy <-

CreateSeuratObject(GSE136103_healthy, project = "healthy", min.cells=3, min.features=200)

GSE136103_healthy.

#ncol(GSE136103_healthy1_cd45), saveRDS(GSE136103_healthy, 'GSE136103_M_healthy.rds')

##DoubletFinder############

#devtools::install_github('chris-mcginnis-ucsf/DoubletFinder')

library(DoubletFinder)

library(multtest)

if(!require(multtest)) install.packages("multtest")

if(!require(Seurat))install.packages("Seurat")

if(!require(dplyr))install.packages("dplyr")

if(!require(mindr))install.packages("mindr")

if(!require(mindr))install.packages("tidyverse")

library(Seurat)

library(Rcpp)

library(Rcpp) library(harmony)

library(Rcpp) library(harmony) library(dplyr)

library(patchwork)

library(ggplot2)

##QC and filtering

GSE136103_healthy[["percent.mt"]] <- PercentageFeatureSet(GSE136103_healthy, pattern = "^mt-")

GSE136103_healthy<- subset(GSE136103_healthy, subset = nFeature_RNA > 300 & percent.mt < 30)

##pre-process standard workflow

GSE136103_healthy <- NormalizeData(GSE136103_healthy)

GSE136103_healthy <- FindVariableFeatures(GSE136103_healthy)

GSE136103_healthy <- ScaleData(GSE136103_healthy)

GSE136103_healthy <- RunPCA(GSE136103_healthy)

ElbowPlot(GSE136103_healthy)

GSE136103_healthy <- FindNeighbors(GSE136103_healthy, dims = 1:20)

GSE136103_healthy <- FindClusters(GSE136103_healthy)

GSE136103_healthy <- RunUMAP(GSE136103_healthy, dims = 1:20)

## pK Identification (no ground-truth)

sweep.res.list_nsclc <- paramSweep_v3(GSE136103_healthy, PCs = 1:20, sct=FALSE)

sweep.stats_nsclc <- summarizeSweep(sweep.res.list_nsclc, GT = FALSE)

bcmvn_nsclc <- find.pK(sweep.stats_nsclc)

ggplot(bcmvn_nsclc,aes(pK,BCmetric,group=1))+

geom_point()+

geom_line()

pK<-bcmvn_nsclc %>% #select the pk that corresponds to max bcmvn to optimize doublet det

filter(BCmetric==max(BCmetric))%>% #select the pK that corresponds to max bcmvn to optimize doublet det

select(pK)

pK<-as.numeric(as.character (pK[[1]]))

## Homotypic Doublet Proportion Estimate

annotations<-GSE136103_healthy@meta.data$seurat_clusters

homotypic.prop <- modelHomotypic(annotations)

## ex: annotations <- seu_kidney@meta.data$ClusteringResults

nExp_poi <- round(0.02undefinednrow(GSE136103_healthy@meta.data))

nExp_poi.adj <- round(nExp_poundefined(1-homotypic.prop))

## Assuming 7.5% doublet formation rate - tailor for your dataset

##10000 7.6%

##9000 6.9%

##8000 ##7000 5.4%

##6000 4.6%

##5000 3.9%

###4000 3.1%

##3000 2.3%

## Run DoubletFinder with varying classification stringencie

GSE136103_healthy <- doubletFinder_v3(GSE136103_healthy, PCs = 1:20, pN = 0.25, pK = pK, nExp = nExp_poi.adj, reuse.pANN = FALSE,sct=FALSE)

## Plot results

View(GSE136103_healthy@meta.data)

names(GSE136103_healthy@meta.data)

DimPlot(GSE136103_healthy,reduction = 'umap',group.by = "DF.classifications_0.25_0.2_56")


###number of singlets and doubles

table(GSE136103_healthy@meta.data$DF.classifications_0.25_0.2_56)

End of code run. (Note the number of blank lines in the code)

Results show:

Caveat

1. single-cell doublet may affect the typing of cell subpopulations in the subsequent analysis, and it is necessary to remove it in the quality control, but the predicted doublet may not be all doublet, and there are also differences in the results of different pipeline analysis, so it is necessary to be careful when removing doublet, and it is necessary to analyze the results of multiple results;2. When using DoubletFinder software to analyze doublets, it should be noted that doublets may filter some real single cells;3. The above procedure is fine for single samples, but when it comes to multiple single-cell samples, it is often necessary to analyze each sample independently before combining them.4. DoubletFinder needs to analyze each sample individually, and should be done before the data is processed by seurat.


For more product details, please visit Aladdin Scientific website.

https://www.aladdinsci.com/

目录: 实验方案(Protocols)
探索主题: Cellular experiment

Da — 若无特别说明,分子量单位默认为道尔顿。   Mw — 重均分子量。   Mn — 数均分子量。

产品仅供科研与开发使用,不用于人体、动物、诊断或治疗。

引用本文

阿拉丁科学.《Single-cell sequencing data analysis》. 阿拉丁知识库,更新于 2024年12月23日。 https://www.aladdin-e.com/zh_cn/faqs/single-cell-sequencing-data-analysis-en.html
这篇文章对您有帮助吗? Yes No 有 5 人觉得有帮助