hemberg-lab / SC3

A tool for the unsupervised clustering of cells from single cell RNA-Seq experiments
http://bioconductor.org/packages/SC3
GNU General Public License v3.0
118 stars 55 forks source link

No gene names in export results #87

Open dsimps1993 opened 5 years ago

dsimps1993 commented 5 years ago

Hi there,

In an older version of SC3, when I ran sc3_export_results_xls(), and I would open the "genes" tab in the excel file, and it would have a list of genes next to the SC3 information (gene filter, cluster etc). Now the gene names aren't appearing and are just numbers. Can I assume that the gene names are in the same order as they are in the expression matrix of the SC3/SCE object? Can it be changed back to the way it was before where gene names are already there in the exported excel file? It would be really useful to have the gene names in the excel file.

Thank you,

Daniel

wikiselev commented 5 years ago

Hi Daniel, we haven't really changed anything in SC3 in the last ~2 years, so not sure what has happened. Did you manage to solve this problem?

dsimps1993 commented 5 years ago

I think I ended up just copy and pasting the genenames from rowdata and assumed that SC3 doesn't change the order. This change was something I noticed over a year ago, maybe even two years go. I only emailed about it recently because I noticed it hadn't been fixed and wondered if you knew anything about it.

Cheers,

Dan

pabloivan commented 3 years ago

I confirm having the same issue. Even though I include the gene names as my rownames in the aggregated object used to construct the SingleCellExperiment container, as follows:

sceObj <- SingleCellExperiment( assays = list( counts = as.matrix(aggregated), logcounts = log2(as.matrix(aggregated) + 1) ), colData = data.frame(row.names = colnames(aggregated), cell_type=as.factor(c(rep("group1", 24), rep("group2", 23)))) )

This is the result of my sessionInfo()

``R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 14.04.1 LTS

Matrix products: default BLAS: /usr/lib/libblas/libblas.so.3.0 LAPACK: /usr/lib/lapack/liblapack.so.3.0

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=pt_BR.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=pt_BR.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=pt_BR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=pt_BR.UTF-8 LC_IDENTIFICATION=C

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

other attached packages: [1] shiny_1.5.0 scater_1.6.3
[3] BiocInstaller_1.28.0 SingleCellExperiment_1.0.0 [5] reshape2_1.4.4 Matrix.utils_0.9.8
[7] MAST_1.4.1 SummarizedExperiment_1.8.1 [9] DelayedArray_0.4.1 matrixStats_0.56.0
[11] Biobase_2.38.0 GenomicRanges_1.30.3
[13] GenomeInfoDb_1.14.0 IRanges_2.12.0
[15] S4Vectors_0.16.0 BiocGenerics_0.24.0
[17] stringr_1.4.0 biomaRt_2.34.2
[19] sctransform_0.2.1 Matrix_1.2-18
[21] dplyr_1.0.2 ggplot2_3.3.2
[23] Seurat_3.2.0 readr_1.3.1
[25] SC3_1.7.7

loaded via a namespace (and not attached): [1] plyr_1.8.6 igraph_1.2.5 lazyeval_0.2.2
[4] shinydashboard_0.7.1 splines_3.4.4 listenv_0.8.0
[7] digest_0.6.25 foreach_1.5.0 htmltools_0.5.0
[10] viridis_0.5.1 gdata_2.18.0 memoise_1.1.0
[13] magrittr_1.5 tensor_1.5 cluster_2.1.0
[16] doParallel_1.0.15 ROCR_1.0-7 limma_3.34.9
[19] globals_0.12.5 prettyunits_1.1.1 colorspace_1.4-1
[22] blob_1.2.1 rappdirs_0.3.1 rrcov_1.5-5
[25] ggrepel_0.8.2 WriteXLS_5.0.0 tximport_1.6.0
[28] crayon_1.3.4 RCurl_1.98-1.2 jsonlite_1.7.0
[31] spatstat_1.64-1 spatstat.data_1.4-3 survival_3.2-3
[34] zoo_1.8-8 iterators_1.0.12 ape_5.4-1
[37] glue_1.4.2 polyclip_1.10-0 gtable_0.3.0
[40] zlibbioc_1.24.0 XVector_0.18.0 leiden_0.3.3
[43] future.apply_1.6.0 DEoptimR_1.0-8 abind_1.4-5
[46] scales_1.1.1 pheatmap_1.0.12 mvtnorm_1.0-2
[49] edgeR_3.20.9 DBI_1.1.0 rngtools_1.5
[52] miniUI_0.1.1.1 Rcpp_1.0.5 progress_1.2.2
[55] viridisLite_0.3.0 xtable_1.8-4 reticulate_1.16
[58] bit_4.0.4 rsvd_1.0.3 htmlwidgets_1.5.1
[61] httr_1.4.2 gplots_3.0.4 RColorBrewer_1.1-2
[64] ellipsis_0.3.1 ica_1.0-2 farver_2.0.3
[67] pkgconfig_2.0.3 XML_3.98-1.1 uwot_0.1.8
[70] deldir_0.1-28 locfit_1.5-9.1 labeling_0.3
[73] tidyselect_1.1.0 rlang_0.4.7 later_1.1.0.1
[76] AnnotationDbi_1.40.0 munsell_0.5.0 tools_3.4.4
[79] RSQLite_2.2.0 generics_0.0.2 ggridges_0.5.2
[82] fastmap_1.0.1 goftest_1.2-2 bit64_4.0.5
[85] fitdistrplus_1.1-1 robustbase_0.93-6 caTools_1.17.1
[88] purrr_0.3.4 RANN_2.6.1 pbapply_1.4-3
[91] future_1.18.0 nlme_3.1-149 doRNG_1.8.2
[94] mime_0.9 grr_0.9.5 compiler_3.4.4
[97] rstudioapi_0.11 beeswarm_0.2.3 plotly_4.9.2.1
[100] png_0.1-7 e1071_1.7-3 spatstat.utils_1.17-0 [103] tibble_3.0.3 pcaPP_1.9-73 stringi_1.4.6
[106] lattice_0.20-41 vctrs_0.3.4 pillar_1.4.6
[109] lifecycle_0.2.0 lmtest_0.9-37 RcppAnnoy_0.0.16
[112] data.table_1.13.0 cowplot_0.9.2 bitops_1.0-6
[115] irlba_2.3.3 httpuv_1.5.4 patchwork_1.0.1
[118] R6_2.4.1 promises_1.1.1 KernSmooth_2.23-17
[121] gridExtra_2.3 vipor_0.4.5 codetools_0.2-16
[124] MASS_7.3-52 gtools_3.8.2 rhdf5_2.22.0
[127] rjson_0.2.20 withr_2.2.0 GenomeInfoDbData_1.0.0 [130] mgcv_1.8-33 hms_0.5.3 rpart_4.1-15
[133] tidyr_1.1.2 class_7.3-17 Rtsne_0.15
[136] ggbeeswarm_0.6.0 ``

wikiselev commented 3 years ago

Sorry for a late response. Could you check whether you can see gene names when you do rownames(rowData(sceObj))? If not then you won't see them in the excel spreadsheet. Please make sure the gene names are written to your object as rownames of rowData.