Open inofechm opened 1 year ago
Same issue on my side, could not find a solution
I am trying to run the example data. I got the following error Automatically selecting softPower . . . Error in checkAdjMat(similarity, min, max) : some entries are not between-1and1
panc_ip <- FindAllInteractionPrograms(panc_id, iterate.threshold = 300, group.by = "celltype", assay = "alra", sim_threshold = 0.4) Using database OmniPath
Iteratively generating interaction matrix
Will perform 2 iterations to approximate TOM
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
Automatically selecting softPower . . .
Power SFT.R.sq slope truncated.R.sq mean.k. median.k. max.k.
1 1 0.0469 23.50 -0.142 220.0000 2.20e+02 237.00
2 2 0.0425 -1.38 0.112 114.0000 1.12e+02 132.00
3 3 0.4590 -3.38 0.441 59.6000 5.77e+01 75.40
4 4 0.5770 -3.21 0.566 31.3000 2.98e+01 43.80
5 5 0.6810 -2.91 0.679 16.6000 1.55e+01 26.10
6 6 0.8120 -2.95 0.800 8.9400 8.05e+00 16.00
7 7 0.8890 -2.89 0.909 4.8800 4.23e+00 10.10
8 8 0.9060 -2.71 0.937 2.7200 2.27e+00 6.64
9 9 0.9050 -2.47 0.919 1.5600 1.26e+00 4.52
10 10 0.9240 -2.21 0.945 0.9270 6.89e-01 3.19
11 12 0.9610 -1.91 0.983 0.3730 2.26e-01 2.02
12 14 0.9170 -1.72 0.916 0.1840 7.71e-02 1.63
13 16 0.2820 -2.66 0.194 0.1110 2.86e-02 1.42
14 18 0.2850 -2.40 0.207 0.0766 1.28e-02 1.28
15 20 0.2870 -2.29 0.207 0.0578 5.53e-03 1.18
Identifying modules
..connectivity..
..matrix multiplication (system BLAS)..
..normalization..
..done.
Using database OmniPath
Iteratively generating interaction matrix
Will perform 3 iterations to approximate TOM
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
Automatically selecting softPower . . .
Power SFT.R.sq slope truncated.R.sq mean.k. median.k. max.k.
1 1 0.0925 6.57 0.1320 179.0000 1.88e+02 195.00
2 2 0.0956 2.58 -0.0253 90.7000 9.42e+01 103.00
3 3 0.0416 1.20 -0.1630 46.1000 4.74e+01 54.50
4 4 0.0851 -1.27 0.2760 23.5000 2.39e+01 29.50
5 5 0.3610 -2.61 0.6770 12.0000 1.20e+01 16.40
6 6 0.5690 -3.79 0.6560 6.2300 6.10e+00 9.38
7 7 0.8100 -5.39 0.8580 3.2600 3.11e+00 6.36
8 8 0.4140 -11.90 0.2750 1.7400 1.59e+00 4.66
9 9 0.4530 -11.30 0.3000 0.9600 8.17e-01 3.66
10 10 0.4460 -8.90 0.3030 0.5520 4.21e-01 3.03
11 12 0.4030 -5.98 0.2900 0.2210 1.15e-01 2.32
12 14 0.3590 -4.44 0.2760 0.1200 3.21e-02 1.92
13 16 0.3080 -3.08 0.2600 0.0837 9.34e-03 1.66
14 18 0.2900 -2.75 0.2500 0.0668 2.79e-03 1.46
15 20 0.2790 -2.52 0.2230 0.0566 8.95e-04 1.31
Identifying modules
..connectivity..
..matrix multiplication (system BLAS)..
..normalization..
..done.
Using database OmniPath
Iteratively generating interaction matrix
Will perform 1 iterations to approximate TOM
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
Automatically selecting softPower . . .
Power SFT.R.sq slope truncated.R.sq mean.k. median.k. max.k.
1 1 0.882 -51.20 0.9170 152.0000 1.52e+02 158.00
2 2 0.847 -26.60 0.9060 77.6000 7.70e+01 84.50
3 3 0.864 -18.90 0.9360 39.8000 3.92e+01 46.40
4 4 0.851 -13.90 0.8840 20.5000 2.01e+01 26.20
5 5 0.884 -9.84 0.9020 10.7000 1.04e+01 15.40
6 6 0.936 -6.85 0.9440 5.6300 5.33e+00 9.43
7 7 0.933 -5.01 0.9280 3.0300 2.77e+00 6.06
8 8 0.296 -8.38 0.1500 1.6700 1.45e+00 4.10
9 9 0.281 -6.29 0.1320 0.9640 7.56e-01 3.01
10 10 0.864 -2.36 0.8250 0.5860 3.98e-01 2.44
11 12 0.898 -1.65 0.8710 0.2670 1.16e-01 1.83
12 14 0.917 -1.27 0.8930 0.1600 3.45e-02 1.51
13 16 0.883 -1.08 0.8630 0.1170 1.04e-02 1.30
14 18 0.190 -1.85 -0.0228 0.0951 3.29e-03 1.21
15 20 0.144 -1.50 -0.0824 0.0813 1.08e-03 1.16
Identifying modules
..connectivity..
..matrix multiplication (system BLAS)..
..normalization..
..done.
Using database OmniPath
Generating Interaction Matrix...
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
Automatically selecting softPower . . .
Power SFT.R.sq slope truncated.R.sq mean.k. median.k. max.k.
1 1 0.122 -9.61 0.643 237.000 235.0000 254.00
2 2 0.145 -5.03 0.410 123.000 121.0000 144.00
3 3 0.617 -5.49 0.620 64.900 63.0000 85.10
4 4 0.908 -4.80 0.892 34.800 33.1000 53.10
5 5 0.938 -4.08 0.921 19.000 17.5000 35.40
6 6 0.928 -3.46 0.907 10.700 9.4300 25.20
7 7 0.815 -3.05 0.763 6.190 5.1600 19.00
8 8 0.899 -2.68 0.875 3.750 2.8600 15.00
9 9 0.871 -2.35 0.837 2.390 1.6300 12.20
10 10 0.911 -2.12 0.902 1.600 0.9460 10.30
11 12 0.903 -1.82 0.903 0.848 0.3400 7.62
12 14 0.875 -1.65 0.882 0.537 0.1490 5.95
13 16 0.902 -1.54 0.940 0.384 0.0699 4.79
14 18 0.903 -1.48 0.966 0.297 0.0373 3.94
15 20 0.873 -1.45 0.933 0.241 0.0184 3.28
Identifying modules
..connectivity..
..matrix multiplication (system BLAS)..
..normalization..
..done.
Using database OmniPath
Iteratively generating interaction matrix
Will perform 2 iterations to approximate TOM
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
Automatically selecting softPower . . .
Power SFT.R.sq slope truncated.R.sq mean.k. median.k. max.k.
1 1 0.00389 2.22 0.840 248.000 247.0000 263.00
2 2 0.21600 -8.27 0.775 128.000 127.0000 145.00
3 3 0.39700 -6.98 0.716 66.500 65.4000 81.60
4 4 0.72600 -6.44 0.814 34.900 34.0000 46.80
5 5 0.85500 -5.05 0.898 18.600 17.9000 27.50
6 6 0.89300 -4.28 0.922 10.100 9.5600 17.10
7 7 0.92200 -3.65 0.968 5.570 5.1400 11.00
8 8 0.93400 -3.06 0.978 3.190 2.8600 7.43
9 9 0.88100 -2.52 0.895 1.900 1.6200 5.18
10 10 0.93200 -1.90 0.921 1.190 0.9630 3.75
11 12 0.93700 -1.56 0.937 0.566 0.3450 2.65
12 14 0.88600 -1.40 0.865 0.342 0.1420 2.32
13 16 0.85500 -1.33 0.836 0.248 0.0628 2.16
14 18 0.79000 -1.30 0.739 0.199 0.0300 2.05
15 20 0.91400 -1.22 0.902 0.169 0.0156 1.96
Identifying modules
..connectivity..
..matrix multiplication (system BLAS)..
..normalization..
..done.
Using database OmniPath
Iteratively generating interaction matrix
Will perform 3 iterations to approximate TOM
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
Automatically selecting softPower . . .
Error in checkAdjMat(similarity, min, max) :
some entries are not between-1and1
In addition: Warning messages:
1: In InteractionPrograms(object = x, return.mat = T, ...) :
We recommend setting a cell_types parameter so that all cell types are included in each sequence of TOM generation
2: In InteractionPrograms(object = x, return.mat = T, ...) :
No appropriate softPower found to reach minimum scale free topology fit. Proceeding without soft thresholding, interpret results with caution
3: In InteractionPrograms(object = x, return.mat = T, ...) :
We recommend setting a cell_types parameter so that all cell types are included in each sequence of TOM generation
4: In InteractionPrograms(object = x, return.mat = T, ...) :
No appropriate softPower found to reach minimum scale free topology fit. Proceeding without soft thresholding, interpret results with caution
5: In InteractionPrograms(object = x, return.mat = T, ...) :
We recommend setting a cell_types parameter so that all cell types are included in each sequence of TOM generation
6: In InteractionPrograms(object = x, return.mat = T, ...) :
We recommend setting a cell_types parameter so that all cell types are included in each sequence of TOM generation
7: In InteractionPrograms(object = x, return.mat = T, ...) :
No appropriate softPower found to reach minimum scale free topology fit. Proceeding without soft thresholding, interpret results with caution
8: In InteractionPrograms(object = x, return.mat = T, ...) :
We recommend setting a cell_types parameter so that all cell types are included in each sequence of TOM generation
I also encountered the same error as above
Hi @inofechm can I see the output of
class(ifnb$seurat_annotations)
table(ifnb$seurat_annotations)
Hi @anilkumargiri can I see your sessionInfo()
?
I've never seen that verbosity from WGCNA so wondering if there's a version issue at play here
@ajwilk
class(ifnb$seurat_annotations) [1] "factor" table(ifnb$seurat_annotations)
CD14 Mono CD4 Naive T CD4 Memory T CD16 Mono B CD8 T T activated NK DC 4362 2504 1762 1044 978 814 633 619 472 B Activated Mk pDC Eryth 388 236 132 55
@ajwilk R version 4.2.2 Patched (2022-11-10 r83330) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.6 LTS
Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C 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 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] grid tcltk stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] cowplot_1.1.1 ComplexHeatmap_2.14.0 nichenetr_1.1.1 magrittr_2.0.3
[5] scriabin_0.0.0.9000 panc8.SeuratData_3.0.2 ifnb.SeuratData_3.1.0 SeuratData_0.2.2
[9] qs_0.25.5 cols4all_0.6-1 data.table_1.14.8 Mfuzz_2.58.0
[13] DynDoc_1.76.0 widgetTools_1.76.0 e1071_1.7-13 scales_1.2.1
[17] RColorBrewer_1.1-3 gridExtra_2.3 ggsci_3.0.0 openxlsx_4.2.5.2
[21] plotrix_3.8-2 BuenColors_0.5.6 MASS_7.3-58.1 scater_1.26.1
[25] scuttle_1.8.4 SingleCellExperiment_1.20.1 pheatmap_1.0.12 hgu133plus2.db_3.13.0
[29] DESeq2_1.38.3 SummarizedExperiment_1.28.0 MatrixGenerics_1.10.0 matrixStats_1.0.0
[33] GenomicRanges_1.50.2 GenomeInfoDb_1.34.9 clusterProfiler_4.6.2 org.Mm.eg.db_3.16.0
[37] org.Hs.eg.db_3.16.0 AnnotationDbi_1.60.2 IRanges_2.32.0 S4Vectors_0.36.2
[41] mindr_1.3.2 GEOquery_2.66.0 R.utils_2.12.2 R.oo_1.25.0
[45] R.methodsS3_1.8.2 lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0
[49] purrr_1.0.1 readr_2.1.4 tidyr_1.3.0 tibble_3.2.1
[53] ggplot2_3.4.2 tidyverse_2.0.0 patchwork_1.1.2 dplyr_1.1.2
[57] multtest_2.54.0 Biobase_2.58.0 BiocGenerics_0.44.0 SeuratObject_4.1.3
[61] Seurat_4.3.0.1
loaded via a namespace (and not attached):
[1] graphlayouts_1.0.0 pbapply_1.7-0 lattice_0.20-45
[4] vctrs_0.6.3 usethis_2.2.0 mgcv_1.8-41
[7] blob_1.2.4 survival_3.4-0 prodlim_2023.03.31
[10] spatstat.data_3.0-1 later_1.3.1 DBI_1.1.3
[13] rappdirs_0.3.3 uwot_0.1.14 dqrng_0.3.0
[16] zlibbioc_1.44.0 htmlwidgets_1.6.2 GlobalOptions_0.1.2
[19] future_1.32.0 leiden_0.4.3 parallel_4.2.2
[22] irlba_2.3.5.1 tidygraph_1.2.3 Rcpp_1.0.10
[25] KernSmooth_2.23-20 DT_0.28 promises_1.2.0.1
[28] DelayedArray_0.24.0 limma_3.54.2 vegan_2.6-4
[31] pkgload_1.3.2 RcppParallel_5.1.7 Hmisc_5.1-0
[34] RSpectra_0.16-1 fs_1.6.2 fastmatch_1.1-3
[37] digest_0.6.31 png_0.1-8 qlcMatrix_0.9.7
[40] coop_0.6-3 sctransform_0.3.5 scatterpie_0.2.1
[43] DOSE_3.24.2 ggraph_2.1.0 pkgconfig_2.0.3
[46] GO.db_3.16.0 docopt_0.7.1 spatstat.random_3.1-5
[49] DelayedMatrixStats_1.20.0 gower_1.0.1 ggbeeswarm_0.7.2
[52] iterators_1.0.14 DropletUtils_1.18.1 reticulate_1.30
[55] circlize_0.4.15 beeswarm_0.4.0 GetoptLong_1.0.5
[58] xfun_0.39 zoo_1.8-12 tidyselect_1.2.0
[61] reshape2_1.4.4 ica_1.0-3 gson_0.1.0
[64] viridisLite_0.4.2 pkgbuild_1.4.1 rlang_1.1.1
[67] glue_1.6.2 umap_0.2.10.0 lava_1.7.2.1
[70] tictoc_1.2 ggsignif_0.6.4 recipes_1.0.6
[73] labeling_0.4.2 harmony_0.1.1 httpuv_1.6.11
[76] class_7.3-20 preprocessCore_1.60.2 BiocNeighbors_1.16.0
[79] annotate_1.76.0 jsonlite_1.8.5 XVector_0.38.0
[82] princurve_2.1.6 bit_4.0.5 mime_0.12
[85] gplots_3.1.3 stringi_1.7.12 processx_3.8.1
[88] spatstat.sparse_3.0-1 scattermore_1.2 spatstat.explore_3.2-1
[91] quadprog_1.5-8 yulab.utils_0.0.6 hardhat_1.3.0
[94] bitops_1.0-7 cli_3.6.1 rhdf5filters_1.10.1
[97] RSQLite_2.3.1 randomForest_4.7-1.1 timechange_0.2.0
[100] rstudioapi_0.14 nlme_3.1-160 qvalue_2.30.0
[103] fastcluster_1.2.3 locfit_1.5-9.8 listenv_0.9.0
[106] FateID_0.2.2 miniUI_0.1.1.1 gridGraphics_0.5-1
[109] urlchecker_1.0.1 runner_0.4.3 dbplyr_2.3.2
[112] sessioninfo_1.2.2 lifecycle_1.0.3 ExperimentHub_2.6.0
[115] timeDate_4022.108 ggfittext_0.10.0 munsell_0.5.0
[118] ggalluvial_0.12.5 visNetwork_2.1.2 caTools_1.18.2
[121] codetools_0.2-18 vipor_0.4.5 lmtest_0.9-40
[124] msigdbr_7.5.1 htmlTable_2.4.1 xtable_1.8-4
[127] ROCR_1.0-11 flashClust_1.01-2 BiocManager_1.30.21
[130] abind_1.4-5 FNN_1.1.3.2 farver_2.1.1
[133] parallelly_1.36.0 AnnotationHub_3.6.0 RANN_2.6.1
[136] aplot_0.1.10 askpass_1.1 sparsesvd_0.2-2
[139] ggtree_3.6.2 celldex_1.8.0 RcppAnnoy_0.0.20
[142] goftest_1.2-3 profvis_0.3.8 cluster_2.1.4
[145] future.apply_1.11.0 Matrix_1.5-3 tidytree_0.4.2
[148] ellipsis_0.3.2 prettyunits_1.1.1 ggridges_0.5.4
[151] igraph_1.5.0 fgsea_1.24.0 remotes_2.4.2
[154] slam_0.1-50 spatstat.utils_3.0-3 BiocFileCache_2.6.1
[157] htmltools_0.5.5 yaml_2.3.7 interactiveDisplayBase_1.36.0
[160] utf8_1.2.3 plotly_4.10.2 XML_3.99-0.14
[163] ModelMetrics_1.2.2.2 ggpubr_0.6.0 foreign_0.8-83
[166] withr_2.5.0 fitdistrplus_1.1-11 BiocParallel_1.32.6
[169] bit64_4.0.5 foreach_1.5.2 RaceID_0.3.0
[172] Biostrings_2.66.0 progressr_0.13.0 GOSemSim_2.24.0
[175] rsvd_1.0.5 ScaledMatrix_1.6.0 devtools_2.4.5
[178] memoise_2.0.1 evaluate_0.21 RApiSerialize_0.1.2
[181] geneplotter_1.76.0 permute_0.9-7 tzdb_0.4.0
[184] callr_3.7.3 CelliD_1.6.2 caret_6.0-94
[187] ps_1.7.5 curl_5.0.1 DiagrammeR_1.0.10
[190] fdrtool_1.2.17 fansi_1.0.4 tensor_1.5
[193] edgeR_3.40.2 checkmate_2.2.0 cachem_1.0.8
[196] deldir_1.0-9 HDO.db_0.99.1 babelgene_22.9
[199] impute_1.72.3 rjson_0.2.21 rstatix_0.7.2
[202] ggrepel_0.9.3 ade4_1.7-22 clue_0.3-64
[205] tools_4.2.2 RCurl_1.98-1.12 proxy_0.4-27
[208] FSA_0.9.4 car_3.1-2 ape_5.7-1
[211] xml2_1.3.4 ggplotify_0.1.0 httr_1.4.6
[214] rmarkdown_2.22 globals_0.16.2 R6_2.5.1
[217] Rhdf5lib_1.20.0 nnet_7.3-18 genefilter_1.80.3
[220] KEGGREST_1.38.0 treeio_1.22.0 gtools_3.9.4
[223] shape_1.4.6 beachmat_2.14.2 BiocVersion_3.16.0
[226] HDF5Array_1.26.0 BiocSingular_1.14.0 rhdf5_2.42.1
[229] splines_4.2.2 SeuratWrappers_0.3.1 carData_3.0-5
[232] ggfun_0.1.0 colorspace_2.1-0 generics_0.1.3
[235] base64enc_0.1-3 pillar_1.9.0 tweenr_2.0.2
[238] sp_2.0-0 GenomeInfoDbData_1.2.9 plyr_1.8.8
[241] gtable_0.3.3 tkWidgets_1.76.0 zip_2.3.0
[244] stringfish_0.15.8 knitr_1.43 RcppArmadillo_0.12.4.1.0
[247] shadowtext_0.1.2 fastmap_1.1.1 doParallel_1.0.17
[250] broom_1.0.5 filelock_1.0.2 som_0.3-5.1
[253] openssl_2.0.6 backports_1.4.1 ipred_0.9-14
[256] WGCNA_1.72-1 enrichplot_1.18.4 hms_1.1.3
[259] ggforce_0.4.1 Rtsne_0.16 shiny_1.7.4
[262] polyclip_1.10-4 lazyeval_0.2.2 dynamicTreeCut_1.63-1
[265] Formula_1.2-5 crayon_1.5.2 downloader_0.4
[268] pROC_1.18.2 sparseMatrixStats_1.10.0 viridis_0.6.3
[271] rpart_4.1.19 compiler_4.2.2 spatstat.geom_3.2-1
@ajwilk:
class(ifnb$seurat_annotations)
[1] "factor"
table(ifnb$seurat_annotations)
CD14 Mono CD4 Naive T CD4 Memory T CD16 Mono B CD8 T T activated NK DC B Activated Mk pDC Eryth
4362 2504 1762 1044 978 814 633 619 472 388 236 132 55
Hi, everybody,I have solved this problem, actually, it only requires modifying one place. The "assay" parameter in the InteractionPrograms function should not be set as "alra". The default value is "SCT", and it can work perfectly and give correct results.
Hello @ZZZhuLF regarding your fix, wouldn't this remove the use of the ALRA for denoising? anyway to get this to work as intended by the authors?
Thank you for the exciting package! I am trying to go through the interactions-programs vignette and am running into an error with the ifnb comparative analysis example.
When running the FindAllInteractionPrograms after the sctransform and ALRA steps:
ifnb_ip <- FindAllInteractionPrograms(ifnb, group.by = "stim", cell_types = "seurat_annotations", assay = "alra")
I am getting the following error: Using database OmniPathIteratively generating interaction matrix Will perform 5 iterations to approximate TOM Error in
dplyr::sample_n()
: ! Problem while computing indices. ℹ The error occurred in group 1: var = CD14 Mono. Caused by error insample.int()
: ! invalid 'size' argument Runrlang::last_error()
to see where the error occurred. Warning message: In size <= n || replace : 'length(x) = 2215 > 1' in coercion to 'logical(1)'traceback()
33: stop(fallback) 32: signal_abort(cnd, .file) 31: abort(bullets, call = error_call, parent = cnd) 30: h(simpleError(msg, call)) 29: .handleSimpleError(function (cnd) { if (index && is_slice_call(error_call)) { local_error_context(dots = dots, .index = index, mask = mask) header <- cnd_bullet_header("evaluating") } else { header <- "Problem while computing indices." } bullets <- c(header, i = cnd_bullet_cur_group_label()) abort(bullets, call = error_call, parent = cnd) }, "invalid 'size' argument", base::quote(sample.int(n(), size, replace = replace, prob = ~NULL))) 28: sample.int(n(), size, replace = replace, prob = ~NULL) 27: eval(quote({ size <- check_size(~prop, n(), replace = replace) sample.int(n(), size, replace = replace, prob = ~NULL) }), new.env()) 26: eval(quote({ size <- check_size(~prop, n(), replace = replace) sample.int(n(), size, replace = replace, prob = ~NULL) }), new.env()) 25: eval(expr, p) 24: eval(expr, p) 23: eval.parent(substitute(eval(quote(expr), envir))) 22: local({ size <- check_size(~prop, n(), replace = replace) sample.int(n(), size, replace = replace, prob = ~NULL) }) 21: ~local({ size <- check_size(~prop, n(), replace = replace) sample.int(n(), size, replace = replace, prob = ~NULL) }) 20: eval_bare(sym(paste0("..", i)), frame) 19: ...elt2(i) 18: impl(~local({ size <- check_size(~prop, n(), replace = replace) sample.int(n(), size, replace = replace, prob = ~NULL) })) 17: .Call(dplyr_mask_eval_all, quo, private) 16: mask$eval_all(quo(impl(!!!dots))) 15: withCallingHandlers(mask$eval_all(quo(impl(!!!dots))), error = function(cnd) { if (index && is_slice_call(error_call)) { local_error_context(dots = dots, .index = index, mask = mask) header <- cnd_bullet_header("evaluating") } else { header <- "Problem while computing indices." } bullets <- c(header, i = cnd_bullet_cur_group_label()) abort(bullets, call = error_call, parent = cnd) }) 14: slice_eval(mask, dots, error_call = error_call) 13: slice_rows(.data, ..., caller_env = caller_env(), error_call = current_env()) 12: slice.data.frame(tbl, local({ size <- check_size(!!size, n(), replace = replace) sample.int(n(), size, replace = replace, prob = !!weight) })) 11: slice(tbl, local({ size <- check_size(!!size, n(), replace = replace) sample.int(n(), size, replace = replace, prob = !!weight) })) 10: sample_n.data.frame(., prop) 9: dplyr::sample_n(., prop) 8: pull(., cell) 7: sub_prop %>% group_by(var) %>% dplyr::mutate(prop = round(iterate.threshold n()/nrow(.))) %>% dplyr::mutate(prop = ifelse(prop < min.cell, min.cell, prop)) %>% group_by(var) %>% dplyr::sample_n(prop) %>% pull(cell) 6: FUN(X[[i]], ...) 5: lapply(seq_along(1:n.rep), function(z) { if (!is.null(cell_types)) { sub_prop <- (object@meta.data %>% rownames_to_column("cell"))[, c("cell", cell_types)] colnames(sub_prop) <- c("cell", "var") cells <- sub_prop %>% group_by(var) %>% dplyr::mutate(prop = round(iterate.threshold n()/nrow(.))) %>% dplyr::mutate(prop = ifelse(prop < min.cell, min.cell, prop)) %>% group_by(var) %>% dplyr::sample_n(prop) %>% pull(cell) cell.exprs.sub <- as.data.frame(cell.exprs[, cells]) %>% rownames_to_column(var = "gene") } else { cell.exprs.sub <- as.data.frame(cell.exprs[, sample(colnames(cell.exprs), iterate.threshold)]) %>% rownames_to_column(var = "gene") } cell.exprs.rec <- merge(recepts.df, cell.exprs.sub, by.x = "recepts", by.y = "gene", all.x = T) cell.exprs.rec <- cell.exprs.rec[order(cell.exprs.rec$id), ] ... 4: InteractionPrograms(object = x, return.mat = T, ...) 3: FUN(X[[i]], ...) 2: lapply(seu_split, function(x) { InteractionPrograms(object = x, return.mat = T, ...) }) 1: FindAllInteractionPrograms(ifnb, group.by = "stim", cell_types = "seurat_annotations", assay = "alra")