This is a test version of Biostars. For the public version, visit https://www.biostars.org.
"Idents" can not be use in seurat

Hi, three kind of clusters i discoverd by different dim, now i want to use result of res.0.4 to plot UMAP.

However, there is error when i used the command as fllowing:

Idents(D3_APLNR)<-"res.0.4"
Error in UseMethod(generic = "Idents<-", object = object) : no applicable method for 'Idents<-' applied to an object of class "seurat"

how can i select res.0.4 to plot? thank you!

..@ meta.data   :'data.frame':        8591 obs. of  13 variables:
  ..$ nGene       : int [1:8591] 2135 2049 2429 2775 2079 2661 2572 2810 2292 3391 ...
  ..$ nUMI        : num [1:8591] 6243 6107 7900 9314 5606 ...
  ..$ orig.ident  : Factor w/ 1 level "D3_APLNR": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ percent.mito: num [1:8591] 0.0314 0.0337 0.0353 0.0353 0.0209 ...
  ..$ res.0.3     : chr [1:8591] "0" "1" "0" "2" ...
  ..$ res.0.4     : chr [1:8591] "0" "0" "0" "1" ...
  ..$ res.0.5     : chr [1:8591] "1" "0" "0" "2" ...
rna-seq software error

Hello, if you have your results in different assays I think you need to set the default assay to the one you want to display

DefaultAssay(object = D3_APLNR) <- "res.0.4"
RunUMAP(object = D3_APLNR)

1 answer

Try:

Idents(D3_APLNR)=D3_APLNR$res.0.3

Log in to answer this question.