plot_frip_dt: plot_frip_dt

View source: R/functions_plot.R

plot_frip_dtR Documentation

plot_frip_dt

Description

internal function used by ssvQC.plotFRIP

Usage

plot_frip_dt(
  frip_dt,
  sort_by = c("none", "frip", "reads_in_peak")[1],
  name_lev = NULL,
  name_var = "name_split",
  color_var = name_var,
  color_mapping = NULL,
  main_title = NULL
)

Arguments

frip_dt

output from make_frip_dt

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

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

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