wguo-research / scCancer

A package for automated processing of single cell RNA-seq data in cancer
92 stars 39 forks source link

issues with RUN scAnnotation #31

Open AteeqMKhaliq opened 3 years ago

AteeqMKhaliq commented 3 years ago

Hi, Thanks a lot for creating a fantastic tool, I am currently stuck with RUN scAnnotation step the program abruptly ends at [2021-04-13 22:09:05] -----: cells malignancy annotation. step and throws the following error


Run scStatistics
stat.results <- runScStatistics(
    dataPath = dataPath,
    savePath = savePath,
    sampleName = sampleName,
    authorName = authorName
)

anno.results <- runScAnnotation(
    dataPath = dataPath,
    statPath = statPath,
    savePath = savePath,
    authorName = authorName,
    sampleName = sampleName,
    geneSet.method = "GSVA"       # or "GSVA"
)`

Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'rowMeans': subscript out of bounds In addition: There were 50 or more warnings (use warnings() to see the first 50) Please let me know where i am doing mistake, my session info is as follows

`> sessionInfo() R version 4.0.3 (2020-10-10) Platform: x86_64-conda-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /home/masoodlab/miniconda3/lib/libopenblasp-r0.3.12.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] SeuratDisk_0.0.0.9019 scCancer_2.2.1 SeuratObject_4.0.0
[4] Seurat_4.0.1 devtools_2.4.0 usethis_2.0.1

