sulab-wmu / scPagwas

Obtain trait-relevant cell subpopulations by incorporating pathway activity transformed scRNA-seq data with GWAS data
Other
33 stars 10 forks source link

‘BioClassification’ not found in this Seurat object (Data input tutorial) #27

Open mrivher opened 7 months ago

mrivher commented 7 months ago

I have been following this script (Introduction to Data Input and Preprocessing in scPagwas.Rmd to learn how to input data into scPagwas. I downloaded the specified dataset [GSE115978] that would be the input for scRNA-seq. However, these are FACS data and the BioClassification annotation cannot be found to be further processed into the program.

library(Seurat) library(SeuratObject) counts <- read.csv("GSE115978_counts.csv.gz",row.names=1) Anno<- read.csv("GSE115978_cell.annotations.csv.gz")

create the SeuratObject

Single_data<-Seurat::CreateSeuratObject(

  • counts,
  • assay = "RNA",
  • meta.data=Anno
  • ) Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-') Warning: Data is of class data.frame. Coercing to dgCMatrix.

Idents(Single_data)<-Single_data$BioClassification Error in x[[i, drop = TRUE]]: ! ‘BioClassification’ not found in this Seurat object

Run rlang::last_trace() to see where the error occurred.

Backtrace: ▆

  1. ├─Single_data$BioClassification
  2. └─SeuratObject:::$.Seurat(Single_data, BioClassification)
  3. ├─x[[i, drop = TRUE]]
  4. └─SeuratObject:::[[.Seurat(x, i, drop = TRUE)
dengchunyu commented 5 months ago

The author of the data changed the column name of the comment, and here I have modified the document, change the BioClassification to cell.types