satijalab / sctransform

R package for modeling single cell UMI expression data using regularized negative binomial regression
GNU General Public License v3.0
203 stars 33 forks source link

Obtain expression data for the specific genes on integrated seurat project #178

Closed jfoedfjwofa closed 5 months ago

jfoedfjwofa commented 5 months ago

Hello everyone,

I'm conducting Seurat analysis for GSE-deposited scRNA seq data. I performed integration of multiple data set (by "IntegrateData") and proceeded to gene expression profiling of each Seurat cluster for cell type annotation, but the following error message was appeared...

Tcell_markers<-c("CD4","CD8A","FOXP3") AverageExpression(My_integrated_data, group.by = "seurat_clusters", features=Tcell_markers ,verbose=FALSE)$RNA Warning: None of the features specified were found in the RNA assay. Warning: The following 3 features were not found in the integrated assay: CD4, CD8A, FOXP3 Warning: None of the features specified were found in the integrated assay. NULL

Curiously, when I run the same script last month, I could get proper results....

Scripts I used for data integration was following;

Merged_data<-merge(P1,y=c(P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P2,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P3,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P4,P40,P41,P42,P5,P6,P7,P8,P9),add.cell.ids = ls()[1:42],project = "Merged_data")

(※ P1,P2,,,: Seurat objects)

Merged_data<-subset(Merged_data ,subset = nFeature_RNA>200 & nFeature_RNA<5000 & nCount_RNA<30000 & percent.mt<30

Merged_data.list<-SplitObject(Merged_data, split.by = "orig.ident")

Merged_data.list <- lapply(X = Merged_data.list, FUN = function(x) { x <- NormalizeData(x) x <- FindVariableFeatures(x, verbose=FALSE) })

features <- SelectIntegrationFeatures(object.list = Merged_data.list)

Merged_data.list <- lapply(X = Merged_data.list, FUN = function(x) { x <- ScaleData(x,features=features,verbose=FALSE) x <- RunPCA(x,features=features,verbose=FALSE) })

Merged_data.anchors <- FindIntegrationAnchors(object.list = Merged_data.list,reduction="rpca",dims=1:50)

My_integrated_data <- IntegrateData(anchorset = Merged_data.anchors,dims=1:50)

My_integrated_data <- ScaleData(My_integrated_data verbose = FALSE) My_integrated_data <- RunPCA(My_integrated_data, verbose = FALSE) My_integrated_data<- FindNeighbors(My_integrated_data,reduction="pca",dims=1:30) My_integrated_data<- FindClusters(My_integrated_data,resolution=0.3) My_integrated_data<- RunUMAP(My_integrated_data, reduction="pca",dims = 1:30)


If anyone knows of a solution, I would appreciate it if you could let us know.

Thank you.

saketkc commented 5 months ago

Closing as this is not a sctransform issue. Please open an issue on the Seurat repo.