HectorRDB / condiments

Trajectory inference across multiple conditions with condiments: differential topology, progression, differentiation, and expression
https://hectorrdb.github.io/condiments/
Other
16 stars 1 forks source link

example("differentiationTest") => Error: there is no package called ‘DelayedMatrixStats’ #2

Closed HenrikBengtsson closed 3 years ago

HenrikBengtsson commented 3 years ago

Hi, after installing condiments in a fresh R 4.1.0 environment, I get:

> example("differentiationTest", package = "condiments")

dffrnT> data('slingshotExample', package = "slingshot")

dffrnT> rd <- slingshotExample$rd

dffrnT> cl <- slingshotExample$cl

dffrnT> condition <- factor(rep(c('A','B'), length.out = nrow(rd)))

dffrnT> condition[110:139] <- 'A'

dffrnT> sds <- slingshot::slingshot(rd, cl)
Error in loadNamespace(x) : 
  there is no package called ‘DelayedMatrixStats’

Enter a frame number, or 0 to exit   

 1: example("differentiationTest", package = "condiments")
 2: source(tf, local, echo = echo, prompt.echo = paste0(prompt.prefix, getOptio
 3: withVisible(eval(ei, envir))
 4: eval(ei, envir)
 5: eval(ei, envir)
 6: Rex9a607e4f6fc6#15: slingshot::slingshot(rd, cl)
 7: slingshot::slingshot(rd, cl)
 8: slingshot(data = data, clusterLabels = as.character(clusterLabels), ...)
 9: slingshot(data = data, clusterLabels = as.character(clusterLabels), ...)
10: .local(data, clusterLabels, ...)
11: getLineages(data, clusterLabels, reducedDim = reducedDim, start.clus = star
12: getLineages(data, clusterLabels, reducedDim = reducedDim, start.clus = star
13: getLineages(data = data, clusterLabels = clusWeight, ...)
14: getLineages(data = data, clusterLabels = clusWeight, ...)
15: .local(data, clusterLabels, ...)
16: createClusterMST(x = X, clusters = clusterLabels, outgroup = omega, outscal
17: createClusterMST(x = X, clusters = clusterLabels, outgroup = omega, outscal
18: .local(x, ...)
19: FUN(x, clusters)
20: .rowstats_w(DelayedArray::DelayedArray(x), group, FUN = DelayedMatrixStats:
21: loadNamespace(x)
22: withRestarts(stop(cond), retry_loadNamespace = function() NULL)
23: withOneRestart(expr, restarts[[1]])
24: doWithOneRestart(return(expr), restart)
25: stop(cond)
26: (function () 
{
    replicate(sink.number(), sink(NULL))
    if (interactive()

Selection: 0
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /software/c4/cbi/software/R-4.1.0-gcc7/lib64/R/lib/libRblas.so
LAPACK: /software/c4/cbi/software/R-4.1.0-gcc7/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] 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] condiments_1.0.0

loaded via a namespace (and not attached):
  [1] colorspace_2.0-1            deldir_0.2-10              
  [3] ellipsis_0.3.2              class_7.3-19               
  [5] rprojroot_2.0.2             cranlike_1.0.2             
  [7] XVector_0.32.0              GenomicRanges_1.44.0       
  [9] rstudioapi_0.13             proxy_0.4-25               
 [11] spatstat.data_2.1-0         bit64_4.0.5                
 [13] prodlim_2019.11.13          fansi_0.5.0                
 [15] lubridate_1.7.10            codetools_0.2-18           
 [17] splines_4.1.0               cachem_1.0.5               
 [19] polyclip_1.10-0             pROC_1.17.0.1              
 [21] caret_6.0-88                kernlab_0.9-29             
 [23] spatstat.linnet_2.1-1       spatstat.sparse_2.0-0  
 [25] compiler_4.1.0              Matrix_1.3-3               
 [27] fastmap_1.1.0               tools_4.1.0                
 [29] igraph_1.2.6                gtable_0.3.0               
 [31] glue_1.4.2                  GenomeInfoDbData_1.2.6     
 [33] RANN_2.6.1                  reshape2_1.4.4             
 [35] dplyr_1.0.6                 rappdirs_0.3.3             
 [37] Rcpp_1.0.6                  spatstat_2.1-0             
 [39] Biobase_2.52.0              vctrs_0.3.8                
 [41] debugme_1.1.0               nlme_3.1-152               
 [43] iterators_1.0.13            slingshot_2.0.0            
 [45] timeDate_3043.102           gower_0.2.2                
 [47] stringr_1.4.0               ps_1.6.0                   
 [49] parsedate_1.2.1             Ecume_0.9.1                
 [51] lifecycle_1.0.0             TrajectoryUtils_1.0.0      
 [53] goftest_1.2-2               princurve_2.1.6            
 [55] zlibbioc_1.38.0             MASS_7.3-54                
 [57] scales_1.1.1                ipred_0.9-11               
 [59] startup_0.15.0              spatstat.core_2.1-2        
 [61] MatrixGenerics_1.4.0        spatstat.utils_2.1-0       
 [63] parallel_4.1.0              SummarizedExperiment_1.22.0
 [65] rematch2_2.1.2              SingleCellExperiment_1.14.1
 [67] curl_4.3.1                  memoise_2.0.0              
 [69] pbapply_1.4-3               ggplot2_3.3.3              
 [71] rpart_4.1-15                stringi_1.6.2              
 [73] RSQLite_2.2.7               S4Vectors_0.30.0           
 [75] desc_1.3.0                  foreach_1.5.1              
 [77] e1071_1.7-7                 crancache_0.0.0.9001       
 [79] BiocGenerics_0.38.0         BiocParallel_1.26.0        
 [81] lava_1.6.9                  GenomeInfoDb_1.28.0        
 [83] rlang_0.4.11                pkgconfig_2.0.3            
 [85] matrixStats_0.58.0          bitops_1.0-7               
 [87] lattice_0.20-44             purrr_0.3.4                
 [89] tensor_1.5                  recipes_0.1.16             
 [91] transport_0.12-2            bit_4.0.4                  
 [93] processx_3.5.2              tidyselect_1.1.1           
 [95] plyr_1.8.6                  magrittr_2.0.1             
 [97] R6_2.5.0                    IRanges_2.26.0             
 [99] generics_0.1.0              DelayedArray_0.18.0        
[101] DBI_1.1.1                   mgcv_1.8-35                
[103] pillar_1.6.1                withr_2.4.2                
[105] survival_3.2-11             abind_1.4-5                
[107] RCurl_1.98-1.3              nnet_7.3-16                
[109] tibble_3.1.2                crayon_1.4.1               
[111] utf8_1.2.1                  spatstat.geom_2.1-0        
[113] grid_4.1.0                  data.table_1.14.0          
[115] blob_1.2.1                  callr_3.7.0                
[117] ModelMetrics_1.2.2.2        digest_0.6.27              
[119] stats4_4.1.0                munsell_0.5.0              

It looks like you need to condition that example code on DelayedMatrixStats being installed, i.e.

if (requireNamespace("DelayedMatrixStats", quietly = TRUE) {
...
}

or add DelayedMatrixStats to Depends or Imports.

It might also be upstream in slingshot - I don't know the code well enough to tell. If so, could you please forward/report this upstream?

PS. I spotted this while running reverse package dependency checks on my matrixStats package

HectorRDB commented 3 years ago

Hi @HenrikBengtsson Thanks for reporting this. I think @kstreet13 is aware of this bug in slingshot and it should be fixed now in the latest version, it might take some time before everything trickles down. Best

HenrikBengtsson commented 3 years ago

Thx. Feel free to close, or keep open (maybe someone else asks about this too). I let you decided.

kstreet13 commented 3 years ago

I believe this is resolved. I saw this error a couple times before the latest release and I think it was related to TrajectoryUtils, but I just tried and didn't get the error. Let me know if you're still encountering it.