crossCorrByExtensionFull: Measure cross correlation using specified frag_len for all...

Description Usage Arguments Value Examples

View source: R/functions_crossCorrExtension.R

Description

Measure cross correlation using specified frag_len for all regions

Usage

1
2
crossCorrByExtensionFull(bam_file, query_gr, frag_len, max_dupes = 1,
  ncores = 1, output_withGRanges = TRUE)

Arguments

bam_file

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

query_gr

GRanges. Regions to calculate cross correlation for.

frag_len

integer. Fragment length to calculate cross correlation for.

max_dupes

integer. Duplicate reads above this value will be removed.

ncores

integer. ncores to use to split up the cross correlation calculation.

output_withGRanges

logical. Should results be merged back into query_gr? If TRUE output is GRanges. If FALSE output is data.table.

Value

Either a GRanges equivalent to query_gr with added columns for correlation metics or a data.table of metrics.

Examples

1
2
3
4
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")
crossCorrByExtensionFull(bam_file, qgr[1:2], frag_len = 150, ncores = 2)

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