I'm trying to use SingleR to annotate UMAP plots in Seurat. I've been following this very helpful tutorial here (http://bioconductor.org/books/devel/SingleRBook/pancreas-case-study.html) and I see that SingleR can be used to annotate clusters in Scran but I haven't been able to figure out how to do the same thing in Seurat. Would someone be able to help me do it? I've pasted a portion of my code below to give a sense of what I want to achieve and what I have been trying.
library(Seurat) library(DropletUtils) library(SingleR) library(celldex) # Write seurat_integrated to 10X file write10xCounts(x=seurat_integrated@assays$RNA@counts, path='seurat_integrated_10 X/') # Annotate with SingleR new.data <- Read10X("seurat_integrated_10X") ref.data <- MouseRNAseqData() predictions <- SingleR(test=new.data, assay.type.test="integrated", ref=ref.data, labels=ref.data$label.main, de.method="wilcox") table(predictions$labels) # Annotate UMAP clusters seurat_integrated$celltypes <- predictions$pruned.labels DimPlot(dummy_seurat_integrated, reduction="umap", split.by="celltypes")
I've had trouble pasting it in here but in the link, there is a SingleR-labelled TSNE plot achieved using Scran. I'm trying to do the same thing, but using Seurat.