dmcable / spacexr

Spatial-eXpression-R: Cell type identification (including cell type mixtures) and cell type-specific differential expression for spatial transcriptomics
GNU General Public License v3.0
309 stars 73 forks source link

installation error #24

Closed Shiywa closed 3 years ago

Shiywa commented 3 years ago

Hi, I got the error in installation of RCTD. the error information is :

> devtools::install_github("dmcable/RCTD", build_vignettes = F)
Registered S3 method overwritten by 'cli':
  method     from    
  print.boxx spatstat
Downloading GitHub repo dmcable/RCTD@HEAD
✓  checking for file ‘/private/var/folders/2d/tvx5105j0_d4k4y0rdpj70jc0000gn/T/RtmpGMKQHB/remotes118c51cd10f4f/dmcable-RCTD-d74ff7e/DESCRIPTION’ ...
─  preparing ‘RCTD’:
✓  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘RCTD_1.1.0.tar.gz’

* installing *source* package ‘RCTD’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘RCTD’ in namespaceExport(ns, exports):
 undefined exports: Reference
错误: 载入失败
停止执行
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RCTD’
错误: Failed to install 'RCTD' from GitHub:
  (由警告转换成)installation of package ‘/var/folders/2d/tvx5105j0_d4k4y0rdpj70jc0000gn/T//RtmpGMKQHB/file118c561441a50/RCTD_1.1.0.tar.gz’ had non-zero exit status

it seems to be somthing like dependency packages of RCTD was installed as dependence of other packages at past, and dependence packages version was not suitable. I can't find where the package Reference are. my R environment is :

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS  10.16

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

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

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

other attached packages:
[1] dplyr_1.0.5     patchwork_1.1.0 ggplot2_3.3.3   Seurat_3.2.2   

loaded via a namespace (and not attached):
  [1] Rtsne_0.15           colorspace_2.0-0     deldir_0.2-3         ellipsis_0.3.1      
  [5] ggridges_0.5.2       rprojroot_2.0.2      fs_1.5.0             rstudioapi_0.13     
  [9] spatstat.data_2.0-0  leiden_0.3.5         listenv_0.8.0        remotes_2.2.0       
 [13] ggrepel_0.8.2        RSpectra_0.16-0      fansi_0.4.2          codetools_0.2-16    
 [17] splines_4.0.2        polyclip_1.10-0      pkgload_1.1.0        jsonlite_1.7.1      
 [21] ica_1.0-2            cluster_2.1.0        png_0.1-7            uwot_0.1.9          
 [25] shiny_1.5.0          sctransform_0.3.2    compiler_4.0.2       httr_1.4.2          
 [29] assertthat_0.2.1     Matrix_1.2-18        fastmap_1.0.1        lazyeval_0.2.2      
 [33] cli_2.3.1            later_1.1.0.1        htmltools_0.5.1.1    prettyunits_1.1.1   
 [37] tools_4.0.2          rsvd_1.0.3           igraph_1.2.6         gtable_0.3.0        
 [41] glue_1.4.2           RANN_2.6.1           reshape2_1.4.4       Rcpp_1.0.6          
 [45] spatstat_1.64-1      vctrs_0.3.6          nlme_3.1-148         lmtest_0.9-38       
 [49] stringr_1.4.0        globals_0.14.0       ps_1.4.0             testthat_3.0.0      
 [53] mime_0.9             miniUI_0.1.1.1       lifecycle_1.0.0      irlba_2.3.3         
 [57] devtools_2.3.2       goftest_1.2-2        future_1.20.1        MASS_7.3-51.6       
 [61] zoo_1.8-8            scales_1.1.1         promises_1.1.1       spatstat.utils_2.1-0
 [65] parallel_4.0.2       RColorBrewer_1.1-2   curl_4.3             memoise_1.1.0       
 [69] reticulate_1.18      pbapply_1.4-3        gridExtra_2.3        rpart_4.1-15        
 [73] stringi_1.5.3        desc_1.2.0           pkgbuild_1.1.0       rlang_0.4.10        
 [77] pkgconfig_2.0.3      matrixStats_0.57.0   lattice_0.20-41      ROCR_1.0-11         
 [81] purrr_0.3.4          tensor_1.5           htmlwidgets_1.5.2    cowplot_1.1.0       
 [85] tidyselect_1.1.0     processx_3.4.5       parallelly_1.21.0    RcppAnnoy_0.0.17    
 [89] plyr_1.8.6           magrittr_2.0.1       R6_2.5.0             generics_0.1.0      
 [93] DBI_1.1.0            pillar_1.5.1         withr_2.4.1          mgcv_1.8-31         
 [97] fitdistrplus_1.1-1   survival_3.2-3       abind_1.4-5          tibble_3.1.0        
