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<[email protected]$seurat_clusters

homotypic.prop <- modelHomotypic(annotations)

## ex: annotations <- [email protected]$ClusteringResults

nExp_poi <- round(0.02undefinednrow([email protected]))

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([email protected])

names([email protected])

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


###number of singlets and doubles

table([email protected]$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/

Categories: Protocols
Explore topics: Cellular experiment

Da — when not otherwise indicated, molecular weight units are daltons.   Mw — weight-average molecular weight.   Mn — number-average molecular weight.

Products are supplied for research and development use only. Not for use in humans, animals, diagnosis, or therapy.

Cite this article

Aladdin Scientific. "Single-cell sequencing data analysis" Aladdin Knowledge Base, updated 24 dic 2024. https://www.aladdinsci.com/us_es/faqs/single-cell-sequencing-data-analysis-en.html
Was this article helpful? Yes No 0 out found this helpful

Shall we send you a message when we have discounts available?

Remind me later

Thank you! Please check your email inbox to confirm.

Oops! Notifications are disabled.