Learn R Programming

iCOBRA (version 1.0.2)

plot_upset: Create UpSet plots

Description

Generate UpSet plots showing the overlaps among sets of significant feature for a given adjusted p-value threshold. Optionally, the truth can be included as a "perfect" method. Note that if the results are stratified, only one category at a time can be displayed.

Usage

plot_upset(cobraplot, stratum = NULL, ...)

Arguments

cobraplot
An COBRAPlot object.
stratum
If results are stratified, the category to plot results for. Can be numeric or categorical (the name of the category).
...
Additional arguments to UpSetR::upset.

Value

  • Nothing, displays a graph

References

Lex and Gehlenborg (2014): Points of view: Sets and intersections. Nature Methods 11, 779.

Lex et al (2014): UpSet: Visualization of intersecting sets. IEEE Transactions on Visualization and Computer Graphics 20(12), 1983-1992.

Examples

Run this code
data(cobradata_example)
cobraperf <- calculate_performance(cobradata_example,
                                   binary_truth = "status",
                                   aspects = "overlap")
cobraplot <- prepare_data_for_plot(cobraperf, colorscheme = "Dark2",
                                   incltruth = TRUE)
plot_upset(cobraplot)
plot_upset(cobraplot, order.by = "freq", decreasing = TRUE)

cobraperf <- calculate_performance(cobradata_example, 
                                   binary_truth = "status", 
                                   aspects = "overlap",
                                   splv = "expr_cat")
cobraplot <- prepare_data_for_plot(cobraperf, colorscheme = "Dark2", 
                                   incltruth = TRUE)
plot_upset(cobraplot, stratum = "[2.85e+00,1.45e+01)")

Run the code above in your browser using DataLab