Closed matasV99 closed 3 years ago
Hi @matasV99
It looks like this is more of a general question about how to make a shiny app in R. Unfortunately we don't have the bandwidth to help with general R queries like this, I'd suggest asking for help on a site like stackoverflow. You can also look at the code for CoverageBrowser to see how I did it in Signac.
If you want to create a web app, a better approach might be to create separate bigwig files for each cell type and use IGV.js or Jbrowse2, which will be much more responsive and easier to deploy. You can do this using the FilterCells()
function to create a separate fragment file for each group of cells, and then convert to bedgraph and bigwig format. The advantage of CoveragePlot is that it allows cells to be dynamically grouped into different groups in an interactive session. For a public web app, you probably have a fixed set of cell groupings that you're interested in (cell type annotations or cell clusters for example).
Tldr: How would I put coveragebrowser or CoveragePlot() on a shiny app to share online?
More detailed explanation: I am trying to build a shiny app that visualizes ATAC tracks for different sub-types of my data as well as visualize RNAseq gene expression data of target gene with CoveragePlot(). I would like to have TextInputs define the feature, region, extend.upstream and extend.downstream parameters of CoveragePlot().
I am going to try my best to reproduce my problem using a pbmc Seurat object from this vignette: https://satijalab.org/signac/articles/pbmc_vignette.html
Here is the script to generate the Seurat object I want to use for my shiny app:
Here is my app.R . I would like to have TextInputs define the feature, region, extend.upstream and extend.downstream parameters of CoveragePlot() instead of the manually typed out parameters here.
Here is what the output looks like: I would like it to have customizable text inputs that would be fed to the function:
Here is sessionInfo() R version 4.0.1 (2020-06-06) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core) Matrix products: default BLAS/LAPACK: /n/app/openblas/0.2.19/lib/libopenblas_core2p-r0.2.19.so locale: [1] C attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages: [1] EnsDb.Hsapiens.v75_2.99.0 ensembldb_2.14.1 AnnotationFilter_1.14.0 GenomicFeatures_1.42.3
[5] AnnotationDbi_1.52.0 Biobase_2.50.0 GenomicRanges_1.42.0 patchwork_1.1.1
[9] GenomeInfoDb_1.26.7 IRanges_2.24.1 S4Vectors_0.28.1 BiocGenerics_0.36.1
[13] ggplot2_3.3.5 Signac_1.3.0 SeuratObject_4.0.2 Seurat_4.0.3
[17] shiny_1.6.0
loaded via a namespace (and not attached): [1] utf8_1.2.1 reticulate_1.20 tidyselect_1.1.1 RSQLite_2.2.7
[5] htmlwidgets_1.5.3 grid_4.0.1 docopt_0.7.1 BiocParallel_1.24.1
[9] Rtsne_0.15 munsell_0.5.0 codetools_0.2-16 ica_1.0-2
[13] future_1.21.0 miniUI_0.1.1.1 withr_2.4.2 colorspace_2.0-2
[17] knitr_1.33 rstudioapi_0.13 ROCR_1.0-11 tensor_1.5
[21] listenv_0.8.0 labeling_0.4.2 MatrixGenerics_1.2.1 slam_0.1-48
[25] GenomeInfoDbData_1.2.4 polyclip_1.10-0 bit64_4.0.5 farver_2.1.0
[29] parallelly_1.27.0 vctrs_0.3.8 generics_0.1.0 xfun_0.24
[33] biovizBase_1.38.0 BiocFileCache_1.14.0 lsa_0.73.2 ggseqlogo_0.1
[37] R6_2.5.0 hdf5r_1.3.3 bitops_1.0-7 spatstat.utils_2.2-0
[41] cachem_1.0.5 DelayedArray_0.16.3 assertthat_0.2.1 promises_1.2.0.1
[45] scales_1.1.1 nnet_7.3-14 gtable_0.3.0 globals_0.14.0
[49] goftest_1.2-2 rlang_0.4.11 RcppRoll_0.3.0 splines_4.0.1
[53] rtracklayer_1.50.0 lazyeval_0.2.2 dichromat_2.0-0 checkmate_2.0.0
[57] spatstat.geom_2.2-0 BiocManager_1.30.16 reshape2_1.4.4 abind_1.4-5
[61] backports_1.2.1 httpuv_1.6.1 Hmisc_4.5-0 tools_4.0.1
[65] ellipsis_0.3.2 spatstat.core_2.2-0 RColorBrewer_1.1-2 ggridges_0.5.3
[69] Rcpp_1.0.7 plyr_1.8.6 base64enc_0.1-3 progress_1.2.2
[73] zlibbioc_1.36.0 purrr_0.3.4 RCurl_1.98-1.3 prettyunits_1.1.1
[77] rpart_4.1-15 openssl_1.4.4 deldir_0.2-10 pbapply_1.4-3
[81] cowplot_1.1.1 zoo_1.8-9 SummarizedExperiment_1.20.0 ggrepel_0.9.1
[85] cluster_2.1.0 magrittr_2.0.1 RSpectra_0.16-0 data.table_1.14.0
[89] scattermore_0.7 lmtest_0.9-38 RANN_2.6.1 SnowballC_0.7.0
[93] ProtGenerics_1.22.0 fitdistrplus_1.1-5 matrixStats_0.59.0 hms_1.1.0
[97] mime_0.11 xtable_1.8-4 XML_3.99-0.6 jpeg_0.1-8.1
[101] sparsesvd_0.2 gridExtra_2.3 compiler_4.0.1 biomaRt_2.46.3
[105] tibble_3.1.2 KernSmooth_2.23-17 crayon_1.4.1 htmltools_0.5.1.1
[109] mgcv_1.8-31 later_1.2.0 Formula_1.2-4 tidyr_1.1.3
[113] DBI_1.1.1 tweenr_1.0.2 dbplyr_2.1.1 MASS_7.3-51.6
[117] rappdirs_0.3.3 Matrix_1.3-4 igraph_1.2.6 pkgconfig_2.0.3
[121] GenomicAlignments_1.26.0 foreign_0.8-80 plotly_4.9.4.1 spatstat.sparse_2.0-0
[125] xml2_1.3.2 XVector_0.30.0 VariantAnnotation_1.36.0 stringr_1.4.0
[129] digest_0.6.27 sctransform_0.3.2 RcppAnnoy_0.0.18 spatstat.data_2.1-0
[133] Biostrings_2.58.0 leiden_0.3.8 fastmatch_1.1-0 htmlTable_2.2.1
[137] uwot_0.1.10 curl_4.3.2 Rsamtools_2.6.0 lifecycle_1.0.0
[141] nlme_3.1-148 jsonlite_1.7.2 BSgenome_1.58.0 viridisLite_0.4.0
[145] askpass_1.1 fansi_0.5.0 pillar_1.6.1 lattice_0.20-41
[149] fastmap_1.1.0 httr_1.4.2 survival_3.1-12 glue_1.4.2
[153] qlcMatrix_0.9.7 png_0.1-7 bit_4.0.4 ggforce_0.3.3
[157] stringi_1.7.3 blob_1.2.1 latticeExtra_0.6-29 memoise_2.0.0
[161] dplyr_1.0.7 irlba_2.3.3 future.apply_1.7.0
N.B. an alternative to using CoveragePlot() would be to use a shiny app made by the Satija lab called CoverageBrowser() . My question then would be - how do I make CoverageBrowser() into a web app?