Hello!
Singler is wonderful, and I appreciate the ability to autoannotate cells. However, the Immgen reference is overly complex; the main dataset does not include all of the differences I need to look for, while the immgen fine dataset consists of a lot of repeating labels.
For example: the immgen.fine data labels include annotations for the following:
"T cells (T.4NVE)", "T cells (T.4NVE44-49D-11A-)", "T cells (T.4Nve)"),
Which for my purposes, can all be clumped into the group "T cells (T.4Nve)".
I cannot wrap my brain around how to condense these labels immgen is applying onto my sce data in a meaningful way, and then applying it to my data.
Of course, a tribble:
ann2 <- ann_fine
ann2 <- tribble(
~label.main, ~label.fine,
"CD4 Naive", c("T cells (T.4NVE)", "T cells (T.4NVE44-49D-11A-)", "T cells (T.4Nve)"))
immgen.tc <- SingleR(test = sce, ref = immgen.tc, assay.type.test=1,
labels = manual$label.fine)
## Filter based on manual new annotation
immgen.tc <- immgen[, immgen$label.fine %in% manual$label.fine]
## Append new label
immgen.tc$label.manual <- manual.vec[immgen.tc$label.fine]
Does not seem to work, as I recieve the following error:
Error in FUN(X[[i]], ...) :
failed to convert data.frame into a numeric matrix
Any ideas as to what to do?
Thank you!

Just an update for posterity: i sorted it out!
Long story short, after pruning cells I did the following:
Was it efficient? no, probably not. but it worked!