make_scc_dt.single: make_scc_dt.single

View source: R/functions_make.R

make_scc_dt.singleR Documentation

make_scc_dt.single

Description

based on peakrefine::calcSCCMetrics

Usage

make_scc_dt.single(
  bam_file,
  query_gr,
  frag_sizes,
  fetch_size = 3 * max(frag_sizes),
  n_cores = getOption("mc.cores", 1L),
  ...
)

Arguments

bam_file

a single path to a bam file

query_gr

GRanges of regions to calculate SCC for

frag_sizes

optional numeric. Fragment sizes to calculate correlation at. The higher the resolution the longer calculation will take. The default is to count by 10 from 50 to 350.

fetch_size

optional numeric. Size in bp centered around each interval in query_gr to retrieve. Should be greater than max frag_size. The default is 3*max(frag_sizes).

n_cores

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

...

passed to Rsamtools::ScanBamParam()

bfc

BiocFileCache object to use.

cache_version

Modifying the cache version will force recalulation of all results going forward. Default is v1.

force_overwrite

Logical, if TRUE, cache contents will be overwritten.

Value

list fo tidy data.table of SCC data for bam_file

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]]

scc_res = seqqc:::make_scc_dt.single(bam_file, query_gr, seq(50,300, by = 10))

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