How to create a Seurat Object from GSE data set?
Olivia Zamora
I know that we can create Seurat object from cell ranger output files(barcode, features, matrix). But I have a GSE single cell data set in csv format. How do I create a Seurat object out of that?
Thanks.
a = read.csv(<csv file >, header = TRUE)
b = t(a)
c = CreateSeuratObject(counts = b, project = "my_single_cell", min.cells = 3, min.features = 200)
Error in CreateAssayObject(counts = counts, min.cells = min.cells, min.features = min.features, :
No cell names (colnames) names present in the input matrix
dput(a[1:10, 1:10])
2.0293824672699, 0, 0, 1.67916893959045, 1.25670552253723, 0,
0, 2.35019993782043, 0), Lypla1 = c(0, 0, 0, 0, 0, 0, 0, 0, 0,
0), Gm37988 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Tcea1 = c(0, 0,
0, 0, 0, 0, 0, 0, 0, 0), Atp6v1h = c(0, 0, 0, 1.69750428199768,
0, 1.25670552253723, 0, 0, 0, 0), Rb1cc1 = c(0, 0, 0, 0, 0, 0,
0, 0, 0, 0), X4732440D04Rik = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Pcmtd1 = c(0, 0, 0, 0, 0, 1.25670552253723, 0, 2.10469627380371, 0, 0), Gm26901 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), row.names = c("AAACCCATCTGGAAGG-WT1",
"AAACGAACAACTCGTA-WT1", "AAACGAACACAGACGA-WT1", "AAACGAATCACGAACT-WT1",
"AAACGAATCAGGGTAG-WT1", "AAACGCTAGCTGACTT-WT1", "AAACGCTTCGACCTAA-WT1",
"AAAGAACAGAATCCCT-WT1", "AAAGTCCAGAGTGACC-WT1", "AAAGTCCAGTAAACAC-WT1"
), class = "data.frame")
> 1 1 Answer
The original table seems to have cells on rows and genes in columns, with the cell names in the first column. To get correct rownames, try this:
a = read.csv(data.csv, row.names = 1)
b = t(a)
c = CreateSeuratObject(counts = b, project = "my_single_cell", min.cells = 3, min.features = 200)Edit: The table seems to contain normalized expression values instead of raw counts. Seurat may not be the right tool for working with that kind of data.
3