ZJUFanLab / scRank

A computational method to rank and infer drug-responsive cell population towards in-silico drug perturbation using a target-perturbed gene regulatory network (tpGRN) for single-cell transcriptomic data
GNU General Public License v3.0
24 stars 0 forks source link

An error occurred while running the tutorial. #4

Open JH-42 opened 1 month ago

JH-42 commented 1 month ago

Dear Author,

Thank you for creating this very promising R package. I encountered an error while running the tutorial. Could you please advise me on what modifications I should make?


> library(scRank)
> library(Seurat)
> 
> seuratObj <- system.file("extdata", "AML_object.rda", package="scRank")
> load(seuratObj)
> obj <- CreateScRank(input = seuratObj,
+                     species = 'mouse',
+                     cell_type = 'label',
+                     target = 'Brd4')
> 
> 
> obj <- scRank::Constr_net(obj)
--- Cell population ---

--- --- --- --- --- ---
will be kept for constructing network!
Integrating sets of network ... It might take minutes to hours.
> obj <- scRank::rank_celltype(obj)
Error in object@net[[1]] : subscript out of bounds

> sessionInfo()
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                           LC_TIME=English_United States.utf8    

time zone: America/Chicago
tzcode source: internal

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

other attached packages:
[1] scRank_1.0.0       doParallel_1.0.17  iterators_1.0.14   foreach_1.5.2      SeuratObject_4.1.4 Seurat_4.4.0      

loaded via a namespace (and not attached):
  [1] RColorBrewer_1.1-3     rstudioapi_0.15.0      jsonlite_1.8.7         shape_1.4.6            magrittr_2.0.3        
  [6] spatstat.utils_3.0-3   farver_2.1.1           GlobalOptions_0.1.2    vctrs_0.6.3            ROCR_1.0-11           
 [11] spatstat.explore_3.2-3 rstatix_0.7.2          htmltools_0.5.6        dynamicTreeCut_1.63-1  broom_1.0.5           
 [16] sctransform_0.4.0      parallelly_1.36.0      KernSmooth_2.23-22     htmlwidgets_1.6.2      ica_1.0-3             
 [21] plyr_1.8.8             plotly_4.10.2          zoo_1.8-12             igraph_1.5.1           mime_0.12             
 [26] lifecycle_1.0.3        pkgconfig_2.0.3        Matrix_1.6-1.1         R6_2.5.1               fastmap_1.1.1         
 [31] fitdistrplus_1.1-11    future_1.33.0          shiny_1.8.1            clue_0.3-65            digest_0.6.33         
 [36] colorspace_2.1-0       patchwork_1.2.0.9000   S4Vectors_0.38.2       tensor_1.5             RSpectra_0.16-1       
 [41] irlba_2.3.5.1          ggpubr_0.6.0           labeling_0.4.3         progressr_0.14.0       fansi_1.0.4           
 [46] spatstat.sparse_3.0-2  httr_1.4.7             polyclip_1.10-6        abind_1.4-5            compiler_4.3.1        
 [51] withr_2.5.1            backports_1.4.1        BiocParallel_1.34.2    viridis_0.6.4          carData_3.0-5         
 [56] ggsignif_0.6.4         MASS_7.3-60            rjson_0.2.21           tools_4.3.1            lmtest_0.9-40         
 [61] msigdbr_7.5.1          httpuv_1.6.11          future.apply_1.11.0    goftest_1.2-3          glue_1.6.2            
 [66] nlme_3.1-163           promises_1.2.1         grid_4.3.1             Rtsne_0.16             cluster_2.1.4         
 [71] reshape2_1.4.4         fgsea_1.26.0           generics_0.1.3         gtable_0.3.4           spatstat.data_3.0-1   
 [76] tzdb_0.4.0             tidyr_1.3.0            hms_1.1.3              data.table_1.14.8      sp_2.0-0              
 [81] car_3.1-2              utf8_1.2.3             BiocGenerics_0.46.0    spatstat.geom_3.2-5    RcppAnnoy_0.0.21      
 [86] ggrepel_0.9.3          RANN_2.6.1             pillar_1.9.0           stringr_1.5.0          babelgene_22.9        
 [91] later_1.3.1            circlize_0.4.15        splines_4.3.1          dplyr_1.1.3            lattice_0.21-8        
 [96] survival_3.5-7         deldir_1.0-9           rTensor_1.4.8          tidyselect_1.2.0       ComplexHeatmap_2.16.0 
[101] miniUI_0.1.1.1         pbapply_1.7-2          gridExtra_2.3          IRanges_2.34.1         scattermore_1.2       
[106] RhpcBLASctl_0.23-42    stats4_4.3.1           matrixStats_1.0.0      stringi_1.7.12         lazyeval_0.2.2        
[111] codetools_0.2-19       tester_0.2.0           tibble_3.2.1           cli_3.6.1              uwot_0.1.16           
[116] xtable_1.8-4           reticulate_1.32.0      munsell_0.5.0          Rcpp_1.0.11            globals_0.16.2        
[121] spatstat.random_3.1-6  png_0.1-8              readr_2.1.4            ggplot2_3.5.0          listenv_0.9.0         
[126] viridisLite_0.4.2      scales_1.3.0           ggridges_0.5.4         leiden_0.4.3           purrr_1.0.2           
[131] crayon_1.5.2           GetoptLong_1.0.5       rlang_1.1.1            fastmatch_1.1-4        cowplot_1.1.1   
ibzhuai commented 1 month ago

I had the same problem...

Lee0498 commented 1 month ago

Hi @JH-42, Thanks. It seems that the error you encountered is due to a typo in our tutorial. Specifically, the cell type column name should be 'labels' instead of 'label'. We have fixed this issue in our documentation.