I downloaded seurat data from vignette: "https://satijalab.org/seurat/articles/conversion_vignette.html"
pbmc.sce < - as.SingleCellExperiment(pbmc)
I am trying to annotate by calling SingleR() on this dataset and reference (HumanPrimaryCellAtlasData) dataset.
ref.data <- HumanPrimaryCellAtlasData(ensembl=TRUE)
predictions <- SingleR(test=pbmc.sce, assay.type.test=1, ref=ref.data, labels=ref.data$label.main)
Error in SingleR(test = pbmc.sce, assay.type.test = 1, ref = ref.data, : no common genes between 'test' and 'ref'
I chacked row names are different. For pbmc.sce row names are gene symbol and for ref.data Ensembl gene ID. Does anyone have any suggestions?
sessionInfo()
R version 4.1.0 (2021-05-18) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] org.Hs.eg.db_3.13.0 pbmc3k.SeuratData_3.1.4 SeuratData_0.2.1 SeuratDisk_0.0.0.9019
[5] loomR_0.2.1.9000 hdf5r_1.3.3 R6_2.5.0 cowplot_1.1.1
[9] EnsDb.Hsapiens.v86_2.99.0 ensembldb_2.17.0 AnnotationFilter_1.17.0 GenomicFeatures_1.45.0
[13] AnnotationDbi_1.55.0 DropletUtils_1.13.1 DropletTestFiles_1.3.0 SingleR_1.7.0
[17] scRNAseq_2.7.1 celldex_1.3.0 uwot_0.1.10 scran_1.20.1
[21] scater_1.21.0 scuttle_1.3.0 SingleCellExperiment_1.15.1 SummarizedExperiment_1.23.0
[25] Biobase_2.53.0 GenomicRanges_1.45.0 GenomeInfoDb_1.29.0 IRanges_2.27.0
[29] S4Vectors_0.31.0 BiocGenerics_0.39.0 MatrixGenerics_1.5.0 matrixStats_0.59.0
[33] patchwork_1.1.1 SeuratObject_4.0.2 Seurat_4.0.3 dplyr_1.0.7
[37] ggplot2_3.3.4 devtools_2.4.2 usethis_2.0.1 Matrix_1.3-3
Thank you for your comment. I tried to change gene symbol to Ensembl gene ID applying this command:
I got the following error massage: