View source: R/functions_make.R
make_feature_as_signal_dt | R Documentation |
Create a data.table of overlaps between query_gr and anno_grs (from
make_anno_grs
)
make_feature_as_signal_dt(anno_grs, query_gr)
anno_grs |
named list of GRanges objects where each is an annotation
class. Use |
query_gr |
GRanges of regions to characterize via anno_grs. |
a data.table of counts for each annotation class.
gtf_file = system.file(package = "seqqc", "extdata/gencode.v35.annotation.at_peaks.gtf")
anno_grs = make_anno_grs(gtf_file)
peak_files = dir(system.file("extdata", package = "seqqc"), pattern = "Peak$", full.names = TRUE)
peak_grs = seqsetvis::easyLoad_narrowPeak(peak_files)
query_gr = resize(seqsetvis::ssvOverlapIntervalSets(peak_grs), 2e4, fix = "center")
anno_dt = make_feature_as_signal_dt(anno_grs, query_gr)
anno_dt$id = factor(anno_dt$id, levels = rev(unique(anno_dt$id)))
ggplot(anno_dt, aes(x = x, fill = y, y = id)) + geom_tile() + facet_wrap(~feature_type)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.