Irrationone / cellassign

Automated, probabilistic assignment of cell types in scRNA-seq data
Other
191 stars 79 forks source link

Error in cellassign(exprs_obj = sc_expriment, marker_gene_info = marker_gene_tab, : nrow(rho) == G is not TRUE #44

Closed jingxiao-chen closed 4 years ago

jingxiao-chen commented 4 years ago

Hi,

I am trying to assign cell types with cellassign but it kept giving me such error message.

> fit <- cellassign(exprs_obj = sc_expriment, 
+                   marker_gene_info = marker_gene_tab, 
+                   s = s, 
+                   learning_rate = 1e-2, 
+                   shrinkage = TRUE,
+                   verbose = FALSE)

Error in cellassign(exprs_obj = sc_expriment, marker_gene_info = marker_gene_tab, : nrow(rho) == G is not TRUE

Genes with no mapping counts are present. Make sure this is expected -- this can be valid input in some cases (e.g. when cell types are overspecified). You have specified 18933 input genes. Are you sure these are just your markers? Only the marker genes should be used as inputError in cellassign(exprs_obj = sc_expriment, marker_gene_info = marker_gene_tab,  : 
  nrow(rho) == G is not TRUE

I tried to debug myself by running it line by line and I found that function extract_expression_matrix is not included in the package. Is this introduced by my installation?

My session info is also attached.

sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin18.6.0 (64-bit)
Running under: macOS Mojave 10.14.5

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/
Versions/A/libBLAS.dylib
LAPACK: /usr/local/Cellar/openblas/0.3.7/lib/libopenblasp-r0.3.7.dylib

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

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

other attached packages:
 [1] scran_1.12.1                cellassign_0.99.11          SingleCellExperiment_1.6.0 
 [4] SummarizedExperiment_1.14.1 DelayedArray_0.10.0         BiocParallel_1.18.1        
 [7] matrixStats_0.55.0          Biobase_2.44.0              GenomicRanges_1.36.1       
[10] GenomeInfoDb_1.20.0         IRanges_2.18.2              S4Vectors_0.22.1           
[13] BiocGenerics_0.30.0        

loaded via a namespace (and not attached):
 [1] bitops_1.0-6             fs_1.3.1                 usethis_1.5.1           
 [4] devtools_2.2.0           rprojroot_1.3-2          dynamicTreeCut_1.63-1   
 [7] tools_3.6.1              backports_1.1.4          R6_2.4.0                
[10] irlba_2.3.3              DT_0.9                   vipor_0.4.5             
[13] lazyeval_0.2.2           colorspace_1.4-1         withr_2.1.2             
[16] tidyselect_0.2.5         gridExtra_2.3            prettyunits_1.0.2       
[19] processx_3.4.1           curl_4.1                 compiler_3.6.1          
[22] cli_1.1.0                BiocNeighbors_1.2.0      desc_1.2.0              
[25] scales_1.0.0             callr_3.3.2              tfruns_1.4              
[28] digest_0.6.21            XVector_0.24.0           base64enc_0.1-3         
[31] scater_1.12.2            pkgconfig_2.0.3          htmltools_0.3.6         
[34] sessioninfo_1.1.1        limma_3.40.6             htmlwidgets_1.3         
[37] rlang_0.4.0              rstudioapi_0.10          DelayedMatrixStats_1.6.1
[40] jsonlite_1.6             tensorflow_1.14.0        dplyr_0.8.3             
[43] RCurl_1.95-4.12          magrittr_1.5             BiocSingular_1.0.0      
[46] GenomeInfoDbData_1.2.1   Matrix_1.2-17            Rcpp_1.0.2              
[49] ggbeeswarm_0.6.0         munsell_0.5.0            reticulate_1.13         
[52] viridis_0.5.1            whisker_0.4              edgeR_3.26.8            
[55] zlibbioc_1.30.0          pkgbuild_1.0.5           grid_3.6.1              
[58] dqrng_0.2.1              crayon_1.3.4             lattice_0.20-38         
[61] locfit_1.5-9.1           knitr_1.25               ps_1.3.0                
[64] pillar_1.4.2             igraph_1.2.4.1           pkgload_1.0.2           
[67] glue_1.3.1               remotes_2.1.0            BiocManager_1.30.4      
[70] testthat_2.2.1           gtable_0.3.0             purrr_0.3.2             
[73] assertthat_0.2.1         ggplot2_3.2.1            xfun_0.9                
[76] rsvd_1.0.2               viridisLite_0.3.0        tibble_2.1.3            
[79] beeswarm_0.2.3           memoise_1.1.0            statmod_1.4.32          
[82] ellipsis_0.3.0  
kieranrcampbell commented 4 years ago

Hi @jchen032294

Are you ensuring that sc_expriment contains only marker genes? (and that the rows (if SingleCellExperiment) or columns (if count matrix) match the marker genes in marker_gene_tab)