单细胞高级分析代码的报错求助

这里都是正常运行:

#修改seurat对象的Idents,并添加细胞类型信息到metadata中,并增加mycelltype列

Rscript $scripts/seurat_add_celltype.r -i ../03.seurat_cluster/suture.rds \ -c celltype.tsv -p suture.added.celltype -n mycelltype

> obj=readRDS("~/single-cell/1_suture_stem_cell_analysis/04.cell_type_ann/suture.added.celltype.rds") > DefaultAssay(obj)

[1] "RNA" > marker <- c("Mmp9","Cd68","Pclaf","Smc2","Cd79a","Cd79b","Nt5e","Cd44", + "Cdk6","Runx2","mt-Co3","mt-Co1","Trbc2","Cd2","Col1a1","Col3a1", + "Ermap","Aqp1","Cdh1","Mcpt8") >

这个代码开始报错,其它的都是类似的报错

DotPlot(obj, features = marker)+coord_flip()+ + theme_bw()+ + theme(panel.grid = element_blank(), + axis.text.x=element_text(hjust = 1,vjust=1,angle = 45))+ + labs(x=NULL,y=NULL)+ + guides(size=guide_legend(order=3))+ + scale_color_gradientn(values = seq(0,1,0.2),colours = rev( brewer.pal(11,"RdYlBu"))) #改变一下颜色

>Error in CellsByIdentities(object = object, idents = idents) : Cannot find cells provided
请问这应该怎么解决呢?

> class(obj)
[1] "Seurat"
attr(,"package")
[1] "SeuratObject"
> dim(obj)
NULL
请先 登录 后评论

1 个回答

omicsgene - 生物信息
擅长:重测序,遗传进化,转录组,GWAS

建议截图解释问题,不知道你是运行R命令,还是shell命令;

你这个文件在当前文件夹吗?检查一下: celltype.tsv 

如果在,打开看一下内容是否正确



请先 登录 后评论
  • 1 关注
  • 0 收藏,107 浏览
  • 应二哈爱看牙 提出于 2024-12-16 19:09

相似问题