GithubHelp home page GithubHelp logo

jmw86069 / venndir Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 0.0 66.77 MB

Venn diagrams with directionality (concordance), optional display of items inside the figure, text Venn diagrams

Home Page: https://jmw86069.github.io/venndir

R 100.00%
concordance text-venn venn-diagram

venndir's People

Contributors

jmw86069 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

venndir's Issues

could not find function "tcount"

Hello,

I followed the installation instruction and test as in the README, I hit an error, please advise, thank you!

library(venndir)
setlist <- make_venn_test(100, 3)
venndir(setlist)
Error in tcount(sign(diff(h1h2df1$h2))) :
could not find function "tcount"
setlist
$set_A
[1] "item_067" "item_042" "item_050" "item_043" "item_014" "item_025"
[7] "item_090" "item_091" "item_069" "item_093" "item_057" "item_009"
[13] "item_072" "item_026" "item_007" "item_099" "item_089" "item_083"
[19] "item_036" "item_078" "item_097" "item_076" "item_015" "item_032"
[25] "item_086" "item_084" "item_041" "item_023" "item_027" "item_060"
[31] "item_053" "item_079"

$set_B
[1] "item_053" "item_027" "item_096" "item_038" "item_089" "item_034"
[7] "item_093" "item_069" "item_072" "item_076" "item_063" "item_013"
[13] "item_082" "item_025" "item_097" "item_021"

$set_C
[1] "item_079" "item_041" "item_047" "item_090" "item_060" "item_095"
[7] "item_016" "item_006" "item_072" "item_086" "item_091" "item_039"
[13] "item_031" "item_081" "item_050"

venndir(setlist)
Error in tcount(sign(diff(h1h2df1$h2))) :
could not find function "tcount"
sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.3.so

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

other attached packages:
[1] venndir_0.0.17.9000 remotes_2.4.0

loaded via a namespace (and not attached):
[1] lattice_0.20-44 ps_1.6.0 prettyunits_1.1.1
[4] crayon_1.4.1 withr_2.4.2 rprojroot_2.0.2
[7] grid_4.1.0 R6_2.5.0 cli_3.0.0
[10] curl_4.3.2 data.table_1.14.0 rstudioapi_0.13
[13] sp_1.4-5 callr_3.7.0 jamba_0.0.70.900
[16] tools_4.1.0 colorjam_0.0.22.900 compiler_4.1.0
[19] processx_3.5.2 pkgbuild_1.2.0

Migrate from sp/rgeos to polyclip

The latest update to the sp and rgeos R packages did in fact remove rgeos from CRAN. Despite a year advance warning, it was not easy to perform a drop-in replacement with the sf package, in part because until recently our linux system was unable to install sf and its myriad dependencies. Something about requiring C++ newer than was available, then something about stdclib needing to be more recent, etc. etc.

The conclusion was to use polyclip instead of sf to fill the same roles: buffer outside/inside a given polygon; distance from point to polygon, nearest polygon, things like that. These functions are available in polyclip and do not require installation of extensive geographic mapping libraries (as with sp and now sf). Also, polyclip is available on older versions of linux.

The task is to migrate venndir functions to use polyclip, thus removing all dependency on sp and rgeos.

No Labels/Text on Venn Diagram

For some reason the labels/text are all missing for the venn diagram. Not sure what is happening. I never managed to get them to show up. The only thing I can think of is: Warning: font family not found in Windows font database

setlist <- make_venn_test(2500, 3,
  sizes=c(400, 500, 200),
  do_signed=TRUE)

venndir(setlist, overlap_type="agreement", proportional=TRUE)

image

setlist <- make_venn_test(2500, 3,
  sizes=c(400, 500, 200),
  do_signed=TRUE)

venndir(setlist)

image

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

Matrix products: default


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

time zone: America/New_York
tzcode source: internal

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

other attached packages:
 [1] farver_2.1.1                colorspace_2.1-0            readr_2.1.5                 tximport_1.30.0            
 [5] org.Mm.eg.db_3.18.0         ensembldb_2.26.0            AnnotationFilter_1.26.0     GenomicFeatures_1.54.1     
 [9] AnnotationDbi_1.64.1        AnnotationHub_3.10.0        BiocFileCache_2.10.1        dbplyr_2.4.0               
