Coolgenome / iTALK

55 stars 20 forks source link

Error in `[.Seurat`(data, data$cell_type == i, ) : Incorrect number of logical values provided to subset features #24

Open EAC-T opened 3 years ago

EAC-T commented 3 years ago

Hi, I have a SEURAT object that I clustered into 7 clusters, for the highly_exprs_genes<-rawParse(Tcells_6,top_genes=50,stats='mean')

I'm getting an error: Error in [.Seurat(data, data$cell_type == i, ) : Incorrect number of logical values provided to subset features

The cell_type column contains numbers from 0 to 6 representing each cluster.

Thank you

chase-pagani commented 3 years ago

Having the same issue.

chase-pagani commented 3 years ago

try this:

data<-data.frame(SEURATOBJECT@assays$RNA@data) data<-t(data) data<-as.data.frame(data) cell_types<-SEURATOBJECT@active.ident #or wherever you have your cell names data$cell_type=cell_types