plot_feature_comparison: plot_feature_comparison

Description Usage Arguments Value Examples

View source: R/functions_plot.R

Description

plot_feature_comparison

Usage

1
2
3
4
5
6
plot_feature_comparison(
  peak_grs,
  min_fraction = 0,
  min_number = 2,
  force_euler = FALSE
)

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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)
)

jrboyd/seqqc documentation built on March 20, 2021, 2:04 p.m.