当前位置:网站首页>mapping transferdata FindTransferAnchors TransferData
mapping transferdata FindTransferAnchors TransferData
2022-08-05 16:17:00 【YoungLeeyou】
这里是引用
library(Seurat)
library(SeuratData)
#InstallData("panc8")
data("panc8")
pancreas.list <- SplitObject(panc8, split.by = "tech")
pancreas.list
pancreas.list <- pancreas.list[c("celseq", "celseq2", "fluidigmc1", "smartseq2")]
for (i in 1:length(pancreas.list)) {
pancreas.list[[i]] <- NormalizeData(pancreas.list[[i]], verbose = FALSE)
pancreas.list[[i]] <- FindVariableFeatures(pancreas.list[[i]], selection.method = "vst", nfeatures = 2000,
verbose = FALSE)
}
reference.list <- pancreas.list[c("celseq", "celseq2", "smartseq2")]
pancreas.anchors <- FindIntegrationAnchors(object.list = reference.list, dims = 1:30)
pancreas.integrated <- IntegrateData(anchorset = pancreas.anchors, dims = 1:30)
DefaultAssay(pancreas.integrated)
library(ggplot2)
library(cowplot)
library(patchwork)
# switch to integrated assay. The variable features of this assay are automatically set during
# IntegrateData
DefaultAssay(pancreas.integrated) <- "integrated"
# Run the standard workflow for visualization and clustering
pancreas.integrated <- ScaleData(pancreas.integrated, verbose = FALSE)
pancreas.integrated <- RunPCA(pancreas.integrated, npcs = 30, verbose = FALSE)
pancreas.integrated <- RunUMAP(pancreas.integrated, reduction = "pca", dims = 1:30, verbose = FALSE)
p1 <- DimPlot(pancreas.integrated, reduction = "umap", group.by = "tech")
p2 <- DimPlot(pancreas.integrated, reduction = "umap", group.by = "celltype", label = TRUE, repel = TRUE) +
NoLegend()
p1 + p2
##
pancreas.query <- pancreas.list[["fluidigmc1"]]
pancreas.anchors <- FindTransferAnchors(reference = pancreas.integrated, query = pancreas.query,
dims = 1:30, reference.reduction = "pca")
predictions <- TransferData(anchorset = pancreas.anchors, refdata = pancreas.integrated$celltype,
dims = 1:30)
pancreas.query <- AddMetaData(pancreas.query, metadata = predictions)
pancreas.query$prediction.match <- pancreas.query$predicted.id == pancreas.query$celltype
table(pancreas.query$prediction.match)
table(pancreas.query$predicted.id)
VlnPlot(pancreas.query, c("REG1A", "PPY", "SST", "GHRL", "VWF", "SOX10"), group.by = "predicted.id")
https://satijalab.org/seurat/articles/integration_mapping.html
边栏推荐
- 编译器工程师眼中的好代码:Loop Interchange
- 红蓝对抗|后渗透—CS插件OLa
- EasyCVR调用停止实时录像接口,未返回录像地址该如何解决?
- 基于eureka-server的服务注册与消费案例
- 高数_证明_介值定理
- High Numbers_Prove_The Clamping Criterion of the Existence of Limits
- EasyCVR calls the stop real-time recording interface, how to solve the problem that the recording address is not returned?
- 一起探秘,不可不知双向链表底层原理
- 突不了围,阿里海外怎么办?
- 支付系统架构设计详解
猜你喜欢
随机推荐
mapping transferdata FindTransferAnchors TransferData
js中数组的方法
【翻译】EF Core 3.1.x, 5.x & 6.x Second Level Cache Interceptor
解决FileZilla 报错“无法和 SFTP 服务器建立 FTP 连接,请选择合适的协议”
土耳其国防部:计划从乌克兰购粮的船只已通过安全检查
如何使用 JDBC PreparedStatement将值列表动态添加到 IN 子句
HTB:Obscurity渗透测试
High number of _ _ limit local insurance number
裁员欠薪,黄光裕没能让国美真快乐
高数_证明_极限存在的夹逼准则
EasyCVR调用停止实时录像接口,未返回录像地址该如何解决?
Pypora导出文件word格式
playwright recording script
某次红蓝对抗之Solr-RCE实战绕过
今年考研?七夕顺便把心形线复习一下
盲盒社交电商模式兴起,平台盈利点在哪里?
不堆概念、换个角度聊多线程并发编程
红蓝对抗|常见技战法总结
支付系统架构设计详解
实战|记一次某系统的渗透测试









