what should be the input for SingleR() automatic cell type annotation?
0
0
Entering edit mode
Yijing • 0
@d0a8eb95
Last seen 14 months ago
Germany

Hello, I am using SingleR() for automatic cell annotation and have some questions.

This is the information of my SCE object:

> as.SingleCellExperiment(dataset.all)
class: SingleCellExperiment 
dim: 13102 980 
metadata(0):
assays(2): counts logcounts
rownames(13102): Xkr4 Sox17 ... Mamdc2 Pdcd1lg2
rowData names(0):
colnames(980): AAACGCTGTAATCAGA-1_1 AAAGGATCACGTAACT-1_1 ...
  TTTGATCAGTGCCCGT-1_2 TTTGATCGTGTCTCCT-1_2
colData names(15): orig.ident nCount_RNA ... SingleR.labels ident
reducedDimNames(2): PCA UMAP
mainExpName: SCT
altExpNames(1): RNA

And then I run SingleR:

prediction <- SingleR(test = as.SingleCellExperiment(dataset.all),
                   ref = ref,
                   labels = ref$label.main)

I am not sure if I am doing the right way or not. Because on the SingleR tutorial, they used the SCE object hESCs, and they used counts for running SingleR:

> hESCs
class: SingleCellExperiment 
dim: 18538 100 
metadata(0):
assays(1): counts
rownames(18538): WASH7P_p1 LINC01002_loc4 ... IL9R_loc1 DDX11L16_loc1
rowData names(0):
colnames(100): 1772122_301_C02 1772122_180_E05 ... 1772122_298_F09 1772122_302_A11
colData names(3): Cell_ID Cell_type Timepoint
reducedDimNames(0):
mainExpName: NULL
altExpNames(0):

I also saw some tutorial doing like this:

dataset.all_counts <- GetAssayData(dataset.all, slot = "counts")
results <- SingleR(test = dataset.all_counts,
                       ref = ref,
                       labels = ref$label.main)

So my questions are:

  1. For my code, did I run SingleR with counts or logcounts?
  2. Should I use counts or logcounts? And what are the differences?

Many thanks!

SingleR • 814 views
ADD COMMENT

Login before adding your answer.

Traffic: 515 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6