Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with dotplot due to "duplicate row.names" in seurat object even though they are unique #8772

Open
HOEFSLE opened this issue Apr 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@HOEFSLE
Copy link

HOEFSLE commented Apr 14, 2024

Hi,
I'm running into an issue displaying a dotplot with my data. According to the error message there are duplicate rownames in my data. However, when check for it my rownames (barcodes as well as features) appear to be unique. Weirdly I can run VlnPlot on the same object and vlnplot behaves as expected.

Thanks and best regards

any(duplicated(rownames(seu_obj.integrated)))
[1] FALSE
> any(duplicated(stringr::str_split_fixed(Cells(seu_obj.integrated),'_',1)))
[1] FALSE
> DotPlot(seu_obj.integrated,features= df$ensembl_gene_id, group.by = "cell_ontology",split.by = "cohort")
Error in `.rowNamesDF<-`(x, value = value) : 
  duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique values when setting 'row.names':

 VlnPlot(seu_obj.integrated,features=df$ensembl_gene_id,group.by ="cell_ontology",split.plot = TRUE,split.by = "cohort")


sessionInfo()
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)

Matrix products: default

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

time zone: Europe/Berlin
tzcode source: internal

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

other attached packages:
[1] ggthemes_5.0.0 ggplot2_3.4.4 dplyr_1.1.3 Seurat_5.0.1
[5] SeuratObject_5.0.1 sp_2.1-0

loaded via a namespace (and not attached):
[1] RColorBrewer_1.1-3 jsonlite_1.8.7 magrittr_2.0.3
[4] ggbeeswarm_0.7.2 spatstat.utils_3.0-3 farver_2.1.1
[7] zlibbioc_1.46.0 vctrs_0.6.3 ROCR_1.0-11
[10] memoise_2.0.1 spatstat.explore_3.2-3 RCurl_1.98-1.12
[13] progress_1.2.2 htmltools_0.5.7 curl_5.1.0
[16] sctransform_0.4.1 parallelly_1.36.0 KernSmooth_2.23-21
[19] htmlwidgets_1.6.3 ica_1.0-3 plyr_1.8.9
[22] plotly_4.10.3 zoo_1.8-12 cachem_1.0.8
[25] igraph_1.5.1 mime_0.12 lifecycle_1.0.4
[28] pkgconfig_2.0.3 Matrix_1.6-4 R6_2.5.1
[31] fastmap_1.1.1 GenomeInfoDbData_1.2.10 fitdistrplus_1.1-11
[34] future_1.33.0 shiny_1.8.0 digest_0.6.33
[37] colorspace_2.1-0 patchwork_1.1.3 AnnotationDbi_1.62.2
[40] S4Vectors_0.38.1 tensor_1.5 RSpectra_0.16-1
[43] irlba_2.3.5.1 RSQLite_2.3.3 labeling_0.4.3
[46] filelock_1.0.2 progressr_0.14.0 fansi_1.0.5
[49] spatstat.sparse_3.0-2 httr_1.4.7 polyclip_1.10-6
[52] abind_1.4-5 compiler_4.3.1 withr_2.5.2
[55] bit64_4.0.5 DBI_1.1.3 fastDummies_1.7.3
[58] biomaRt_2.56.1 MASS_7.3-60 rappdirs_0.3.3
[61] tools_4.3.1 vipor_0.4.5 lmtest_0.9-40
[64] beeswarm_0.4.0 httpuv_1.6.11 future.apply_1.11.0
[67] goftest_1.2-3 glue_1.6.2 nlme_3.1-162
[70] promises_1.2.1 grid_4.3.1 Rtsne_0.16
[73] cluster_2.1.4 reshape2_1.4.4 generics_0.1.3
[76] gtable_0.3.4 spatstat.data_3.0-3 tidyr_1.3.0
[79] hms_1.1.3 data.table_1.14.8 xml2_1.3.5
[82] XVector_0.40.0 utf8_1.2.4 BiocGenerics_0.46.0
[85] spatstat.geom_3.2-5 RcppAnnoy_0.0.21 ggrepel_0.9.4
[88] RANN_2.6.1 pillar_1.9.0 stringr_1.5.1
[91] spam_2.10-0 RcppHNSW_0.5.0 later_1.3.1
[94] splines_4.3.1 BiocFileCache_2.8.0 lattice_0.21-8
[97] survival_3.5-5 bit_4.0.5 deldir_1.0-9
[100] httpgd_1.3.1 tidyselect_1.2.0 Biostrings_2.68.1
[103] miniUI_0.1.1.1 pbapply_1.7-2 gridExtra_2.3
[106] IRanges_2.34.1 scattermore_1.2 stats4_4.3.1
[109] Biobase_2.60.0 matrixStats_1.0.0 stringi_1.7.12
[112] lazyeval_0.2.2 codetools_0.2-19 tibble_3.2.1
[115] cli_3.6.1 uwot_0.1.16 systemfonts_1.0.5
[118] xtable_1.8-4 reticulate_1.34.0 munsell_0.5.0
[121] GenomeInfoDb_1.36.4 Rcpp_1.0.11 globals_0.16.2
[124] spatstat.random_3.1-6 dbplyr_2.3.0 png_0.1-8
[127] ggrastr_1.0.2 XML_3.99-0.16 parallel_4.3.1
[130] ellipsis_0.3.2 assertthat_0.2.1 blob_1.2.4
[133] prettyunits_1.2.0 dotCall64_1.1-1 bitops_1.0-7
[136] listenv_0.9.0 viridisLite_0.4.2 scales_1.3.0
[139] ggridges_0.5.4 crayon_1.5.2 leiden_0.4.3.1
[142] purrr_1.0.2 rlang_1.1.1 cowplot_1.1.1
[145] KEGGREST_1.40.1

@HOEFSLE HOEFSLE added the bug Something isn't working label Apr 14, 2024
@igrabski
Copy link
Contributor

Hi, can you double-check if colnames(seu_obj.integrated) has any duplicates, as well as whether there are duplicates in df$ensembl_gene_id?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants