make_frip_dt: make_frip_dt

Description Usage Arguments Value Examples

View source: R/functions_make.R

Description

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

Usage

1
2
3
4
5
6
make_frip_dt(
  query_dt,
  query_gr,
  n_cores = getOption("mc.cores", 1),
  name_lev = NULL
)

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

1
2
3
4
5
6
7
8
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)

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