Hello,
I have a question about how I can find all cells that have at least one read mapped to any of these 8 activity-dependent genes: OSTN, BDNF, FOS, NPAS4, EGR1, LINC00473, ZNF331, PER1 using the Seurat R package.
I have a seurat object that I have subsetted out to include only clusters that have genes expressed in excitatory neurons.
seurat.obj_combined_filtered_excitatiory <- subset(seurat.obj_combined_filtered, idents = c(0, 1, 3, 4, 5, 6, 8, 11, 14, 15, 16, 19, 20))
The next thing I want to do is from seurat.obj_combined_filtered_excitatiory object I want to find all cells/cell barcodes that have at least one read or UMI that maps to any one of the 8 activity-dependent genes listed above. In other words I want to generate a list of cell barcodes that express the 8 genes above. I tried doing this but I'm getting an error
seurat.obj_combined_filtered_active <- subset(seurat.obj_combined_filtered_excitatiory, cells = nCount_RNA > 1 & features = c("OSTN", "BDNF", "FOS", "NPAS4", "EGR1", "LINC00473", "ZNF331", "PER1"))
Error: unexpected '=' in "seurat.obj_combined_filtered_active <- subset(seurat.obj_combined_filtered_excitatiory, cells = nCount_RNA > 1 & features ="
Is this the right way to approach this? Is there another way I can do this? Should I be using the feature barcode matrix in the Seurat object instead? I would like to further subset `seurat.obj_combined_filtered_excitatiory' and then return a list of cell barcodes that meet this criteria.
Then after this I would like to use the findAllMarkers function to find DEG between seurat.obj_combined_filtered_active & seurat.obj_combined_filtered_excitatiory. Is this possible? Or can I only use the findAllMarkers() function with only one seurat object at a time?
Any help with this will be much appreciated!
Hi, thanks for your response! I tried your solution, but I got errors unfortunately. Is there something I'm missing?
I viewed subsetted seurat object of excitatory clusters
But it isn't subsetted? It has the same number of cells as
seurat.obj_combined_filtered_excitatioryI then ran these lines but got these errors
Could you check what layers are present in your Seurat object?
If it is not
counts, it may be data. And you may need to replacecountswithdatain the above function-Hi, yes I did but I got the same error