Function that calls 'getVennCounts()' and draws a VennDiagram of peak intersections using the ggvenn package.

ggVennPeaks(
  peak_list,
  peak_names = names(peak_list),
  percent = TRUE,
  stranded = FALSE,
  true_overlaps = FALSE,
  in_fill = c("blue", "gold3"),
  alpha = 0.4,
  out_color = "black",
  name_color = "black",
  text_color = "black",
  name_size = 5,
  label_size = 3,
  title = "",
  subtitle = "",
  return_peaks = FALSE
)

Arguments

peak_list

List of dataframes with the genomic coordinates of the regions to overlap. Dataframes must contain the columns seqnames, start, end.

peak_names

Character with the same length as the 'peaks' list. The names that are given to the diferente objects in the 'peaks' list. Default: 'names(peaks)'

percent

Logical of length 1. Whether to show the percentage corresponding to each part of the intersection. Default = T.

stranded

Logical of length 1. If TRUE, it considers the strand information to do the overlaps. Default = FALSE.

true_overlaps

Logical of length 1. Only if peak_list has length 2. If TRUE, it counts the overlapping regions from each set using plyranges. If TRUE, stranded and percent are set to FALSE. Default: FALSE

in_fill

Character of length equal to 'peak_list'. Colors of each set in 'peak_list'. Default: c("blue", "gold3").

alpha

Numeric of length 1. Transparency of the the Venn circles. Default: 0.4.

out_color

Character of length 1 or equal to 'peak_list'. Color of the circles outer lines. Default: "black".

name_color

Character of length 1 or equal to 'peak_list'. Color of the titles of each set of peaks. Default: "black".

text_color

Character of length 1. Color of the text inside the Venn circles (i.e. number of peaks and percentage in each intersection). Default: "black".

name_size

Numeric of length 1. Size of the name of each peak set. Default: 5.

label_size

Numeric of length 1. Size of the text inside the Venn circles. Default: 3.

title

Character of length 1. Title of the plot. Can be NULL. Default: "".

subtitle

Character of length 1. Title of the plot. Can be NULL. Default: "".

return_peaks

Logical of length 1. Whether to return the peaks of each set overlapping with the other. Only if peak_list has length 2. If TRUE, it won't draw the plot. Default: FALSE.

See also

ggvenn::ggvenn

ChIPseeker::makeVennDiagram

Author

amitjavilaventura