make_scc_dt.single: make_scc_dt.single

Description Usage Arguments Value Examples

View source: R/functions_make.R

Description

based on peakrefine::calcSCCMetrics

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
make_scc_dt.single(
  bam_file,
  query_gr,
  frag_sizes,
  fetch_size = 3 * max(frag_sizes),
  cache_path = "~/.cache_peakrefine",
  cache_version = "v1",
  force_overwrite = FALSE,
  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).

cache_path

path to cache location for BiocFileCache 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.

n_cores

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

...

passed to Rsamtools::ScanBamParam()

Value

list fo tidy data.table of SCC data for bam_file

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

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

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