I am working with some data in R using and I want to create a Seurat object as well to be able to run the FindMarkers function but I haven't been able to figure out how. I have attached a short sample of the code I am using and error report. the data objects are organized like this:
countData
- ID-REF___SAMPLE1___SAMPLE2___SAMPLE3______......
- GENE1______145________820_______461________.......
- GENE2______36_________119_______16__________......
- ..........
metaData
- Sample___Sample#____Tissue_____Disease.State
- SAMPLE1______1_______Retina_______Control
- SAMPLE2______2_______Retina_______Control
- SAMPLE3______3_______Retina_______Disease
- ..........
I am trying to use the CreateSeuratObject function but get this error:
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'head': Cannot find the following identities in the object: 1
Code:
count_seurat <- CreateSeuratObject(countData, project = "SeuratProject", assay = "RNA",
min.cells = 0, min.features = 0, names.field = 1,
names.delim = "_", meta.data = metaData)
head(FindMarkers(count_seurat, ident.1 = 1, min.pct = 0.5))
I am also using DESeq2 and have the data in a 'Large DESeqDataSet' format as well if that is easier.
What do the rows in your count data represent? Is it cells or samples?
Updated it to more clearly represent the data. I did not accurately copy it over. Cols are samples and rows are counts. Thanks!