crossCorrByRle: Calculate cross correlation by using shiftApply on read...

Description Usage Arguments Value Examples

View source: R/functions_fragLen.R

Description

Calculate cross correlation by using shiftApply on read coverage Rle

Usage

1
2
3
4
5
6
7
8
9
crossCorrByRle(
  bam_file,
  query_gr,
  max_dupes = 1,
  fragment_sizes = 50:300,
  read_length = NULL,
  flip_strand = FALSE,
  ...
)

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.

flip_strand

boolean. if TRUE strands that reads align to are swapped. This is typically only necessary if there was a mismatch between library chemistry and aligner settings. Default is FALSE.

...

arguments passed to ScanBamParam

Value

named list of results

Examples

1
2
3
4
bam_f = system.file("extdata/test.bam",
    package = "seqsetvis", mustWork = TRUE)
query_gr = CTCF_in_10a_overlaps_gr[1:2]
crossCorrByRle(bam_f, query_gr[1:2], fragment_sizes = seq(50, 300, 50))

seqsetvis documentation built on Nov. 8, 2020, 5:57 p.m.