COSGR
COSGR copied to clipboard
error when running COSG for selected groups
Hi!
I'm trying to run your usage sample and I am having an error when running this part:
####### Run COSG for selected groups, i.e., '0' and 2':
#######
marker_cosg <- cosg(
pbmc_small,
groups=c('0', '2'),
assay='RNA',
slot='data',
mu=1,
n_genes_user=100)
I get the error:
Error in if (groups == "all") { : the condition has length > 1
Apparently, because the object groups has more than 1 condition, it triggers an if statement error. How do you overcome this?
Thank you!
Hi @guerrerosimonl,
Thank you for your interest in our work, could you please share the information of sessionInfo()
, thank you!
Best regards, Min
Hi Min, thanks for your reply. Here you have my session info:
R version 4.2.0 (2022-04-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.4 LTS
Matrix products: default BLAS: /usr/local/lib/R/lib/libRblas.so LAPACK: /usr/local/lib/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=nl_NL.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=nl_NL.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=nl_NL.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=nl_NL.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] sp_1.5-0 SeuratObject_4.1.0 Seurat_4.1.1
loaded via a namespace (and not attached):
[1] Rtsne_0.16 colorspace_2.0-3 deldir_1.0-6 ellipsis_0.3.2 ggridges_0.5.3
[6] rstudioapi_0.13 spatstat.data_2.2-0 leiden_0.4.2 listenv_0.8.0 ggrepel_0.9.1
[11] fansi_1.0.3 codetools_0.2-18 splines_4.2.0 knitr_1.39 polyclip_1.10-0
[16] jsonlite_1.8.0 ica_1.0-3 cluster_2.1.3 png_0.1-7 rgeos_0.5-9
[21] uwot_0.1.11 shiny_1.7.2 sctransform_0.3.3 spatstat.sparse_2.1-1 compiler_4.2.0
[26] httr_1.4.3 assertthat_0.2.1 Matrix_1.4-1 fastmap_1.1.0 lazyeval_0.2.2
[31] limma_3.52.2 cli_3.3.0 later_1.3.0 htmltools_0.5.3 tools_4.2.0
[36] igraph_1.3.4 gtable_0.3.0 glue_1.6.2 RANN_2.6.1 reshape2_1.4.4
[41] dplyr_1.0.9 Rcpp_1.0.9 scattermore_0.8 vctrs_0.4.1 nlme_3.1-158
[46] progressr_0.10.1 lmtest_0.9-40 spatstat.random_2.2-0 xfun_0.31 stringr_1.4.0
[51] globals_0.16.0 mime_0.12 miniUI_0.1.1.1 lifecycle_1.0.1 irlba_2.3.5
[56] goftest_1.2-3 future_1.27.0 edgeR_3.38.1 MASS_7.3-58 zoo_1.8-10
[61] scales_1.2.0 spatstat.core_2.4-4 promises_1.2.0.1 spatstat.utils_2.3-1 parallel_4.2.0
[66] RColorBrewer_1.1-3 yaml_2.3.5 reticulate_1.25 pbapply_1.5-0 gridExtra_2.3
[71] ggplot2_3.3.6 rpart_4.1.16 stringi_1.7.8 rlang_1.0.4 pkgconfig_2.0.3
[76] matrixStats_0.62.0 evaluate_0.15 lattice_0.20-45 ROCR_1.0-11 purrr_0.3.4
[81] tensor_1.5 patchwork_1.1.1 htmlwidgets_1.5.4 cowplot_1.1.1 tidyselect_1.1.2
[86] parallelly_1.32.1 RcppAnnoy_0.0.19 plyr_1.8.7 magrittr_2.0.3 R6_2.5.1
[91] generics_0.1.3 DBI_1.1.3 mgcv_1.8-40 pillar_1.8.0 fitdistrplus_1.1-8
[96] survival_3.3-1 abind_1.4-5 tibble_3.1.8 future.apply_1.9.0 KernSmooth_2.23-20
[101] utf8_1.2.2 spatstat.geom_2.4-0 plotly_4.10.0 rmarkdown_2.14 locfit_1.5-9.6
[106] grid_4.2.0 data.table_1.14.2 digest_0.6.29 xtable_1.8-4 tidyr_1.2.0
[111] httpuv_1.6.5 munsell_0.5.0 viridisLite_0.4.0