SingleR --细胞注释

69 篇文章 2 订阅
22 篇文章 0 订阅
文章介绍了如何使用singleR包对单细胞RNA测序数据进行细胞类型注释,包括使用celldex包中的内置参考数据集和自定义已注释数据集,并提到了数据预处理和诊断方法。通过对不同数据集的应用,展示了singleR在细胞注释过程中的功能。
摘要由CSDN通过智能技术生成

brief

在这里插入图片描述

Example

The celldex package provides access to several reference datasets (mostly derived from bulk RNA-seq or microarray data)。

The Human Primary Cell Atlas (Mabbott et al. 2013), represented as a SummarizedExperiment object containing a matrix of log-expression values with sample-level labels。

使用内置的 references

# 从celldex包中获取 reference
library(celldex)
hpca.se <- HumanPrimaryCellAtlasData()
hpca.se

# 直接用singleR进行map注释
library(SingleR)

counts <- GetAssayData(sce[["RNA"]], slot="counts")

meta.data <- sce@meta.data
pred.sce <- SingleR(test = counts, ref = hpca.se, labels = hpca.se$label.main, clusters=meta.data$singleR)

# Summarizing the distribution:
table(pred.sce$labels)

使用其他注释好的数据集作为 reference

# 这里获取已经注释好的数据集
library(scRNAseq)
sceM <- MuraroPancreasData()
sceM <- sceM[,!is.na(sceM$label)]

# SingleR() expects reference datasets to be normalized and log-transformed.
library(scuttle)
sceM <- logNormCounts(sceM)

# 下面是待注释的数据集
sceG <- GrunPancreasData()
sceG <- sceG[,colSums(counts(sceG)) > 0] # Remove libraries with no counts.
sceG <- logNormCounts(sceG) 

# 然后使用singleR进行注释,制定reference和reference对应的lable
pred.grun <- SingleR(test=sceG, ref=sceM, labels=sceM$label, de.method="wilcox")
table(pred.grun$labels)

singleR还提供了注释诊断的方法

plotScoreHeatmap(pred.grun)

每一类细胞理论上被分配给一个label,所以热图上显示的scores应该只有一个label与其正交。
在这里插入图片描述

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值