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

Bug report: Error in data2set(X, Xcat, n_neighbors, metrics, nn_method, n_trees, search_k, : Block 1 has zero size #4

Open
JohannesGawron opened this issue Mar 8, 2024 · 1 comment

Comments

@JohannesGawron
Copy link

Trying to run the function scROSHI returned the error mesage in the title.

Here's the code that I ran:

scROSHI(sce_data = sce,
        celltype_lists = marker_list,
        type_config = config,
        gene_symbol = 'X',
        count_data = 'dsb_no_iso',
        verbose = 1
        )

and my singleCellExperiment object looks like this:

class: SingleCellExperiment 
dim: 45 3769 
metadata(2): libraryName assayMetadata
assays(5): counts clrc clrb dsb dsb_no_iso
rownames: NULL
rowData names(1): X
colnames: NULL
colData names(2): Sample barcodes
reducedDimNames(0):
mainExpName: NULL
altExpNames(0):
sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.3.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Zurich
tzcode source: internal

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

other attached packages:
 [1] scROSHI_1.0.0.0             umap_0.2.10.0               SingleCellExperiment_1.22.0 SummarizedExperiment_1.30.2 Biobase_2.60.0              GenomicRanges_1.52.1        GenomeInfoDb_1.36.4        
 [8] IRanges_2.34.1              S4Vectors_0.38.2            BiocGenerics_0.46.0         MatrixGenerics_1.12.3       matrixStats_1.2.0           rhdf5_2.44.0                lubridate_1.9.3            
[15] forcats_1.0.0               stringr_1.5.1               dplyr_1.1.4                 purrr_1.0.2                 readr_2.1.5                 tidyr_1.3.1                 tibble_3.2.1               
[22] ggplot2_3.5.0               tidyverse_2.0.0             Rcpp_1.0.12                

loaded via a namespace (and not attached):
  [1] RColorBrewer_1.1-3      rstudioapi_0.15.0       jsonlite_1.8.8          magrittr_2.0.3          spatstat.utils_3.0-4    farver_2.1.1            rmarkdown_2.26          zlibbioc_1.46.0         vctrs_0.6.5            
 [10] ROCR_1.0-11             spatstat.explore_3.2-6  RCurl_1.98-1.14         askpass_1.2.0           htmltools_0.5.7         S4Arrays_1.0.6          Rhdf5lib_1.22.1         sctransform_0.4.1       parallelly_1.37.1      
 [19] KernSmooth_2.23-21      htmlwidgets_1.6.4       ica_1.0-3               plyr_1.8.9              plotly_4.10.4           zoo_1.8-12              igraph_2.0.2            mime_0.12               lifecycle_1.0.4        
 [28] pkgconfig_2.0.3         Matrix_1.6-5            R6_2.5.1                fastmap_1.1.1           GenomeInfoDbData_1.2.10 fitdistrplus_1.1-11     future_1.33.1           shiny_1.8.0             digest_0.6.34          
 [37] colorspace_2.1-0        patchwork_1.2.0         tensor_1.5              Seurat_5.0.2            RSpectra_0.16-1         irlba_2.3.5.1           pkgload_1.3.4           labeling_0.4.3          progressr_0.14.0       
 [46] spatstat.sparse_3.0-3   fansi_1.0.6             timechange_0.3.0        polyclip_1.10-6         httr_1.4.7              abind_1.4-5             compiler_4.3.1          bit64_4.0.5             withr_3.0.0            
 [55] fastDummies_1.7.3       MASS_7.3-60             openssl_2.1.1           DelayedArray_0.26.7     tools_4.3.1             lmtest_0.9-40           httpuv_1.6.14           future.apply_1.11.1     goftest_1.2-3          
 [64] glue_1.7.0              nlme_3.1-162            rhdf5filters_1.12.1     promises_1.2.1          grid_4.3.1              Rtsne_0.17              reshape2_1.4.4          cluster_2.1.4           generics_0.1.3         
 [73] spatstat.data_3.0-4     gtable_0.3.4            tzdb_0.4.0              data.table_1.15.2       hms_1.1.3               sp_2.1-3                utf8_1.2.4              XVector_0.40.0          spatstat.geom_3.2-9    
 [82] RcppAnnoy_0.0.22        ggrepel_0.9.5           RANN_2.6.1              pillar_1.9.0            spam_2.10-0             RcppHNSW_0.6.0          vroom_1.6.5             limma_3.56.2            later_1.3.2            
 [91] splines_4.3.1           lattice_0.21-8          deldir_2.0-4            survival_3.5-5          FNN_1.1.4               bit_4.0.5               tidyselect_1.2.0        miniUI_0.1.1.1          pbapply_1.7-2          
[100] knitr_1.45              gridExtra_2.3           scattermore_1.2         xfun_0.42               stringi_1.8.3           lazyeval_0.2.2          yaml_2.3.8              evaluate_0.23           codetools_0.2-19       
[109] cli_3.6.2               uwot_0.1.16             xtable_1.8-4            reticulate_1.35.0       munsell_0.5.0           spatstat.random_3.2-3   globals_0.16.2          png_0.1-8               parallel_4.3.1         
[118] ellipsis_0.3.2          dotCall64_1.1-1         bitops_1.0-7            listenv_0.9.1           viridisLite_0.4.2       scales_1.3.0            ggridges_0.5.6          SeuratObject_5.0.1      leiden_0.4.3.1         
[127] crayon_1.5.2            rlang_1.1.3             cowplot_1.1.3 
@JohannesGawron
Copy link
Author

Apparently, the input singleCellExperiment object is required to have specified dimnames and the rows should be named in the same way as the gene names used in the celltype_list. Otherwise, an empty matrix is passed to uwot::umap as X argument.

I think it would make the package more user friendly to state this explicitly somewhere in the documentation, and also to have a more verbose error output. Thanks a lot in advance for considering making adaptations.

Best,

Johannes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant