Giter VIP home page Giter VIP logo

apear's Introduction

aPEAR: an R package for enrichment network visualisation

Alt text

Citation

If you use this package in your research, please cite:

Kerseviciute I, Gordevicius J. aPEAR: an R package for autonomous visualisation of pathway enrichment networks. BioRxiv. 2023 Mar 29; doi: 10.1101/2023.03.28.534514

Installation

Install latest stable version

library(devtools)
install_github('ievaKer/aPEAR')

Install latest beta version

library(devtools)
install_github('ievaKer/aPEAR@development')

Run an example

library(aPEAR)
library(clusterProfiler)
library(org.Hs.eg.db)
library(DOSE)
data(geneList)

enrich <- gseGO(geneList, OrgDb = org.Hs.eg.db, ont = 'CC')
p <- enrichmentNetwork(enrich@result, drawEllipses = TRUE, fontSize = 2.5)

p

Plotly integration

To create interactive plots, use plotly:

library(plotly)

ggplotly(p, tooltip=c('ID', 'Cluster', 'Cluster size'))

apear's People

Contributors

kerseviciute avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

apear's Issues

License specification is missing

For the package to be usable, license specification is required. Currently, DESCRIPTION file contains mostly placeholder values, including:

License: What license is it under?

It would be nice to have a F/LOSS license for this package (i.e., BSD-3-Clause, MIT, LGPL-v3 just to name a few).

How to remove the text on the graph nodes?

Thank you for providing such a good interactive plotting method to visualize the enrichment results. However, I would like to hide/remove the text on the graph nodes, how can I realize this? It seems not work when I set the fontSize=0.

The text is not fully displayed in the output of the "enrichmentNetwork."

Hi,
Thank you for creating such a useful package.

I have a straightforward question to ask you.
After running the function “enrichmentNetwork”, the text in the output PDF file exceeds the boundaries of the image and cannot be fully displayed. How can this issue be resolved?

I look forward to your reply.
Jeff

error when using "spectral"

library(Spectrum)
enrichmentNetwork(enrich@result,
clustMethod = as.character("spectral"),
drawEllipses = T,
fontSize = 2.5,
repelLabels = T
)

Error in as.character(package) :
cannot coerce type 'closure' to vector of type 'character'

Thank you in advance. How to fix this problem?

