Description Usage Arguments Value Examples
Calculate correlation between signal on DNA strands
1 | .calc_cross_corr(reads_dt, query_gr, frag_len = NA, window_size = 1)
|
reads_dt |
data.table containing read spans. mandatory columns are which_label, strand, start, end |
query_gr |
GRanges of regions of interest |
frag_len |
fragment size to extend reads to. frag_len of NA causes read extension to be skipped, ie. raw read pileup. |
window_size |
integer, resolution used to represent coverage. window_size of 10 retrieves coverage every 10 bp. |
data.table of correlation per region in query_gr
1 2 3 4 5 6 | 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")
bam_dt = peakrefine:::.fetch_bam_stranded(bam_file, qgr)
peakrefine:::.calc_cross_corr(bam_dt, qgr, frag_len = NA) #read correlation
peakrefine:::.calc_cross_corr(bam_dt, qgr, frag_len = 150) #fragment 150 bp correlation
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.