Error in SingleR, no common genes between 'test' and 'ref'
1
0
Entering edit mode
@aaf2ea74
Last seen 10 weeks ago
Wroclaw

I downloaded MairPBMCData from scRNAseq package :

sce <- MairPBMCData()

I am trying to annotate by calling SingleR() on this dataset and reference (MonacoImmuneData) dataset.

pred <- SingleR(test = sce, ref = ref, 
                labels = ref$label.main, assay.type.test="logcounts")
# Error in SingleR(test = sce, ref = ref, labels = ref$label.main, assay.type.test = "logcounts") : 
#  no common genes between 'test' and 'ref'

There's Symbol representation of genes in ref, but there's also Symbol representation of genes in test, so I'm confused

sessionInfo( )

R version 4.3.0 (2023-04-21 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build 22000)

Matrix products: default

locale: [1] LC_COLLATE=English_United Kingdom.utf8 LC_CTYPE=English_United Kingdom.utf8
[3] LC_MONETARY=English_United Kingdom.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.utf8

time zone: Europe/London tzcode source: internal

attached base packages: [1] stats4 stats graphics grDevices utils datasets methods base

other attached packages: [1] celldex_1.10.1 SingleR_2.2.0 igraph_1.4.3
[4] GGally_2.1.2 NewWave_1.10.0 scry_1.12.0
[7] scran_1.28.1 EnsDb.Hsapiens.v86_2.99.0 scater_1.28.0
[10] ggplot2_3.4.2 scuttle_1.10.1 DropletUtils_1.20.0
[13] scRNAseq_2.14.0 SingleCellExperiment_1.22.0 SummarizedExperiment_1.30.2 [16] MatrixGenerics_1.12.2 matrixStats_1.0.0 ensembldb_2.24.0
[19] AnnotationFilter_1.24.0 GenomicFeatures_1.52.0 AnnotationDbi_1.62.1
[22] Biobase_2.60.0 GenomicRanges_1.52.0 GenomeInfoDb_1.36.0
[25] IRanges_2.34.0 S4Vectors_0.38.1 BiocGenerics_0.46.0

loaded via a namespace (and not attached): [1] later_1.3.1 BiocIO_1.10.0 bitops_1.0-7
[4] filelock_1.0.2 tibble_3.2.1 R.oo_1.25.0
[7] XML_3.99-0.14 lifecycle_1.0.3 edgeR_3.42.4
[10] lattice_0.21-8 MASS_7.3-58.4 magrittr_2.0.3
[13] limma_3.56.2 yaml_2.3.7 remotes_2.4.2
[16] metapod_1.8.0 httpuv_1.6.11 cowplot_1.1.1
[19] DBI_1.1.3 RColorBrewer_1.1-3 zlibbioc_1.46.0
[22] Rtsne_0.16 purrr_1.0.1 R.utils_2.12.2
[25] RCurl_1.98-1.12 rappdirs_0.3.3 GenomeInfoDbData_1.2.10
[28] ggrepel_0.9.3 irlba_2.3.5.1 pheatmap_1.0.12
[31] dqrng_0.3.0 DelayedMatrixStats_1.22.1 codetools_0.2-19
[34] DelayedArray_0.26.3 xml2_1.3.4 tidyselect_1.2.0
[37] farver_2.1.1 ScaledMatrix_1.8.1 viridis_0.6.3
[40] BiocFileCache_2.8.0 GenomicAlignments_1.36.0 BiocNeighbors_1.18.0
[43] ellipsis_0.3.2 tools_4.3.0 progress_1.2.2
[46] sna_2.7-1 Rcpp_1.0.10 glue_1.6.2
[49] gridExtra_2.3 usethis_2.2.0 dplyr_1.1.2
[52] HDF5Array_1.28.1 withr_2.5.0 BiocManager_1.30.21
[55] fastmap_1.1.1 rhdf5filters_1.12.1 bluster_1.10.0
[58] fansi_1.0.4 digest_0.6.31 rsvd_1.0.5
[61] R6_2.5.1 mime_0.12 colorspace_2.1-0
[64] biomaRt_2.56.1 RSQLite_2.3.1 R.methodsS3_1.8.2
[67] utf8_1.2.3 generics_0.1.3 rtracklayer_1.60.0
[70] prettyunits_1.1.1 httr_1.4.6 S4Arrays_1.0.4
[73] pkgconfig_2.0.3 gtable_0.3.3 blob_1.2.4
[76] XVector_0.40.0 htmltools_0.5.5 ProtGenerics_1.32.0
[79] scales_1.2.1 png_0.1-8 rstudioapi_0.14
[82] rjson_0.2.21 coda_0.19-4 statnet.common_4.9.0
[85] curl_5.0.1 cachem_1.0.8 rhdf5_2.44.0
[88] stringr_1.5.0 BiocVersion_3.17.1 parallel_4.3.0
[91] vipor_0.4.5 restfulr_0.0.15 pillar_1.9.0
[94] grid_4.3.0 reshape_0.8.9 vctrs_0.6.2
[97] promises_1.2.0.1 glmpca_0.2.0 BiocSingular_1.16.0
[100] dbplyr_2.3.2 beachmat_2.16.0 xtable_1.8-4
[103] cluster_2.1.4 beeswarm_0.4.0 cli_3.6.1
[106] locfit_1.5-9.8 compiler_4.3.0 Rsamtools_2.16.0
[109] rlang_1.1.1 crayon_1.5.2 intergraph_2.0-2
[112] labeling_0.4.2 plyr_1.8.8 fs_1.6.2
[115] ggbeeswarm_0.7.2 stringi_1.7.12 network_1.18.1
[118] viridisLite_0.4.2 BiocParallel_1.34.2 munsell_0.5.0
[121] Biostrings_2.68.1 lazyeval_0.2.2 SharedObject_1.14.0
[124] Matrix_1.5-4 ExperimentHub_2.8.0 hms_1.1.3
[127] sparseMatrixStats_1.12.0 bit64_4.0.5 Rhdf5lib_1.22.0
[130] KEGGREST_1.40.0 statmod_1.5.0 shiny_1.7.4
[133] interactiveDisplayBase_1.38.0 AnnotationHub_3.8.0 memoise_2.0.1
[136] bit_4.0.5

singleR SingleCellExperiment SingleCellData • 890 views
ADD COMMENT
0
Entering edit mode
ATpoint ★ 4.0k
@atpoint-13662
Last seen 20 hours ago
Germany

The error message is clear. There are no genes in common. Typically the annotation packages use Ensembl gene IDs, and apparently your dataset has something else. You have to match that. If you have gene symbols then you have to convert that. There is many threads online on how to e.g. use biomaRt to get conversion tables between gene ID and gene name, or you can use a GTF file which contains both, e.g. from GENCODE or Ensembl.

ADD COMMENT
0
Entering edit mode

I renamed rownames from RefSeq format to Symbol format, it worked because there was gene accessors in Symbol format in ref. Thank you for your help!

ADD REPLY

Login before adding your answer.

Traffic: 603 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