crossCorrByRle: Calculate cross correlation by extending reads

Description Usage Arguments Value Examples

View source: R/functions_crossCorrRle.R

Description

Calculate cross correlation by extending reads

Usage

1
2
crossCorrByRle(bam_file, query_gr, max_dupes = 1,
  fragment_sizes = 50:300, read_length = NULL, 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.

max_dupes

integer. Duplicate reads above this value will be removed.

fragment_sizes

integer. fragment size range to search for maximum correlation.

read_length

integer. Any values outside fragment_range that must be searched. If not supplied will be determined from bam_file. Set as NA to disable this behavior.

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")
query_gr = rtracklayer::import(np, format = "narrowPeak")
crossCorrByExtension(bam_file, query_gr[1:2], fragment_range = 50:250,
step = 50, small_step = 10)

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