make_frip_dt: make_frip_dt

View source: R/functions_make.R

make_frip_dtR Documentation

make_frip_dt

Description

create a data.table with FRIP data. To be used with plot_frip_dt

Usage

make_frip_dt(
  query_dt,
  query_gr,
  n_cores = getOption("mc.cores", 1),
  name_lev = NULL,
  name_var = "name_split",
  color_var = name_var,
  bfc = new_cache(),
  force_overwrite = getOption("SQC_FORCE_CACHE_OVERWRITE", FALSE)
)

Arguments

query_dt

data.table with query information. Only really needs file as first column.

query_gr

GRanges to be centered.

n_cores

Number of cores to use. Defaults to mc.cores if set or 1.

name_lev

Optional levels to impose order in feature sets. Default of NULL uses decreasing FRIP score.

Value

a data.table with reads_in_peak, mapped_reads, and frip data for all bam files in query_dt at each region in query_gr.

Examples

peak_file = dir(system.file("extdata", package = "seqqc"),
  pattern = "test_peaks.bed$", full.names = TRUE)
bam_file = dir(system.file("extdata", package = "seqqc"),
  pattern = "test_peaks.bam$", full.names = TRUE)

query_gr = seqsetvis::easyLoad_bed(peak_file)[[1]]

make_frip_dt(bam_file, query_gr)

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