sleuth
sleuth copied to clipboard
scatter plots -> Error in as.data.frame.default
Hi
When I run sleuth_live(so), the tab for "scatter plots" gives this error (only for the first plot):
Error in as.data.frame.default: cannot coerce class "c("quosure", "formula")" to a data.frame
How can I solve this problem?
Thanks Sara
Hi @smovahedi,
I am not reproducing this error on my end. A few questions:
- To be clear, the plot getting the error is the top one? And it never goes away no matter what inputs you give?
- Do you still have an error if you do the plot function directly? What happens if you do
plot_scatter(so)
orplot_vars(so)
? - What's your sessionInfo() output?
- Can you print out the result of this command:
dplyr::as_tibble(so$sample_to_covariates)
?
Hi @warrenmcg
- yes only the top one, and this is my only problem. I didn't try other data!
- plot_scatter(so) and plot_vars(so) both generate plots without any problem.
- here it is:
sessionInfo() R version 3.4.0 (2017-04-21) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 14.04.5 LTS
Matrix products: default BLAS: /home/BLA/programs/R/R-3.4.0/lib/R/lib/libRblas.so LAPACK: /home/BLA/programs/R/R-3.4.0/lib/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] 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
[7] LC_PAPER=nl_NL.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=nl_NL.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets [8] methods base
other attached packages:
[1] SomaticSignatures_2.10.0 VariantAnnotation_1.20.3
[3] Rsamtools_1.26.2 Biostrings_2.42.1
[5] XVector_0.14.1 SummarizedExperiment_1.4.0
[7] Biobase_2.34.0 GenomicRanges_1.26.4
[9] GenomeInfoDb_1.10.3 IRanges_2.8.2
[11] S4Vectors_0.12.2 BiocGenerics_0.20.0
[13] BiocInstaller_1.24.0 shiny_1.1.0
[15] bindrcpp_0.2.2 cowplot_0.9.3
[17] ggplot2_3.0.0 sleuth_0.30.0
loaded via a namespace (and not attached):
[1] colorspace_1.3-2 biovizBase_1.22.0
[3] htmlTable_1.12 base64enc_0.1-3
[5] dichromat_2.0-0 proxy_0.4-22
[7] rstudioapi_0.7 bit64_0.9-7
[9] interactiveDisplayBase_1.12.0 AnnotationDbi_1.36.2
[11] codetools_0.2-15 splines_3.4.0
[13] ggbio_1.22.4 doParallel_1.0.11
[15] knitr_1.20 Formula_1.2-3
[17] jsonlite_1.5 Cairo_1.5-9
[19] gridBase_0.4-7 cluster_2.0.7-1
[21] pheatmap_1.0.10 graph_1.52.0
[23] compiler_3.4.0 httr_1.3.1
[25] backports_1.1.2 assertthat_0.2.0
[27] Matrix_1.2-14 lazyeval_0.2.1
[29] later_0.7.3 acepack_1.4.1
[31] htmltools_0.3.6 tools_3.4.0
[33] gtable_0.2.0 glue_1.3.0
[35] reshape2_1.4.3 dplyr_0.7.6
[37] Rcpp_0.12.17 NMF_0.21.0
[39] rtracklayer_1.34.2 iterators_1.0.10
[41] stringr_1.3.1 mime_0.5
[43] ensembldb_1.6.2 rngtools_1.3.1
[45] XML_3.98-1.12 AnnotationHub_2.6.5
[47] zlibbioc_1.20.0 scales_0.5.0
[49] BSgenome_1.42.0 pcaMethods_1.66.0
[51] promises_1.0.1 RBGL_1.50.0
[53] rhdf5_2.18.0 RColorBrewer_1.1-2
[55] yaml_2.1.19 memoise_1.1.0
[57] gridExtra_2.3 pkgmaker_0.27
[59] biomaRt_2.30.0 rpart_4.1-13
[61] reshape_0.8.7 latticeExtra_0.6-28
[63] stringi_1.2.3 RSQLite_2.1.1
[65] foreach_1.4.4 checkmate_1.8.5
[67] GenomicFeatures_1.26.4 bibtex_0.4.2
[69] BiocParallel_1.8.2 rlang_0.2.1
[71] pkgconfig_2.0.1 bitops_1.0-6
[73] lattice_0.20-35 purrr_0.2.5
[75] bindr_0.1.1 GenomicAlignments_1.10.1
[77] htmlwidgets_1.2 labeling_0.3
[79] bit_1.1-14 tidyselect_0.2.4
[81] GGally_1.4.0 plyr_1.8.4
[83] magrittr_1.5 R6_2.2.2
[85] Hmisc_4.1-1 DBI_1.0.0
[87] pillar_1.3.0 foreign_0.8-70
[89] withr_2.1.2 survival_2.42-6
[91] RCurl_1.95-4.11 nnet_7.3-12
[93] tibble_1.4.2 crayon_1.3.4
[95] OrganismDbi_1.16.0 grid_3.4.0
[97] data.table_1.11.4 blob_1.1.1
[99] digest_0.6.15 xtable_1.8-2
[101] tidyr_0.8.1 httpuv_1.4.5
[103] munsell_0.5.0 registry_0.5
[105] tcltk_3.4.0
- here is what I get:
A tibble: 10 x 2
sample protocol
1 RNAseq01 B
2 RNAseq02 B
3 RNAseq03 B
4 RNAseq04 B
5 RNAseq05 B
6 RNAseq06 KE
7 RNAseq07 KE
8 RNAseq08 KE
9 RNAseq09 KE
10 RNAseq10 KE
Hi @smovahedi,
I am not reproducing this error using the same set of package versions, but with R 3.3, so either it has something to do with R 3.4 or an unusual clash of variables. Two additional questions:
- When you get the error in
sleuth_live
, what does the full traceback on the console say? - Could you print out the result of
ls()
?
Hi @warrenmcg
- this is what I get:
sleuth_live(so)
Listening on http://127.0.0.*** Warning: Error in as.data.frame.default: cannot coerce class "c("quosure", "formula")" to a data.frame [No stack trace available]
-
ls() [1] "base_dir" "diff_exp" "kal_dirs" "maxb"
[5] "minb" "results_ordered" "results_table" "s2c"
[9] "s2c_table" "sample_id" "so" "t2g"
Hi @smovahedi,
Apologies for the long delay in responding. I have reproduced the error, and I have identified the problem. We will work on a patch for the next release. As soon as the patch is ready, I'll let you know how you can test the devel version with the patch included.
Ok, I have working patch ready for you to use @smovahedi.
To use this version of sleuth, do the following:
library(devtools)
install_github('warrenmcg/sleuth', ref = 'd733061') # edited with correct commit
That should install the patched version of sleuth that fixes your problem. This has all known shiny errors fixed, so give it a whirl and let us know if it works for you!
Sorry for reviving this, but has this fix been added to the main sleuth release yet?
I am just encountering the same error trying to generate diagnostic scatter plots in sleuth_live (along with a bunch of others elsewhere that I am busy troubleshooting).
Currently working in R 4.03
I am also seeing this error, R 4.04, even after installing the commit referenced above...
Console traceback: Warning: Error in as.data.frame.default: cannot coerce class ‘c("quosure", "formula")’ to a data.frame 174: stop 173: as.data.frame.default 171: data.frame 170: renderPlot 168: func 128: drawPlot 114: reactive:plotObj 98: drawReactive 85: renderFunc 84: output$scatter 4: runApp 3: print.shiny.appobj 1: source