hms-dbmi / scde

R package for analyzing single-cell RNA-seq data
http://pklab.med.harvard.edu/scde
Other
170 stars 64 forks source link

knn.error.models fails - compatibility problem? #46

Closed bobermayer closed 7 years ago

bobermayer commented 7 years ago

PAGODA used to work great for me, but for a few weeks now it fails when building the error models. I haven't been able to track down the issue, but I suspect some compatibility problem after an update to our R environment:

> library(scde)
> data(pollen)
> cd <- clean.counts(pollen)
> x <- gsub("^Hi_(.*)_.*", "\\1", colnames(cd))
> l2cols <- c("coral4", "olivedrab3", "skyblue2", "slateblue3")[as.integer(factor(x, levels = c("NPC", "GW16", "GW21", "GW21+3")))]
> knn <- knn.error.models(cd, k = ncol(cd)/4, n.cores = 1, min.count.threshold = 2, min.nonfailed = 5, max.model.plots = 10)
Error in FUN(X[[i]], ...) : 
  trying to get slot "logLik" from an object of a basic class ("function") with no slots
Error in FUN(X[[i]], ...) : 
  trying to get slot "logLik" from an object of a basic class ("function") with no slots
#
# ... 62 more of these ...
#
ERROR encountered in building a model for cell Hi_NPC_1 - skipping the cell. Error:
Error in FUN(X[[i]], ...) : 
  trying to get slot "logLik" from an object of a basic class ("function") with no slots
#
# ... 63 more of these ...
#
ERROR fitting of 64 out of 64 cells resulted in errors reporting remaining 0 cells
ERROR encountered during model fit plot outputs:
subscript out of bounds

any ideas? help would be greatly appreciated.

> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.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   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] scde_2.2.0      flexmix_2.3-14  lattice_0.20-35

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.11              edgeR_3.16.5              splines_3.4.0             BiocGenerics_0.20.0       MASS_7.3-47              
 [6] BiocParallel_1.8.2        rjson_0.2.15              brew_1.0-6                RcppArmadillo_0.7.900.2.0 minqa_1.2.4              
[11] distillery_1.0-2          car_2.1-4                 Rook_1.1-1                Lmoments_1.2-3            tools_3.4.0              
[16] pbkrtest_0.4-7            nnet_7.3-12               parallel_3.4.0            RMTstat_0.3               grid_3.4.0               
[21] Biobase_2.34.0            nlme_3.1-131              mgcv_1.8-17               quantreg_5.33             modeltools_0.2-21        
[26] MatrixModels_0.4-1        lme4_1.1-13               Matrix_1.2-9              nloptr_1.0.4              RColorBrewer_1.1-2       
[31] extRemes_2.0-8            limma_3.30.13             compiler_3.4.0            pcaMethods_1.66.0         stats4_3.4.0             
[36] locfit_1.5-9.1            SparseM_1.77              Cairo_1.5-9              
bobermayer commented 7 years ago

already solved

https://groups.google.com/forum/#!searchin/singlecellstats/loglik/singlecellstats/rbFUTOQ9wu4/CY9ulhCTAAAJ