Vivianstats / scDesign

A statistical simulator for rational scRNA-seq experimental design
https://academic.oup.com/bioinformatics/article/35/14/i41/5529133
11 stars 4 forks source link

Error in design_data() with more than one group #2

Closed duoa closed 4 years ago

duoa commented 4 years ago

Dear developers, I tried using your package for simulating some datasets and run into an error. It seems there's an error using the design_data() function with group > 3. Any idea what causes the problem ?

Best regards and thanks for the great work!

Here's the snippet, coming from your vignette: `> library(scDesign) Loading required package: parallel Loading required package: ggplot2

realcount1 = readRDS(system.file("extdata", "astrocytes.rds", package = "scDesign")) simdata = design_data(realcount = realcount1, S = 1e4, ncell = 1000, ngroup = 3,

  • pUp = 0.009, pDown = 0.003, fU = 3, fL = 1.5, ncores = 1) [1] "estimate expression parameters" Error in matrix(0, ncol = Js[cc], nrow = ngenes) : invalid 'ncol' value (too large or NA) sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS: /opt/R/3.6.1/lib64/R/lib/libRblas.so LAPACK: /opt/R/3.6.1/lib64/R/lib/libRlapack.so

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

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

other attached packages: [1] scDesign_1.0.0 ggplot2_3.2.1

loaded via a namespace (and not attached): [1] Rcpp_1.0.3 plyr_1.8.5 pillar_1.4.3 compiler_3.6.1 GenomeInfoDb_1.22.0
[6] XVector_0.26.0 bitops_1.0-6 tools_3.6.1 zlibbioc_1.32.0 SingleCellExperiment_1.8.0 [11] lattice_0.20-38 lifecycle_0.1.0 tibble_2.1.3 gtable_0.3.0 pkgconfig_2.0.3
[16] rlang_0.4.4 Matrix_1.2-17 DelayedArray_0.12.0 rstudioapi_0.10 gridExtra_2.3
[21] GenomeInfoDbData_1.2.2 stringr_1.4.0 withr_2.1.2 dplyr_0.8.4 vctrs_0.2.2
[26] S4Vectors_0.24.0 IRanges_2.20.1 stats4_3.6.1 grid_3.6.1 tidyselect_1.0.0
[31] data.table_1.12.8 glue_1.3.1 Biobase_2.46.0 R6_2.4.1 BiocParallel_1.20.0
[36] tidyr_1.0.2 reshape2_1.4.3 purrr_0.3.3 magrittr_1.5 matrixStats_0.55.0
[41] scales_1.1.0 BiocGenerics_0.32.0 GenomicRanges_1.38.0 abind_1.4-5 assertthat_0.2.1
[46] SummarizedExperiment_1.16.1 MAST_1.12.0 colorspace_1.4-1 stringi_1.4.5 RCurl_1.95-4.12
[51] lazyeval_0.2.2 munsell_0.5.0 crayon_1.3.4 `

Vivianstats commented 4 years ago

Hello, thanks for your interest in scImpute.

When ngroup > 1, you need to specify a vector for S and ncell. For example, if you hope that each group has 1000 cells and 1e4 reads, than use S = rep(1e4, 3), ncell = rep(1000, 3)

Hope this helps!

duoa commented 4 years ago

Many thanks for your hint!