You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is still issue for you but figured I would post in case you or anyone else has same issue. There is slightly different procedure depending on whether you are adding to Assay or Assay5 object.
If adding to Assay then you can just provide vector of IDs:
If you try with vector of IDs with Assay5 you get error:
suppressMessages(library(Seurat))
pbmc<-pbmc3k.SeuratData::pbmc3kpbmc<- suppressMessages(UpdateSeuratObject(pbmc))
#> Warning: Assay RNA changing from Assay to Assaypbmc_v5<- CreateSeuratObject(counts= LayerData(pbmc))
random_ids<- paste0("A", seq_len(length(Features(pbmc_v5))))
pbmc_v5[["RNA"]] <- AddMetaData(object=pbmc_v5[["RNA"]], metadata=random_ids, col.name="new_ids")
#> Error in `[[<-`:#> ! No feature overlap between new meta data and assay
When trying to add feature metadata to Seurat v5 object using the nromal SeuratObject::AddMetaData() you get the following error
Reprex
The text was updated successfully, but these errors were encountered: