immune.combined@assays$integrated@data,矩阵的基因数为2000,这些基因应该来自于步骤中挑选的features ,基因表达值有正有负。scale.data,也是只有2000个基因,基因表达值有正有负。counts为空。 假设运行FeaturePlot()查看基因表达分布,它默认选的是integrated中的data矩阵。 在seurat数据结构中,有个active.assay变量,里面...
DefaultAssay(wb_seurat) <- "integrated" wb_seurat <- ScaleData(wb_seurat, verbose = F) wb_seurat <- RunPCA(wb_seurat, npcs = 30, verbose = F) wb_seurat <- RunUMAP(wb_seurat, reduction = "pca", dims = 1:30, verbose = F) DimPlot(wb_seurat, reduction = "umap") + scale_colo...
immune.anchors <- FindIntegrationAnchors(object.list = ifnb.list, anchor.features = features) # this command creates an 'integrated' data assay immune.combined <- IntegrateData(anchorset = immune.anchors) # specify that we will perform downstream analysis on the corrected data note that the # ...
Transfer实现的是将一个数据集的某个标签转移到另一个数据集上。核心函数是FindTransferAnchors以及TransferData。 pancreas.anchors <- FindTransferAnchors(reference = pancreas.integrated, query = pancreas.query, dims = 1:30, reference.reduction = "pca") predictions <- TransferData(anchorset = pancreas.an...
<- "integrated"# 运行标准分析pancreas.integrated <- ScaleData(pancreas.integrated, verbose = FALSE)pancreas.integrated <- RunPCA(pancreas.integrated, npcs = 30, verbose = FALSE)pancreas.integrated <- RunTSNE(pancreas.integrated, reduction = "pca", dims = 1:30)DimPlot(pancreas.integrated, reducti...
DimPlot(pancreas.integrated, reduction = "tsne", group.by = "orig.ident") image.png 差异分析 分析cluster中的markgene需要使用的数据是RNA对象,需要进行Assay切换。 DefaultAssay(pancreas.integrated) <- "RNA" pancreas.integrated<-NormalizeData(pancreas.integrated, normalization.method = "LogNormaliz...
?FindIntegrationAnchors 但是在整合的时候有时候整合不成功,特别是应⽤之前的单细胞技术,识别的细胞较少的时候,如可能会报错:Filtering Anchors Error in nn2(data = cn.data2[nn.cells2, ], query = cn.data1[nn.cells1, :Cannot find more nearest neighbours than there are points github上有这个...
DefaultAssay(wb_seurat)<-"integrated"wb_seurat<-ScaleData(wb_seurat,verbose=F)wb_seurat<-RunPCA(wb_seurat,npcs=30,verbose=F)wb_seurat<-RunUMAP(wb_seurat,reduction="pca",dims=1:30,verbose=F)DimPlot(wb_seurat,reduction="umap")+scale_color_npg()+plot_annotation(title="10k 3' PBMC and ...
DefaultAssay(pbmc_seurat)<-"integrated"pbmc_seurat<-ScaleData(pbmc_seurat,verbose=F)pbmc_seurat<-RunPCA(pbmc_seurat,npcs=30,verbose=F)pbmc_seurat<-RunUMAP(pbmc_seurat,reduction="pca",dims=1:30,verbose=F)### 可视化 p1<-DimPlot(pbmc_seurat,reduction="umap")+scale_color_npg()+plot_annotatio...
DefaultAssay(ifnb.combined) <- "integrated" ifnb.combined <- ScaleData(ifnb.combined, verbose = FALSE) ifnb.combined <- RunPCA(ifnb.combined, npcs = 30, verbose = FALSE) ifnb.combined <- RunUMAP(ifnb.combined, reduction = "pca", dims = 1:30) ifnb.combined <- FindNeighbors(ifnb...