R version 4.2.3 (2023-03-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Ventura 13.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base

other attached packages:
[1] Spectrum_1.1 plotly_4.10.1 forcats_1.0.0
[4] stringr_1.5.0 dplyr_1.1.0 purrr_1.0.1
[7] readr_2.1.3 tidyr_1.3.0 tibble_3.1.8
[10] ggplot2_3.4.2 tidyverse_1.3.2 DOSE_3.24.2
[13] org.Hs.eg.db_3.15.0 AnnotationDbi_1.60.0 IRanges_2.32.0
[16] S4Vectors_0.36.1 Biobase_2.58.0 BiocGenerics_0.44.0
[19] clusterProfiler_4.6.0 aPEAR_1.0

loaded via a namespace (and not attached):
[1] readxl_1.4.1 shadowtext_0.1.2 backports_1.4.1
[4] fastmatch_1.1-3 plyr_1.8.8 igraph_1.3.5
[7] lazyeval_0.2.2 splines_4.2.3 gmp_0.6-10
[10] crosstalk_1.2.0 BiocParallel_1.32.5 SnowballC_0.7.0
[13] MCL_1.0 GenomeInfoDb_1.34.9 digest_0.6.31
[16] foreach_1.5.2 yulab.utils_0.0.6 htmltools_0.5.4
[19] GOSemSim_2.24.0 viridis_0.6.2 GO.db_3.15.0
[22] arules_1.7-6 fansi_1.0.4 magrittr_2.0.3
[25] memoise_2.0.1 googlesheets4_1.0.1 tzdb_0.3.0
[28] Biostrings_2.66.0 graphlayouts_0.8.4 modelr_0.1.10
[31] timechange_0.2.0 enrichplot_1.18.3 colorspace_2.1-0
[34] rvest_1.0.3 blob_1.2.3 ggrepel_0.9.3
[37] haven_2.5.1 xfun_0.37 crayon_1.5.2
[40] RCurl_1.98-1.10 jsonlite_1.8.4 scatterpie_0.1.8
[43] iterators_1.0.14 ape_5.6-2 glue_1.6.2
[46] polyclip_1.10-4 gtable_0.3.1 gargle_1.3.0
[49] zlibbioc_1.44.0 XVector_0.38.0 RcppZiggurat_0.1.6
[52] scales_1.2.1 DBI_1.1.3 Rcpp_1.0.10
[55] viridisLite_0.4.1 gridGraphics_0.5-1 tidytree_0.4.2
[58] bit_4.0.5 htmlwidgets_1.6.1 httr_1.4.4
[61] fgsea_1.24.0 RColorBrewer_1.1-3 ellipsis_0.3.2
[64] ClusterR_1.3.1 pkgconfig_2.0.3 farver_2.1.1
[67] dbplyr_2.3.0 utf8_1.2.3 labeling_0.4.2
[70] ggplotify_0.1.0 tidyselect_1.2.0 rlang_1.1.1
[73] reshape2_1.4.4 munsell_0.5.0 cellranger_1.1.0
[76] tools_4.2.3 cachem_1.0.6 downloader_0.4
[79] cli_3.6.0 generics_0.1.3 RSQLite_2.2.20
[82] gson_0.0.9 bayesbio_1.0.0 broom_1.0.3
[85] evaluate_0.20 fastmap_1.1.0 yaml_2.3.7
[88] ggtree_3.6.2 knitr_1.42 bit64_4.0.5
[91] fs_1.6.0 tidygraph_1.2.3 KEGGREST_1.38.0
[94] ggraph_2.1.0 nlme_3.1-162 aplot_0.1.9
[97] xml2_1.3.3 compiler_4.2.3 rstudioapi_0.14
[100] png_0.1-8 reprex_2.0.2 treeio_1.22.0
[103] tweenr_2.0.2 stringi_1.7.12 lattice_0.20-45
[106] Matrix_1.5-3 vctrs_0.5.2 pillar_1.8.1
[109] lifecycle_1.0.3 data.table_1.14.6 cowplot_1.1.1
[112] bitops_1.0-7 patchwork_1.1.2 qvalue_2.30.0
[115] R6_2.5.1 gridExtra_2.3 lsa_0.73.3
[118] codetools_0.2-19 MASS_7.3-58.2 assertthat_0.2.1
[121] withr_2.5.0 GenomeInfoDbData_1.2.9 diptest_0.76-0
[124] expm_0.999-7 parallel_4.2.3 hms_1.1.2
[127] grid_4.2.3 ggfun_0.0.9 HDO.db_0.99.1
[130] Rfast_2.0.7 rmarkdown_2.20 googledrive_2.0.0
[133] ggforce_0.4.1 lubridate_1.9.1

Visualize a subset of clusters

  • add an option to visualize only a subset of clusters (would that change clustering results?)
  • pass clusters and pathways which need to be visualized
  • make sure the methods work with a small number of pathways

Legend

Add size and color legends.

Error in findPathClusters(enrich, cluster = "hier", minClusterSize = 3) : could not find function "findPathClusters"

I am using aPEAR in Rstudio, with the version aPEAR_1.0. It worked perfectly in a cloud computing env. However, in Rstudio, when I tried to use findPathClusters, I got the error telling me the function could not be found. I wonder if you could advise in this regard.

versions is as follows:

R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base

other attached packages:
[1] org.Hs.eg.db_3.18.0 AnnotationDbi_1.64.1 IRanges_2.36.0 S4Vectors_0.40.2 Biobase_2.62.0 BiocGenerics_0.48.1 DOSE_3.28.2
[8] clusterProfiler_4.10.0 stringr_1.5.1 ggplot2_3.4.4 data.table_1.14.10 aPEAR_1.0 dplyr_1.1.4 Seurat_5.0.1
[15] SeuratObject_5.0.1 sp_2.1-2 devtools_2.4.5 usethis_2.2.2

loaded via a namespace (and not attached):
[1] RcppAnnoy_0.0.21 splines_4.3.2 later_1.3.2 ggplotify_0.1.2 bitops_1.0-7 tibble_3.2.1 polyclip_1.10-6
[8] fastDummies_1.7.3 lifecycle_1.0.4 globals_0.16.2 lattice_0.21-9 MASS_7.3-60 SnowballC_0.7.1 magrittr_2.0.3
[15] plotly_4.10.3 remotes_2.4.2.1 httpuv_1.6.13 sctransform_0.4.1 spam_2.10-0 sessioninfo_1.2.2 pkgbuild_1.4.3
[22] spatstat.sparse_3.0-3 reticulate_1.34.0 cowplot_1.1.2 pbapply_1.7-2 DBI_1.2.0 RColorBrewer_1.1-3 abind_1.4-5
[29] pkgload_1.3.3 zlibbioc_1.48.0 expm_0.999-8 Rtsne_0.17 purrr_1.0.2 ggraph_2.1.0 RCurl_1.98-1.13
[36] yulab.utils_0.1.2 tweenr_2.0.2 GenomeInfoDbData_1.2.11 enrichplot_1.22.0 arules_1.7-7 ggrepel_0.9.4 irlba_2.3.5.1
[43] listenv_0.9.0 spatstat.utils_3.0-4 tidytree_0.4.6 goftest_1.2-3 RSpectra_0.16-1 spatstat.random_3.2-2 fitdistrplus_1.1-11
[50] parallelly_1.36.0 leiden_0.4.3.1 codetools_0.2-19 ggforce_0.4.1 tidyselect_1.2.0 aplot_0.2.2 farver_2.1.1
[57] viridis_0.6.4 matrixStats_1.2.0 spatstat.explore_3.2-5 jsonlite_1.8.8 tidygraph_1.3.0 ellipsis_0.3.2 progressr_0.14.0
[64] ggridges_0.5.5 survival_3.5-7 iterators_1.0.14 foreach_1.5.2 tools_4.3.2 treeio_1.26.0 ica_1.0-3
[71] Rcpp_1.0.11 glue_1.6.2 gridExtra_2.3 qvalue_2.34.0 GenomeInfoDb_1.38.2 withr_2.5.2 BiocManager_1.30.22
[78] fastmap_1.1.1 fansi_1.0.6 digest_0.6.33 gridGraphics_0.5-1 R6_2.5.1 mime_0.12 colorspace_2.1-0
[85] GO.db_3.18.0 scattermore_1.2 tensor_1.5 spatstat.data_3.0-3 RSQLite_2.3.4 utf8_1.2.4 tidyr_1.3.0
[92] generics_0.1.3 graphlayouts_1.0.2 httr_1.4.7 htmlwidgets_1.6.4 scatterpie_0.2.1 uwot_0.1.16 MCL_1.0
[99] pkgconfig_2.0.3 gtable_0.3.4 blob_1.2.4 bayesbio_1.0.0 lmtest_0.9-40 XVector_0.42.0 shadowtext_0.1.2
[106] htmltools_0.5.7 fgsea_1.28.0 profvis_0.3.8 dotCall64_1.1-1 scales_1.3.0 png_0.1-8 ggfun_0.1.3
[113] rstudioapi_0.15.0 reshape2_1.4.4 nlme_3.1-163 cachem_1.0.8 zoo_1.8-12 KernSmooth_2.23-22 HDO.db_0.99.1
[120] parallel_4.3.2 miniUI_0.1.1.1 pillar_1.9.0 grid_4.3.2 vctrs_0.6.5 RANN_2.6.1 urlchecker_1.0.1
[127] lsa_0.73.3 promises_1.2.1 xtable_1.8-4 cluster_2.1.4 cli_3.6.2 compiler_4.3.2 rlang_1.1.2
[134] crayon_1.5.2 future.apply_1.11.1 plyr_1.8.9 fs_1.6.3 stringi_1.8.3 BiocParallel_1.36.0 viridisLite_0.4.2
[141] deldir_2.0-2 munsell_0.5.0 Biostrings_2.70.1 lazyeval_0.2.2 spatstat.geom_3.2-7 GOSemSim_2.28.0 Matrix_1.6-4
[148] RcppHNSW_0.5.0 patchwork_1.1.3 bit64_4.0.5 future_1.33.1 KEGGREST_1.42.0 shiny_1.8.0 ROCR_1.0-11
[155] igraph_1.6.0 memoise_2.0.1 ggtree_3.10.0 fastmatch_1.1-4 bit_4.0.5 gson_0.1.0 ape_5.7-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.