[101] future.apply_1.6.0   crayon_1.4.1         KernSmooth_2.23-17   utf8_1.2.1          
[105] plotly_4.9.2.1       usethis_1.6.3        grid_4.0.2           data.table_1.13.2   
[109] callr_3.5.1          digest_0.6.27        xtable_1.8-4         tidyr_1.1.2         
[113] httpuv_1.5.4         munsell_0.5.0        viridisLite_0.3.0    sessioninfo_1.1.1   

Is there any sugggestion for me ?

dmcable commented 3 years ago

Yes, thank you for letting me know. I had forgotten to add the new Reference.R file. However, it is present now. Please update the package and try again. Sorry for the inconvenience.

Shiywa commented 3 years ago

thanks for your advice. however, there are still some mistakes in vignettes construction.

> devtools::install_github("dmcable/RCTD", build_vignettes = TRUE)
Registered S3 method overwritten by 'cli':
  method     from    
  print.boxx spatstat
Downloading GitHub repo dmcable/RCTD@HEAD
✓  checking for file ‘/private/var/folders/2d/tvx5105j0_d4k4y0rdpj70jc0000gn/T/RtmpNUKHck/remotes21e24192a771/dmcable-RCTD-b81bdfe/DESCRIPTION’ ...
─  preparing ‘RCTD’:
✓  checking DESCRIPTION meta-information ...
─  installing the package to build vignettes
E  creating vignettes (8.3s)
   --- re-building ‘spatial-transcriptomics.Rmd’ using rmarkdown
   Quitting from lines 119-121 (spatial-transcriptomics.Rmd) 
   Error: processing vignette 'spatial-transcriptomics.Rmd' failed with diagnostics:
   缺少参数"cell_type_names",也没有缺省值
   --- failed re-building ‘spatial-transcriptomics.Rmd’

   SUMMARY: processing the following file failed:
     ‘spatial-transcriptomics.Rmd’

   错误: Vignette re-building failed.
   停止执行
错误: Failed to install 'RCTD' from GitHub:
  System command 'R' failed, exit status: 1, stdout + stderr (last 10 lines):
E> Quitting from lines 119-121 (spatial-transcriptomics.Rmd) 
E> Error: processing vignette 'spatial-transcriptomics.Rmd' failed with diagnostics:
E> 缺少参数"cell_type_names",也没有缺省值
E> --- failed re-building ‘spatial-transcriptomics.Rmd’
E> 
E> SUMMARY: processing the following file failed:
E>   ‘spatial-transcriptomics.Rmd’
E> 
E> 错误: Vignette re-building failed.
E> 停止执行

when I set build_vignettes = F, installation is successful.

################################## there are some mistakes in create.RCTD, error information is same with above report:

> myRCTD <- create.RCTD(puck, reference, max_cores = 1)
[1] "Begin: process_cell_type_info"
[1] "process_cell_type_info: number of cells in reference: 475"
[1] "process_cell_type_info: number of genes in reference: 384"

 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 
Error in get_cell_type_info(reference@counts, reference@cell_types, reference@nUMI,  : 
  缺少参数"cell_type_names",也没有缺省值

I checked function create.RCTD and found some mistakes might result in the error :

  1. cell_type_info <- list(info = process_cell_type_info(reference, cell_type_names = cell_type_names, CELL_MIN = CELL_MIN_INSTANCE), renorm = NULL) was the step result in error. I found that process_cell_type_info calls get_cell_type_info. but there isn't a default value of cell_type_names. I just think that you should add cell_type_names =cell_type_names in
    cell_type_info <- list(info = process_cell_type_info(reference, cell_type_names = cell_type_names,
                                                       CELL_MIN = CELL_MIN_INSTANCE), renorm = NULL)
  2. when above error was solved, there are some error in get_cell_type_info. it seems to result from rowSums, which input must be at least two columns.

function error result in failure of Vignette re-building.

regards!