Hello !
When using seurat to get an object with different clusters of a specific cell type, let's say t cells, I'm looking for ways to automatically annotate them, so it can tell me which one are cd4, which are cd8, which are memory etc.
I've been told to use azimuth, however from seurat I didn't manage to get the appropriate input data. Same for the SingleR package, which requires a numeric matrix of single-cell expression values where rows are genes and columns are cells.
In either case, I struggle to get the appropriate data from my seurat object to run these.
Can anybody help ?
Thank you
4 answers
SingleR basically takes normalized cell expression (expression values of all genes in each individual cell) as input
Step 1. Fetch reference annotation dataset from the Human Primary Cell Atlas (using celldex package)
ref <- celldex::HumanPrimaryCellAtlasData()
Step 2. Extract count data from the filtered Seurat object i.e. normalized cell expression
dta_counts <- GetAssayData(dta.seurat.filtered, slot = 'counts')
Step 3. Perform cell type annotation using SingleR by comparing test data to the reference dataset, assigning labels based on similarity
annotation <- SingleR(test = dta_counts,
ref = ref,
labels = ref$label.main)
Hope it helps!
- In order to run Azimuth:
AzimuthClusters <- RunAzimuth(seurat_obj, reference = "pbmcref")
- singleR
surveyReferences() # it lists all available references
ref <- fetchReference("monaco_immune", "2024-02-26")
seurat_dex <- as.SingleCellExperiment(seurat_obj)
predMainMonaco <- SingleR(test = seurat_dex, ref = ref, labels = ref$label.main, BPPARAM = BiocParallel::SerialParam())
Hope it helps
Perhaps you have tried this, but I used the Seurat function as.SingleCellExperiment() and this creates an object compatible with SingleR. DietSeurat() can be used to trim down the object to include only the features you want, just look up its documentation for more info.
Download your reference set from celldex for annotation
ref <- HumanPrimaryCellAtlasData(ensembl = TRUE)
Then create your SingleCellExperiment object
sce <- as.SingleCellExperiment(DietSeurat(seurat_obj))
Then you can perform your annotation
human.main <- SingleR(test = sce,assay.type.test = 1,ref = ref,labels = ref$label.main)
This resource might be helpful, it goes into using SingleR in more depth.
Perhaps you can try this tool: https://omnibusx.com/prediction
Log in to answer this question.