[13] venndir_0.0.29.900          GOplot_1.0.2                gridExtra_2.3               scales_1.3.0               
[17] ggsci_3.0.0                 kableExtra_1.3.4.9000       dendextend_1.17.1           ggdendro_0.1.23            
[21] eulerr_7.0.0                ComplexHeatmap_2.18.0       EnhancedVolcano_1.20.0      ggrepel_0.9.4              
[25] pheatmap_1.0.12             enrichplot_1.22.0           bigPint_1.19.1              vsn_3.70.0                 
[29] clusterProfiler_4.10.0      DESeq2_1.42.0               SummarizedExperiment_1.32.0 Biobase_2.62.0             
[33] MatrixGenerics_1.14.0       matrixStats_1.2.0           GenomicRanges_1.54.1        GenomeInfoDb_1.38.5        
[37] IRanges_2.36.0              S4Vectors_0.40.2            BiocGenerics_0.48.1         RColorBrewer_1.1-3         
[41] ggtree_3.10.0               ggfortify_0.4.16            ggplot2_3.4.4               tibble_3.2.1               
[45] dplyr_1.1.4                

loaded via a namespace (and not attached):
  [1] ProtGenerics_1.34.0           fs_1.6.3                      bitops_1.0-7                  sf_1.0-15                    
  [5] HDO.db_0.99.1                 httr_1.4.7                    webshot_0.5.5                 doParallel_1.0.17            
  [9] colorjam_0.0.27.900           tools_4.3.2                   backports_1.4.1               utf8_1.2.4                   
 [13] R6_2.5.1                      lazyeval_0.2.2                GetoptLong_1.0.5              withr_3.0.0                  
 [17] sp_1.6-1                      prettyunits_1.2.0             GGally_2.2.0                  preprocessCore_1.64.0        
 [21] cli_3.6.2                     scatterpie_0.2.1              proxy_0.4-27                  commonmark_1.9.0             
 [25] Rsamtools_2.18.0              systemfonts_1.0.5             yulab.utils_0.1.3             gson_0.1.0                   
 [29] foreign_0.8-86                DOSE_3.28.2                   svglite_2.1.3                 limma_3.58.1                 
 [33] rstudioapi_0.15.0             RSQLite_2.3.4                 generics_0.1.3                gridGraphics_0.5-1           
 [37] shape_1.4.6                   BiocIO_1.12.0                 GO.db_3.18.0                  Matrix_1.6-5                 
 [41] fansi_1.0.6                   abind_1.4-5                   lifecycle_1.0.4               yaml_2.3.8                   
 [45] qvalue_2.34.0                 SparseArray_1.2.3             blob_1.2.4                    promises_1.2.1               
 [49] crayon_1.5.2                  shinydashboard_0.7.2          lattice_0.22-5                cowplot_1.1.2                
 [53] KEGGREST_1.42.0               pillar_1.9.0                  knitr_1.45                    fgsea_1.28.0                 
 [57] rjson_0.2.21                  codetools_0.2-19              fastmatch_1.1-4               glue_1.6.2                   
 [61] ggfun_0.1.3                   data.table_1.14.10            vctrs_0.6.5                   png_0.1-8                    
 [65] treeio_1.26.0                 gtable_0.3.4                  cachem_1.0.8                  xfun_0.41                    
 [69] S4Arrays_1.2.0                mime_0.12                     tidygraph_1.3.0               iterators_1.0.14             
 [73] units_0.8-5                   statmod_1.5.0                 interactiveDisplayBase_1.40.0 ellipsis_0.3.2               
 [77] nlme_3.1-164                  bit64_4.0.5                   progress_1.2.3                filelock_1.0.3               
 [81] affyio_1.72.0                 KernSmooth_2.23-22            rpart_4.1.23                  DBI_1.2.1                    
 [85] rgeos_0.6-4                   Hmisc_5.1-1                   nnet_7.3-19                   tidyselect_1.2.0             
 [89] bit_4.0.5                     compiler_4.3.2                curl_5.2.0                    rvest_1.0.3                  
 [93] htmlTable_2.4.2               xml2_1.3.6                    DelayedArray_0.28.0           plotly_4.10.4                
 [97] shadowtext_0.1.2              rtracklayer_1.62.0            checkmate_2.3.1               classInt_0.4-10              
