Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in dplyr::select(): ! <text>:1:5: unexpected symbol #20

Open
gwendolinelecuyer opened this issue Nov 30, 2022 · 0 comments
Open

Comments

@gwendolinelecuyer
Copy link

gwendolinelecuyer commented Nov 30, 2022

Hello,
I'm getting the following error when I run wilcoxauc()

DEG=wilcoxauc(sub.compare, 'treatment', seurat_assay='RNA', assay='data')

###############
Error in dplyr::select():
! :1:5: unexpected symbol
1: Use of
^
rlang::last_error()
<simpleError in dplyr::select(., .data$feature, .data$group, .data$avgExpr, .data$logFC, .data$statistic, .data$auc, .data$pval, .data$padj, .data$pct_in, .data$pct_out): :1:5: unexpected symbol
1: Use of
^>
################

I had the same kind of issue with harmony, which was solve with this post immunogenomics/harmony#173
I tried to do the same thing:

presto.tidy_results.new <- function (wide_res, features, groups)
{
res <- Reduce(cbind, lapply(wide_res, as.numeric)) %>% data.frame()
colnames(res) <- names(wide_res)
res$feature <- rep(features, times = length(groups))
res$group <- rep(groups, each = length(features))
res %>% dplyr::select(data$feature, data$group, data$avgExpr,
data$logFC, data$statistic, data$auc, data$pval,
data$padj, data$pct_in, data$pct_out)
}

environment(presto.tidy_results.new) <- asNamespace('presto')
assignInNamespace("tidy_results", presto.tidy_results.new, ns = "presto")

But I still have an error:
########
Error in dplyr::select():
! Problem while evaluating data$feature.
Run rlang::last_error() to see where the error occurred.

rlang::last_error()
<error/rlang_error>
Error in dplyr::select():
! Problem while evaluating data$feature.


Backtrace:

  1. presto::wilcoxauc(...)
  2. dplyr:::select.data.frame(...)
  3. tidyselect::eval_select(expr(c(...)), .data)
  4. tidyselect:::eval_select_impl(...)
  5. tidyselect:::vars_select_eval(...)
  6. tidyselect:::walk_data_tree(expr, data_mask, context_mask)
  7. tidyselect:::eval_c(expr, data_mask, context_mask)
  8. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
  9. tidyselect:::walk_data_tree(new, data_mask, context_mask)
  10. tidyselect:::eval_context(expr, context_mask, call = error_call)
  11. rlang::eval_tidy(as_quosure(expr, env), context_mask)
    Run rlang::last_trace() to see the full context.
    ###########

Sincerely,
Gwendoline

Here my sessionInfo
R version 4.0.5 (2021-03-31)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

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] parallel stats4 stats graphics grDevices utils datasets
[8] methods base

other attached packages:
[1] forcats_0.5.1 purrr_0.3.5
[3] readr_2.1.2 tidyr_1.2.0
[5] tibble_3.1.8 tidyverse_1.3.2
[7] UpSetR_1.4.0 presto_1.0.0
[9] data.table_1.14.6 Rcpp_1.0.9
[11] pheatmap_1.0.12 RColorBrewer_1.1-3
[13] ggplot2_3.3.6 reshape2_1.4.4
[15] scales_1.2.1 stringr_1.4.1
[17] SingleCellExperiment_1.12.0 SummarizedExperiment_1.20.0
[19] Biobase_2.50.0 GenomicRanges_1.42.0
[21] GenomeInfoDb_1.26.7 IRanges_2.24.1
[23] S4Vectors_0.28.1 BiocGenerics_0.36.1
[25] MatrixGenerics_1.2.1 matrixStats_0.63.0
[27] SeuratObject_4.1.3 Seurat_4.3.0
[29] dplyr_1.0.10

loaded via a namespace (and not attached):
[1] readxl_1.4.0 backports_1.4.1 plyr_1.8.8
[4] igraph_1.3.4 lazyeval_0.2.2 sp_1.5-1
[7] splines_4.0.5 listenv_0.8.0 scattermore_0.8
[10] digest_0.6.30 htmltools_0.5.3 fansi_1.0.3
[13] magrittr_2.0.3 tensor_1.5 googlesheets4_1.0.1
[16] cluster_2.1.4 ROCR_1.0-11 tzdb_0.3.0
[19] globals_0.16.2 modelr_0.1.9 spatstat.sparse_3.0-0
[22] colorspace_2.0-3 rvest_1.0.2 ggrepel_0.9.2
[25] haven_2.5.0 crayon_1.5.2 RCurl_1.98-1.8
[28] jsonlite_1.8.3 progressr_0.11.0 spatstat.data_3.0-0
[31] survival_3.4-0 zoo_1.8-11 glue_1.6.2
[34] polyclip_1.10-4 gtable_0.3.1 gargle_1.2.1
[37] zlibbioc_1.36.0 XVector_0.30.0 leiden_0.4.3
[40] DelayedArray_0.16.3 future.apply_1.10.0 abind_1.4-5
[43] DBI_1.1.3 spatstat.random_3.0-1 miniUI_0.1.1.1
[46] viridisLite_0.4.1 xtable_1.8-4 reticulate_1.25
[49] htmlwidgets_1.5.4 httr_1.4.4 ellipsis_0.3.2
[52] ica_1.0-3 pkgconfig_2.0.3 uwot_0.1.14
[55] dbplyr_2.2.1 deldir_1.0-6 utf8_1.2.2
[58] tidyselect_1.2.0 rlang_1.0.6 later_1.3.0
[61] munsell_0.5.0 cellranger_1.1.0 tools_4.0.5
[64] cli_3.4.1 generics_0.1.3 broom_1.0.1
[67] ggridges_0.5.4 fastmap_1.1.0 goftest_1.2-3
[70] fs_1.5.2 fitdistrplus_1.1-8 RANN_2.6.1
[73] pbapply_1.6-0 future_1.29.0 nlme_3.1-159
[76] mime_0.12 xml2_1.3.3 compiler_4.0.5
[79] plotly_4.10.1 png_0.1-8 spatstat.utils_3.0-1
[82] reprex_2.0.1 stringi_1.7.8 lattice_0.20-45
[85] Matrix_1.5-3 vctrs_0.4.1 pillar_1.8.1
[88] lifecycle_1.0.1 spatstat.geom_3.0-3 lmtest_0.9-40
[91] RcppAnnoy_0.0.20 cowplot_1.1.1 bitops_1.0-7
[94] irlba_2.3.5.1 httpuv_1.6.2 patchwork_1.1.2
[97] R6_2.5.1 promises_1.2.0.1 KernSmooth_2.23-20
[100] gridExtra_2.3 parallelly_1.32.1 codetools_0.2-18
[103] MASS_7.3-58.1 assertthat_0.2.1 withr_2.5.0
[106] sctransform_0.3.5 GenomeInfoDbData_1.2.4 hms_1.1.2
[109] grid_4.0.5 googledrive_2.0.0 Rtsne_0.16
[112] spatstat.explore_3.0-5 shiny_1.7.3 lubridate_1.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant