Closed mkim0327 closed 1 year ago
Ideally, you would want to supply a list of lists where the markers for each pairwise comparison are noted, i.e. markers$acinar$alpha
would contain the names of the genes that are up in acinar cells compared to alpha cells (in the pancreas). You can find more details in Section 3.3 of the SingleR book: http://bioconductor.org/books/devel/SingleRBook/more-markers.html#defining-custom-markers
There, you can see how to generate the list of lists using scran
(instead of Seurat's findMarkers()
)
library(scran)
out <- pairwiseBinom(counts(sceM), sceM$label, direction="up")
markers <- getTopMarkers(out$statistics, out$pairs, n=10)
# Upregulated in acinar compared to alpha:
markers$acinar$alpha
# supply this list of markers ti SingleR() via genes=
pred.grun2b <- SingleR(test=sceG, ref=sceM, labels=sceM$label, genes=markers)
If you read further along in that section, you will also find an explanation/code example of how to do the prediction with a simpler list of marker genes of cell types (which is not recommended).
Hello!
I have a table of gene name, pval, avg_logFC, and labels (output from Seurat FindConservedMarkers) and I was wondering if I can use this for trainSingleR?
Thank you so much in advance!