plot_feature_comparison: plot_feature_comparison

View source: R/functions_plot.R

plot_feature_comparisonR Documentation

plot_feature_comparison

Description

plot_feature_comparison

Usage

plot_feature_comparison(
  peak_grs,
  min_fraction = 0,
  min_number = 2,
  force_euler = FALSE,
  peak_colors = NULL
)

Arguments

peak_grs

list of GRanges peak sets

min_fraction

numeric fraction from 0 to 1. min_fraction of peaks for consensus. Default is 0.

min_number

numeric from 2 to length of peak_gres. min_number of peaks for consesensus. default is 2.

force_euler

logical. If TRUE, Euler plots will generate for more than 8 peak sets, may be very slow! Default is FALSE

Value

Nested list of plots for peak overlaps. Outer list contains "all" and "consensus" sets of plots. Inner list has a barplot, binary heatmap and upset

Examples

peak_files = dir(system.file("extdata", package = "seqqc"), pattern = "Peak$", full.names = TRUE)
peak_grs = seqsetvis::easyLoad_narrowPeak(peak_files)
names(peak_grs) = sub("_rand.+", "", names(peak_grs))
peak_plots = plot_feature_comparison(peak_grs)

#plotting looks like this:
peak_plots$all$venn

#possible assembly of plots
cowplot::plot_grid(ncol = 1,
  cowplot::plot_grid(plotlist = peak_plots$all[1:3], nrow = 1),
  cowplot::plot_grid(plotlist = peak_plots$all[4:5], nrow = 1)
)

cowplot::plot_grid(ncol = 1,
  cowplot::plot_grid(plotlist = peak_plots$consensus[1:3], nrow = 1),
  cowplot::plot_grid(plotlist = peak_plots$consensus[4:5], nrow = 1)
)


FrietzeLabUVM/ssvQC documentation built on March 25, 2024, 12:24 a.m.