crossCorrByExtension: Calculate cross correlation by extending reads

Description Usage Arguments Value Examples

View source: R/functions_crossCorrExtension.R

Description

Calculate cross correlation by extending reads

Usage

1
2
3
crossCorrByExtension(bam_file, query_gr, n_regions = 20, max_dupes = 1,
  frag_min = 50, frag_max = 250, step = 10, small_step = 1,
  include_plots = TRUE)

Arguments

bam_file

character. Path to .bam file, must have index at .bam.bai.

query_gr

GRanges. Regions to calculate cross correlation for.

n_regions

integer. query_gr will be downsampled to this many regions for speed. Use NA to skip downsampling.

max_dupes

integer. Duplicate reads above this value will be removed.

frag_min

integer. extension value to start at.

frag_max

integer. extension value to end at.

step

integer. proceed from frag_min measuring correlation every step.

small_step

integer. after measuring correlation every step, a second round of fragment size refinement is done using small_step within +/- step of maximum.

include_plots

logical. Should plots be included in output?

Value

named list of results

Examples

1
2
3
4
5
bam_file = system.file("extdata", "MCF10A_CTCF.random5.bam", package = "peakrefine")
np = system.file("extdata", "MCF10A_CTCF.random5.narrowPeak", package = "peakrefine")
qgr = rtracklayer::import(np, format = "narrowPeak")
crossCorrByExtension(bam_file, qgr[1:2], frag_min = 50,
frag_max = 250, step = 50, small_step = 10)

jrboyd/peakrefine documentation built on July 30, 2020, 7:13 p.m.