[101] hexbin_1.28.3                 affy_1.80.0                   rappdirs_0.3.3                stringr_1.5.1                
[105] digest_0.6.33                 rmarkdown_2.25                XVector_0.42.0                htmltools_0.5.7              
[109] pkgconfig_2.0.3               base64enc_0.1-3               fastmap_1.1.1                 rlang_1.1.2                  
[113] GlobalOptions_0.1.2           htmlwidgets_1.6.4             shiny_1.8.0                   jsonlite_1.8.8               
[117] BiocParallel_1.36.0           GOSemSim_2.28.0               RCurl_1.98-1.13               magrittr_2.0.3               
[121] Formula_1.2-5                 GenomeInfoDbData_1.2.11       ggplotify_0.1.2               jamba_0.0.98.900             
[125] patchwork_1.2.0               munsell_0.5.0                 Rcpp_1.0.11                   ape_5.7-1                    
[129] shinycssloaders_1.0.0         viridis_0.6.4                 stringi_1.8.3                 ggraph_2.1.0                 
[133] zlibbioc_1.48.0               MASS_7.3-60.0.1               plyr_1.8.9                    ggstats_0.5.1                
[137] parallel_4.3.2                Biostrings_2.70.1             graphlayouts_1.0.2            splines_4.3.2                
[141] gridtext_0.1.5                hms_1.1.3                     circlize_0.4.15               polylabelr_0.2.0             
[145] locfit_1.5-9.8                igraph_1.6.0                  markdown_1.12                 reshape2_1.4.4               
[149] biomaRt_2.58.0                BiocVersion_3.18.1            XML_3.99-0.16                 evaluate_0.23                
[153] BiocManager_1.30.22           tzdb_0.4.0                    foreach_1.5.2                 tweenr_2.0.2                 
[157] httpuv_1.6.13                 tidyr_1.3.0                   purrr_1.0.2                   polyclip_1.10-6              
[161] reshape_0.8.9                 clue_0.3-65                   gridBase_0.4-7                ggforce_0.4.1                
[165] xtable_1.8-4                  restfulr_0.0.15               e1071_1.7-14                  tidytree_0.4.6               
[169] later_1.3.2                   class_7.3-22                  viridisLite_0.4.2             aplot_0.2.2                  
[173] GenomicAlignments_1.38.0      memoise_2.0.1                 cluster_2.1.6    

Error in explodePolygons(x, ...) : use sf or terra functions)

Hi James,

I'm running into an error when running the example code. Code and session info pasted below. I was hoping you could identify if this is a dependency or other issue. The venndir package appears ideal for what I want to do so it would be great if I could get it working.

Many thanks,
Andrew

--- Code

library(venndir)
Registered S3 method overwritten by 'data.table':
method from
print.data.table
rgeos version: 0.6-4, (SVN revision 699)
GEOS runtime version: 3.8.3-CAPI-1.13.4
Please note that rgeos will be retired during October 2023,
plan transition to sf or terra functions using GEOS at your earliest convenience.
See https://r-spatial.org/r/2023/05/15/evolution4.html for details.
Linking to sp version: 2.1-1
Polygon checking: TRUE
options("warn"=-1)
setlist <- make_venn_test(100, 3)
venndir(setlist)
Error in explodePolygons(x, ...) : use sf or terra functions)

--- sessionInfo()

R version 4.1.1 (2021-08-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /bi/apps/R/4.1.1/lib64/R/lib/libRblas.so
LAPACK: /bi/apps/R/4.1.1/lib64/R/lib/libRlapack.so

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

other attached packages:
[1] farver_2.1.1 matrixStats_1.0.0 colorspace_2.1-0 venndir_0.0.29.900

loaded via a namespace (and not attached):
[1] lattice_0.20-45 digest_0.6.33 grid_4.1.1 evaluate_0.22 rlang_1.1.1
[6] cli_3.6.1 data.table_1.14.8 rstudioapi_0.14 sp_2.1-1 jamba_0.0.96.900
[11] rmarkdown_2.25 tools_4.1.1 colorjam_0.0.27.900 xfun_0.40 yaml_2.3.7
[16] fastmap_1.1.1 compiler_4.1.1 rgeos_0.6-4 htmltools_0.5.6 knitr_1.44

options to avoid printing labels not working

Hi James
I tried to print a 7-lists venn plot. Very nice plot but I need to manually customize the labels with %ages instead of items. I tried to set options about labels and sets printing to "off"
e.g. venndir(setlist, proportional = TRUE, show_items = "none", show_label = "none", display_counts = FALSE,return_items = FALSE , show_set = "none" )
but the picture is still full of contents, as such:
Schermata 2022-10-20 alle 13 27 52
May you check the code please? I tried to wotk on label_df object in the function but unsuccesfully
Many thanks
Luca

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.