crossCorrByRle {seqsetvis} | R Documentation |
Calculate cross correlation by using shiftApply on read coverage Rle
crossCorrByRle( bam_file, query_gr, max_dupes = 1, fragment_sizes = 50:300, read_length = NULL, flip_strand = FALSE, ... )
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 |
named list of results
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))