plot_frip_dt: plot_frip_dt

Description Usage Arguments Value Examples

View source: R/functions_plot.R

Description

plot_frip_dt

Usage

1
2
3
4
5
6
7
8
plot_frip_dt(
  frip_dt,
  peak_dt = NULL,
  fq_dt = NULL,
  query_gr = NULL,
  sort_by = c("frip", "reads_in_peak")[1],
  name_lev = NULL
)

Arguments

frip_dt

output from make_frip_dt

peak_dt

(optional) output from make_peak_dt

fq_dt

(optional) output from make_fq_dt

query_gr

(optional) The GRanges used to create frip_dt, only necessary to calculate the fraction of genome covered by peaks.

sort_by

character. One of "frip" or "reads_in_peak". Should plots be sorted by decreasing FRIP ("frip") or total reads ("reads_in_peak")? Default is "frip".

name_lev

character. Name levels to impose manual ordering. sort_by is not ignored if this is not NULL. Default is NULL.

Value

list of ggplot plots relevant to FRIP.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
peak_files = dir(system.file("extdata", package = "seqqc"), pattern = "Peak$", full.names = TRUE)
peak_grs = seqsetvis::easyLoad_narrowPeak(peak_files)
query_gr = resize(seqsetvis::ssvOverlapIntervalSets(peak_grs), 6e2, fix = "center")

bam_files = dir(system.file("extdata", package = "seqqc"), pattern = "^M.+bam$", full.names = TRUE)
query_dt.bam = make_dt(bam_files)

frip_dt = make_frip_dt(query_dt.bam, query_gr)
frip_plots = plot_frip_dt(frip_dt)
frip_plots$frip_per_peaks
frip_plots$frip_total

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