SuperExactTest
Statistical testing and visualization of mult-set intersections
Science Score: 20.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: nature.com -
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Keywords
Repository
Statistical testing and visualization of mult-set intersections
Statistics
- Stars: 28
- Watchers: 2
- Forks: 5
- Open Issues: 0
- Releases: 3
Topics
Metadata Files
README.md
SuperExactTest

Current version 1.1.2
Description
SuperExactTest is an R package for statistical testing and visualization of mult-set intersections.
Installation
SuperExactTest is available from CRAN so the simplest way to install in R is by running install.packages("SuperExactTest").
To install the latest update from here in github, run devtools::install_github("mw201608/SuperExactTest") in R.
Reference
Vignette
Detailed description about the package and sample analysis code is available from vignette("set_html",package="SuperExactTest") (link) after installation.
SuperExactTest shiny
A shiny application has been deployed at shinyapps.io (see also github), allowing users to run and visualize SuperExactTest analysis online.
Examples
1 Show selected overlapping elements
``` library(SuperExactTest) set.seed(1234)
generate random strings
n=400 rstrings <- do.call(paste0, replicate(5, sample(LETTERS, n, TRUE), FALSE)) input=lapply(c(40,60,80,200),function(x,s) sample(s,x),s=rstrings) Result=supertest(input,n=n)
Plot the intersections with a split y-axis and
show elements of the intersections with no more than 20 elements
png('examples/ex1.png',width=2000,height=2000,res=300)
plot(Result, Layout="landscape", sort.by="size", keep=FALSE, bar.split=c(70,180), show.elements=TRUE, elements.cex=0.7, elements.list=subset(summary(Result)$Table,Observed.Overlap <= 20), show.expected.overlap=TRUE,expected.overlap.style="hatchedBox", color.expected.overlap='red')
dev.off()
```

Assign discrete colors to denote the sets that are involved in each intersection by setting color.on to NULL or a vector of colors.
```
png('examples/ex1color.png',width=2000,height=2000,res=300)
plot(Result, Layout="landscape", sort.by="size", keep=FALSE, bar.split=c(70,180), show.elements=TRUE, elements.cex=0.7, elements.list=subset(summary(Result)$Table,Observed.Overlap <= 20), show.expected.overlap=TRUE,expected.overlap.style="hatchedBox", color.expected.overlap='red', color.on = NULL)
dev.off()
```

2 Sort and/or subset intersection bars for plotting
As of version 1.0.7, we can change the order of the intersection bars in a customized way through option sort.by.
For example, let us switch the orders of the fourth and fifth bars in the above figure.
```
First extract the intersection barcodes ordered by size
order1=names(sort(Result$overlap.sizes,decreasing=TRUE))
Then switch the orders of the fourth and fifth element
order2=order1[c(1:3,5,4,6:length(order1))] print(order1) print(order2)
Now plot with the new order
png('examples/ex2.png',width=2000,height=2000,res=300)
plot(Result, Layout="landscape", sort.by=order2, keep=FALSE, bar.split=c(70,180), show.elements=TRUE, elements.cex=0.7, elements.list=subset(summary(Result)$Table,Observed.Overlap <= 20), show.expected.overlap=TRUE,expected.overlap.style="hatchedBox", color.expected.overlap='red', color.on = NULL)
dev.off()
```

With this option sort.by, we can also show a subset of the intersection bars easily. Eg, let us plot the 10 largest overlaps.
```
order3=order1[1:10]
png('examples/ex2b.png',width=2000,height=2000,res=300)
plot(Result, Layout="landscape", sort.by=order3, bar.split=c(70,180), show.elements=TRUE, elements.cex=0.7, elements.list=subset(summary(Result)$Table,Observed.Overlap <= 20), show.expected.overlap=TRUE,expected.overlap.style="hatchedBox", color.expected.overlap='red', color.on = NULL)
dev.off()
```

3 Flip the bars upside down
We can also flip the bars upside down using option flip.vertical=TRUE. ```
png('examples/ex3.png',width=2000,height=2000,res=300)
plot(Result, Layout="landscape", sort.by=order2, keep=FALSE, bar.split=c(70,180), show.elements=TRUE, elements.cex=0.7, elements.list=subset(summary(Result)$Table,Observed.Overlap <= 20), show.expected.overlap=TRUE,expected.overlap.style="hatchedBox", color.expected.overlap='red', color.on = NULL, flip.vertical=TRUE)
dev.off()
```

4 Show fold enrichment
Show fold enrichment rather than overlp size on top of the bars (since v1.0.7.1). ```
png('examples/ex4.png',width=2000,height=2000,res=300)
plot(Result, Layout="landscape", sort.by=order2, keep=FALSE, bar.split=c(70,180), show.elements=TRUE, elements.cex=0.7, show.fold.enrichment=TRUE, elements.list=subset(summary(Result)$Table,Observed.Overlap <= 20),elements.rot=45, show.expected.overlap=TRUE,expected.overlap.style="hatchedBox", color.expected.overlap='red', color.on = NULL)
dev.off()
```

5 Place multiple SuperExactTest plots on the same page
We 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: ```
png('examples/ex5.png',width=4000,height=2000,res=300)
grid.newpage() vp0 <- viewport(layout = grid.layout(1, 2)) vp1 <- viewport(layout.pos.col = 1, layout.pos.row = 1, name = "plotleft") vp2 <- viewport(layout.pos.col = 2, layout.pos.row = 1, name = "plotright") vps <- vpTree(vp0, vpList(vp1, vp2)) pushViewport(vps) seekViewport("plotleft") plot(Result, Layout="landscape", sort.by='size', keep=FALSE, bar.split=c(70,180), show.fold.enrichment=TRUE, show.expected.overlap=TRUE, expected.overlap.style="hatchedBox", color.expected.overlap='red', color.on = NULL, title = 'Figure A. Landscape layout', new.gridPage = FALSE) seekViewport("plotright") plot(Result, Layout="circular", sort.by='size', keep=FALSE, show.expected.overlap=TRUE,expected.overlap.style="hatchedBox", color.expected.overlap='red', color.on = NULL, title = 'Figure B. Circular layout', new.gridPage = FALSE)
dev.off()
```

Owner
- Name: M Wang
- Login: mw201608
- Kind: user
- Location: New York
- Company: @IcahnInstitute
- Website: https://github.com/mw201608
- Repositories: 45
- Profile: https://github.com/mw201608
I am a statistical and quantitative geneticist at the Icahn School of Medicine at Mount Sinai.
GitHub Events
Total
- Watch event: 1
- Fork event: 2
Last Year
- Watch event: 1
- Fork event: 2
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| M Wang | m****g@l****m | 66 |
| Wang | m****g@m****u | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 8
- Total pull requests: 0
- Average time to close issues: about 1 month
- Average time to close pull requests: N/A
- Total issue authors: 5
- Total pull request authors: 0
- Average comments per issue: 2.63
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ilibarra (3)
- capoony (2)
- lucasrocmoreira (1)
- ivingan01 (1)
- Guan06 (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 341 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 9
- Total maintainers: 1
cran.r-project.org: SuperExactTest
Exact Test and Visualization of Multi-Set Intersections
- Homepage: https://github.com/mw201608/SuperExactTest/
- Documentation: http://cran.r-project.org/web/packages/SuperExactTest/SuperExactTest.pdf
- License: GPL-3
-
Latest release: 1.1.0
published almost 4 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.1.0 depends
- grid >= 3.1.0 depends
- methods * depends
- knitr * suggests
- rmarkdown * suggests