Seurat orig.ident
1
0
Entering edit mode
2.9 years ago
clizama • 0

HI,

I would like to set-up the orig.ident in the seurat object using the barcodes ID.

I was trying something like that:

matobj<-CreateSeuratObject(mat, min.cells = 100, min.features = 200, names.field = 1, names.delim = '_', assay = "RNA")

but the output for some reason instead to be 001C is seuratproject,

                                                orig.ident nCount_RNA nFeature_RNA
001C_AAACCTGCATCGGGTC SeuratProject       5477         2150
001C_AAACCTGTCAACACCA SeuratProject      20309         4724
001C_AAACCTGTCACAGTAC SeuratProject       1390          881
001C_AAACCTGTCTGTCTAT SeuratProject       3965         1940

thanks Carlos

seurat barcodes orig.ident • 4.9k views
ADD COMMENT
1
Entering edit mode
2.9 years ago
abedkurdi10 ▴ 190

Hello Carlos, please try the following:

matobj$orig.ident <- NULL
matobj$orig.ident <- gsub("_*","",rownames(matobj[[]]))

let me know if it works.

ADD COMMENT
1
Entering edit mode

An alternative is when you create the Seurat object, make sure you use the project parameter.

matobj<-CreateSeuratObject(mat, 
                           min.cells = 100, 
                           min.features = 200, 
                           names.field = 1, 
                           names.delim = '_', 
                           assay = "RNA", 
                           project = "001C")

Also as a small suggestion just heads up with having rownames starting with numeric values - it can be problematic down the road if you are extensileyt using the meta data.

ADD REPLY

Login before adding your answer.

Traffic: 1110 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6