{"id":32200964,"url":"https://github.com/mw201608/superexacttest","last_synced_at":"2025-10-22T03:58:01.857Z","repository":{"id":56928367,"uuid":"129310273","full_name":"mw201608/SuperExactTest","owner":"mw201608","description":"Statistical testing and visualization of mult-set intersections","archived":false,"fork":false,"pushed_at":"2023-12-26T16:51:24.000Z","size":1665,"stargazers_count":29,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-22T03:57:48.051Z","etag":null,"topics":["intersection","set","statistics","visualization"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mw201608.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"mw201608"}},"created_at":"2018-04-12T20:56:15.000Z","updated_at":"2025-09-25T18:31:00.000Z","dependencies_parsed_at":"2023-12-26T18:04:36.510Z","dependency_job_id":null,"html_url":"https://github.com/mw201608/SuperExactTest","commit_stats":{"total_commits":69,"total_committers":2,"mean_commits":34.5,"dds":0.04347826086956519,"last_synced_commit":"fa462d6cd11e73fd6b7576b622bda0406dcce2c1"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mw201608/SuperExactTest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mw201608%2FSuperExactTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mw201608%2FSuperExactTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mw201608%2FSuperExactTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mw201608%2FSuperExactTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mw201608","download_url":"https://codeload.github.com/mw201608/SuperExactTest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mw201608%2FSuperExactTest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280376547,"owners_count":26320275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["intersection","set","statistics","visualization"],"created_at":"2025-10-22T03:58:00.767Z","updated_at":"2025-10-22T03:58:01.848Z","avatar_url":"https://github.com/mw201608.png","language":"R","funding_links":["https://github.com/sponsors/mw201608"],"categories":[],"sub_categories":[],"readme":"## SuperExactTest [![CRAN](http://www.r-pkg.org/badges/version/SuperExactTest)](https://cran.r-project.org/package=SuperExactTest) [![Downloads](http://cranlogs.r-pkg.org/badges/SuperExactTest?color=brightgreen)](http://www.r-pkg.org/pkg/SuperExactTest) [![Total downloads]( https://cranlogs.r-pkg.org/badges/grand-total/SuperExactTest?color=brightgreen)](http://www.r-pkg.org/pkg/SuperExactTest)\n\n#### Current version 1.1.2\n\n### Description\n`SuperExactTest` is an R package for statistical testing and visualization of mult-set intersections.\n\n### Installation\n`SuperExactTest` is available from `CRAN` so the simplest way to install in `R` is by running `install.packages(\"SuperExactTest\")`.\n\nTo install the latest update from here in `github`, run `devtools::install_github(\"mw201608/SuperExactTest\")` in `R`.\n\n### Reference\n[Minghui Wang, Yongzhong Zhao, and Bin Zhang (2015) Efficient Test and Visualization of Multi-Set Intersections. *Scientific Reports* 5: 16923.](https://www.nature.com/articles/srep16923)\n\n### Vignette\nDetailed description about the package and sample analysis code is available from `vignette(\"set_html\",package=\"SuperExactTest\")` ([link](examples/set_html.Md)) after installation.\n\n### SuperExactTest shiny\nA shiny application has been deployed at [shinyapps.io](https://network.shinyapps.io/SuperExactTest/) (see also [github](https://github.com/mw201608/SuperExactTest.shiny)), allowing users to run and visualize `SuperExactTest` analysis online.\n\n### Examples\n#### 1 Show selected overlapping elements\n```\nlibrary(SuperExactTest)\nset.seed(1234)\n#generate random strings\nn=400\nr_strings \u003c- do.call(paste0, replicate(5, sample(LETTERS, n, TRUE), FALSE))\ninput=lapply(c(40,60,80,200),function(x,s) sample(s,x),s=r_strings)\nResult=supertest(input,n=n)\n#Plot the intersections with a split y-axis and \n#show elements of the intersections with no more than 20 elements\n#png('examples/ex1.png',width=2000,height=2000,res=300)\nplot(Result, Layout=\"landscape\", sort.by=\"size\", keep=FALSE,\n\tbar.split=c(70,180), show.elements=TRUE, elements.cex=0.7,\n\telements.list=subset(summary(Result)$Table,Observed.Overlap \u003c= 20),\n\tshow.expected.overlap=TRUE,expected.overlap.style=\"hatchedBox\",\n\tcolor.expected.overlap='red')\n#dev.off()\n```\n\u003cimg src=\"examples/ex1.png\" width=\"600\" alt=\"sample output\" /\u003e\n\nAssign discrete colors to denote the sets that are involved in each intersection by setting `color.on` to NULL or a vector of colors.\n```\n#png('examples/ex1color.png',width=2000,height=2000,res=300)\nplot(Result, Layout=\"landscape\", sort.by=\"size\", keep=FALSE,\n\tbar.split=c(70,180), show.elements=TRUE, elements.cex=0.7,\n\telements.list=subset(summary(Result)$Table,Observed.Overlap \u003c= 20),\n\tshow.expected.overlap=TRUE,expected.overlap.style=\"hatchedBox\",\n\tcolor.expected.overlap='red', color.on = NULL)\n#dev.off()\n```\n\n\u003cimg src=\"examples/ex1color.png\" width=\"600\" alt=\"sample output\" /\u003e\n\n#### 2 Sort and/or subset intersection bars for plotting\nAs of version 1.0.7, we can change the order of the intersection bars in a customized way through option `sort.by`.\nFor example, let us switch the orders of the fourth and fifth bars in the above figure.\n```\n#First extract the intersection barcodes ordered by size\norder1=names(sort(Result$overlap.sizes,decreasing=TRUE))\n#Then switch the orders of the fourth and fifth element\norder2=order1[c(1:3,5,4,6:length(order1))]\nprint(order1)\nprint(order2)\n#Now plot with the new order\n#png('examples/ex2.png',width=2000,height=2000,res=300)\nplot(Result, Layout=\"landscape\", sort.by=order2, keep=FALSE,\n        bar.split=c(70,180), show.elements=TRUE, elements.cex=0.7,\n        elements.list=subset(summary(Result)$Table,Observed.Overlap \u003c= 20),\n        show.expected.overlap=TRUE,expected.overlap.style=\"hatchedBox\",\n        color.expected.overlap='red', color.on = NULL)\n#dev.off()\n```\n\u003cimg src=\"examples/ex2.png\" width=\"600\" alt=\"sample output\" /\u003e\n\n\nWith this option `sort.by`, we can also show a subset of the intersection bars easily. Eg, let us plot the 10 largest overlaps.\n```\norder3=order1[1:10]\n#png('examples/ex2b.png',width=2000,height=2000,res=300)\nplot(Result, Layout=\"landscape\", sort.by=order3,\n        bar.split=c(70,180), show.elements=TRUE, elements.cex=0.7,\n        elements.list=subset(summary(Result)$Table,Observed.Overlap \u003c= 20),\n        show.expected.overlap=TRUE,expected.overlap.style=\"hatchedBox\",\n        color.expected.overlap='red', color.on = NULL)\n#dev.off()\n```\n\u003cimg src=\"examples/ex2b.png\" width=\"600\" alt=\"sample output\" /\u003e\n\n#### 3 Flip the bars upside down\nWe can also flip the bars upside down using option flip.vertical=TRUE.\n```\n#png('examples/ex3.png',width=2000,height=2000,res=300)\nplot(Result, Layout=\"landscape\", sort.by=order2, keep=FALSE,\n        bar.split=c(70,180), show.elements=TRUE, elements.cex=0.7,\n        elements.list=subset(summary(Result)$Table,Observed.Overlap \u003c= 20),\n        show.expected.overlap=TRUE,expected.overlap.style=\"hatchedBox\",\n        color.expected.overlap='red', color.on = NULL, flip.vertical=TRUE)\n#dev.off()\n```\n\u003cimg src=\"examples/ex3.png\" width=\"600\" alt=\"sample output\" /\u003e\n\n#### 4 Show fold enrichment\nShow fold enrichment rather than overlp size on top of the bars (since v1.0.7.1).\n```\n#png('examples/ex4.png',width=2000,height=2000,res=300)\nplot(Result, Layout=\"landscape\", sort.by=order2, keep=FALSE,\n        bar.split=c(70,180), show.elements=TRUE, elements.cex=0.7,\n\t\tshow.fold.enrichment=TRUE,\n\t\telements.list=subset(summary(Result)$Table,Observed.Overlap \u003c= 20),elements.rot=45,\n        show.expected.overlap=TRUE,expected.overlap.style=\"hatchedBox\",\n        color.expected.overlap='red', color.on = NULL)\n#dev.off()\n```\n\u003cimg src=\"examples/ex4.png\" width=\"600\" alt=\"sample output\" /\u003e\n\n#### 5 Place multiple SuperExactTest plots on the same page\nWe can combine multiple SuperExactTest plots on the same page by setting new.gridPage = FALSE. For example, to arrange two SuperExactTest figures side by side, we can:\n```\n#png('examples/ex5.png',width=4000,height=2000,res=300)\ngrid.newpage()\nvp0 \u003c- viewport(layout = grid.layout(1, 2))\nvp1 \u003c- viewport(layout.pos.col = 1, layout.pos.row = 1, name = \"plot_left\")\nvp2 \u003c- viewport(layout.pos.col = 2, layout.pos.row = 1, name = \"plot_right\")\nvps \u003c- vpTree(vp0, vpList(vp1, vp2))\npushViewport(vps)\nseekViewport(\"plot_left\")\nplot(Result, Layout=\"landscape\", sort.by='size', keep=FALSE,\n        bar.split=c(70,180), show.fold.enrichment=TRUE,\n        show.expected.overlap=TRUE, expected.overlap.style=\"hatchedBox\",\n        color.expected.overlap='red', color.on = NULL,\n        title = 'Figure A. Landscape layout', new.gridPage = FALSE)\nseekViewport(\"plot_right\")\nplot(Result, Layout=\"circular\", sort.by='size', keep=FALSE,\n        show.expected.overlap=TRUE,expected.overlap.style=\"hatchedBox\",\n        color.expected.overlap='red', color.on = NULL,\n        title = 'Figure B. Circular layout', new.gridPage = FALSE)\n#dev.off()\n```\n\u003cimg src=\"examples/ex5.png\" width=\"1000\" alt=\"sample output\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmw201608%2Fsuperexacttest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmw201608%2Fsuperexacttest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmw201608%2Fsuperexacttest/lists"}