Description Usage Arguments Value Examples
view GRanges with score at specified window size by sampling values
1 2 3 | .view_gr_by_window_sample(score_gr, query_gr, window_size,
anchor = c("center", "center_unstranded", "left",
"left_unstranded")[1])
|
score_gr |
GRanges with score mcol |
query_gr |
GRanges that was used to fecth score_gr |
window_size |
ineger. desired window size. |
anchor |
character, anchoring method. one of "center", "center_unstranded", "left", "left_unstranded" |
data.table of scores stored in y value sample every window_size
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(GenomicRanges)
bam_file = system.file("extdata", "MCF10A_CTCF.random5.bam", package = "peakrefine")
bam_input = system.file("extdata", "MCF10A_input.random5.bam", package = "peakrefine")
np = system.file("extdata", "MCF10A_CTCF.random5.narrowPeak", package = "peakrefine")
qgr = rtracklayer::import(np, format = "narrowPeak")
strand(qgr) = c("+", "-", "-", "+", "-")
reads_dt = peakrefine:::.fetch_bam_stranded(bam_file, qgr)
ext_cov = coverage(split(
GRanges(reads_dt[strand == "+"]), reads_dt$which_label))
score_gr = GRanges(ext_cov)
peakrefine:::.view_gr_by_window_sample(score_gr, qgr, 1,
anchor = "center_unstranded")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.