loaded via a namespace (and not attached): [1] utf8_1.2.1 reticulate_1.18
[3] R.utils_2.10.1 tidyselect_1.1.0
[5] RSQLite_2.2.5 AnnotationDbi_1.52.0
[7] htmlwidgets_1.5.3 BiocParallel_1.24.1
[9] grid_4.0.3 Rtsne_0.15
[11] pROC_1.17.0.1 munsell_0.5.0
[13] codetools_0.2-18 ica_1.0-2
[15] xgboost_1.3.3.1 future_1.21.0
[17] miniUI_0.1.1.1 withr_2.4.1
[19] colorspace_2.0-0 Biobase_2.50.0
[21] highr_0.8 knitr_1.31
[23] rstudioapi_0.13 SingleCellExperiment_1.12.0 [25] stats4_4.0.3 ROCR_1.0-11
[27] ggsignif_0.6.1 tensor_1.5
[29] listenv_0.8.0 labeling_0.4.2
[31] MatrixGenerics_1.2.1 GenomeInfoDbData_1.2.4
[33] harmony_1.0 KMsurv_0.1-5
[35] polyclip_1.10-0 farver_2.1.0
[37] pheatmap_1.0.12 bit64_4.0.5
[39] rprojroot_2.0.2 parallelly_1.24.0
[41] vctrs_0.3.7 generics_0.1.0
[43] xfun_0.22 markdown_1.1
[45] GenomeInfoDb_1.26.7 R6_2.5.0
[47] hdf5r_1.3.3 DelayedArray_0.16.3
[49] bitops_1.0-6 spatstat.utils_2.1-0
[51] cachem_1.0.4 promises_1.2.0.1
[53] scales_1.1.1 ggExtra_0.9
[55] gtable_0.3.0 globals_0.14.0
[57] processx_3.5.1 goftest_1.2-2
[59] rlang_0.4.10 splines_4.0.3
[61] rstatix_0.7.0 lazyeval_0.2.2
[63] spatstat.geom_2.0-1 broom_0.7.6
[65] BiocManager_1.30.12 reshape2_1.4.4
[67] abind_1.4-5 backports_1.2.1
[69] httpuv_1.5.5 tools_4.0.3
[71] ggplot2_3.3.3 ellipsis_0.3.1
[73] spatstat.core_2.0-0 RColorBrewer_1.1-2
[75] BiocGenerics_0.36.0 sessioninfo_1.1.1
[77] ggridges_0.5.3 Rcpp_1.0.6
[79] plyr_1.8.6 zlibbioc_1.36.0
[81] RCurl_1.98-1.3 purrr_0.3.4
[83] ps_1.6.0 prettyunits_1.1.1
[85] ggpubr_0.4.0 rpart_4.1-15
[87] deldir_0.2-10 pbapply_1.4-3
[89] cowplot_1.1.1 S4Vectors_0.28.1
[91] zoo_1.8-9 SummarizedExperiment_1.20.0 [93] haven_2.3.1 ggrepel_0.9.1
[95] cluster_2.1.1 fs_1.5.0
[97] magrittr_2.0.1 RSpectra_0.16-0
[99] data.table_1.14.0 scattermore_0.7
[101] openxlsx_4.2.3 lmtest_0.9-38
[103] RANN_2.6.1 survminer_0.4.9
[105] fitdistrplus_1.1-3 matrixStats_0.58.0
[107] pkgload_1.2.1 evaluate_0.14
[109] hms_1.0.0 patchwork_1.1.1
[111] mime_0.10 GSVA_1.38.2
[113] xtable_1.8-4 XML_3.99-0.6
[115] scds_1.6.0 rio_0.5.26
[117] readxl_1.3.1 IRanges_2.24.1
[119] gridExtra_2.3 testthat_3.0.2
[121] compiler_4.0.3 tibble_3.1.0
[123] KernSmooth_2.23-18 crayon_1.4.1
[125] R.oo_1.24.0 htmltools_0.5.1.1
[127] mgcv_1.8-34 later_1.1.0.1
[129] tidyr_1.1.3 SoupX_1.5.0
[131] DBI_1.1.1 MASS_7.3-53.1
[133] NNLM_0.4.4 Matrix_1.3-2
[135] car_3.0-10 cli_2.4.0
[137] R.methodsS3_1.8.1 parallel_4.0.3
[139] igraph_1.2.6 GenomicRanges_1.42.0
[141] forcats_0.5.1 pkgconfig_2.0.3
[143] km.ci_0.5-2 foreign_0.8-81
[145] plotly_4.9.3 spatstat.sparse_2.0-0
[147] annotate_1.68.0 XVector_0.30.0
[149] stringr_1.4.0 callr_3.6.0
[151] digest_0.6.27 sctransform_0.3.2
[153] RcppAnnoy_0.0.18 graph_1.68.0
[155] spatstat.data_2.1-0 cellranger_1.1.0
[157] leiden_0.3.7 survMisc_0.5.5
[159] uwot_0.1.10 GSEABase_1.52.1
[161] curl_4.3 shiny_1.6.0
[163] lifecycle_1.0.0 nlme_3.1-152
[165] jsonlite_1.7.2 carData_3.0-4
[167] limma_3.46.0 desc_1.3.0
[169] viridisLite_0.4.0 fansi_0.4.2
[171] pillar_1.6.0 lattice_0.20-41
[173] fastmap_1.1.0 httr_1.4.2
[175] pkgbuild_1.2.0 survival_3.2-10
[177] glue_1.4.2 remotes_2.3.0
[179] zip_2.1.1 png_0.1-7
[181] bit_4.0.4 stringi_1.5.3
[183] blob_1.2.1 memoise_2.0.0
[185] liger_2.0.1 dplyr_1.0.5
[187] irlba_2.3.3 future.apply_1.7.0 `

Thanks a lot AK

wguo-research commented 3 years ago

Thanks for your use. Can you run the example KC data successfully?

AteeqMKhaliq commented 3 years ago

Hi wguo-research, Thanks a lot, and Appreciate your reply, I have run the example codes with Example data (KC-example data) and it executes perfectly fine and smooth without any glitch.


> anno.results <- runScAnnotation(
+     dataPath = dataPath,
+     statPath = statPath,
+     savePath = savePath,
+     authorName = authorName,
+     sampleName = sampleName,
+     geneSet.method = "average"   # or "GSVA"
+ )
[2021-04-16 14:26:56] START: RUN scAnnotation
[2021-04-16 14:26:56] -----: data preparation
[2021-04-16 14:27:36] -----: Seurat object creation
[2021-04-16 14:27:40] -----: highly variable genes
[2021-04-16 14:27:43] -----: data scaling
[2021-04-16 14:28:23] -----: PCA
[2021-04-16 14:28:30] -----: clustering
[2021-04-16 14:28:35] -----: tSNE
[2021-04-16 14:29:33] -----: UMAP
[2021-04-16 14:30:19] -----: differential expression analysis
[2021-04-16 14:33:07] -----: Seurat plotting and saving
When using repel, set xnudge and ynudge to 0 for optimal results
[2021-04-16 14:33:34] -----: Doublet score estimation
[14:34:53] WARNING: ../../amalgamation/../src/learner.cc:1061: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior.
[2021-04-16 14:35:03] -----: TME cell types annotation
[2021-04-16 14:39:44] -----: cells malignancy annotation
[2021-04-16 14:43:55] -----: cell cycle score estimation
[2021-04-16 14:43:58] -----: stemness score calculation
[2021-04-16 14:44:04] -----: gene set signatures analysis
[2021-04-16 14:45:14] -----: expression programs analysis
[2021-04-16 14:50:14] -----: cell interaction analysis
[2021-04-16 14:51:06] -----: report generating
[2021-04-16 14:52:20] END: Finish scAnnotation

Warning message:
Transformation introduced infinite values in continuous x-axis

I have used a Seurat object and converted it to a directory containing the count matrix and cell/gene annotation from a sparse matrix of UMI counts, in the format produced by the CellRanger software suite using write10xCounts() "version=3", created a filtered_feature_bc_matrix folder. but when I run my dataset it shows the following error.

Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'rowMeans': subscript out of bounds In addition: There were 50 or more warnings (use warnings() to see the first 50

I really want to use this package, please let me know where I am going wrong. Thanks a lot for your kind help.

Regards, AK

wguo-research commented 3 years ago

You can try the function generate10Xdata in scCancer to generate a 10X-like data folder. The introduction of it can be found at https://github.com/wguo-research/scCancer/wiki/5.-Other-personalized-settings#run-sccancer-from-an-expression-matrix and by help(generate10Xdata).

AteeqMKhaliq commented 3 years ago

Hi Wguo-research, Thanks a lot for helping me out, now the program runs perfectly fine. It's such a wonderful package. Secondly, how Cell malignancy estimation is done? is the malignancy score has a set range (to say, if cells fall under a certain range to a certain range it is termed as malignant)? Thanks a lot, it is a great tool much appreciated,

AK Chicago Univ

wguo-research commented 3 years ago

The cell malignancy scores are estimated based on the inferred CNVs. The malignancy score doesn't have a certain range. The malignant or nonmalignant type is determined by the bi-model distributions of malignancy scores, which doesn't have a fixed threshold. The details can be found in our paper.

kaixin123456789 commented 2 years ago

I am meeting the same problem that the program abruptly ends at cells malignancy annotation! I can also run the example codes with Example data (KC-example data) and it executes perfectly fine and smooth without any glitch, but the same error occurs when I run scAnnotation step for my own data. I have tried to solve the problem by the function generate10Xdata in scCancer to generate a 10X-like data folder, however, it still doesn't work. So could you help me to deal with it? Thanks,

andynkili commented 1 year ago

Dear dev teams,

Thank you for this awesome tool. However I have the same issue. I have generated a 10X-like folder using generate10Xdatafrom a Seurat object but I still have the error during the cell malignancy annotation:

[2023-01-26 08:57:16] START: RUN scAnnotation
- Warning in 'prepareSeurat': Cannot find the raw data, and use the filtered data instead.
[2023-01-26 08:57:16] -----: data preparation
[2023-01-26 08:57:23] -----: Seurat object creation
[2023-01-26 08:57:24] -----: highly variable genes
[2023-01-26 08:57:26] -----: data scaling
[2023-01-26 08:57:48] -----: PCA
[2023-01-26 08:57:55] -----: clustering
[2023-01-26 08:57:57] -----: tSNE
[2023-01-26 08:58:16] -----: UMAP
[2023-01-26 08:58:35] -----: differential expression analysis
[2023-01-26 09:01:05] -----: Seurat plotting and saving
When using repel, set xnudge and ynudge to 0 for optimal results
[2023-01-26 09:01:20] -----: Doublet score estimation
[2023-01-26 09:01:44] -----: TME cell types annotation
[2023-01-26 09:06:56] -----: cells malignancy annotation
Error in (function (cond)  : 
  error in evaluating the argument 'x' in selecting a method for function 'rowMeans': subscript out of bounds

Do you have any clues on why this is happening?

Best, Andy

SaleenaYounus commented 4 months ago

In scCombination, throws the following error, could you clarify

[2024-04-09 15:59:51] START: RUN ScCombination [2024-04-09 15:59:51] -----: sample data combination [1] "AML_post1" [1] "AML_pre1" [2024-04-09 15:59:53] -----: combine data by normal cell MNN Computing 2000 integration features Scaling features for provided objects |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
Finding all pairwise anchors | | 0 % ~calculating Running CCA Merging objects Finding neighborhoods Finding anchors Found 6417 anchors Filtering anchors Retained 2928 anchors |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=35s
[ 2024-04-09 16:00:35 ] -----: PCA [ 2024-04-09 16:00:42 ] -----: clustering [ 2024-04-09 16:00:44 ] -----: tSNE [ 2024-04-09 16:01:02 ] -----: UMAP [ 2024-04-09 16:01:25 ] -----: differential expression analysis [ 2024-04-09 16:01:59 ] -----: Seurat plotting and saving [2024-04-09 16:02:08] -----: plot sample source [ 2024-04-09 16:02:09 ] -----: TME cell types combination [2024-04-09 16:02:09] -----: cells malignancy combination Error in paste0(malignancy.method, "-malignType-point.png") : argument "malignancy.method" is missing, with no default