View source: R/functions_plot.R
plot_feature_overlap_signal_profiles | R Documentation |
plot_feature_overlap_signal_profiles
plot_feature_overlap_signal_profiles(
grouped_prof_dt,
group_var = "overlap_group",
rank_var = "rnk",
fill_limits = NULL,
signal_var = "y",
color_var = "name",
color_mapping = NULL,
facet_var = "name_split",
heatmap_free_y = TRUE
)
grouped_prof_dt |
Output of |
group_var |
character. Must already be present in grouped_prof_dt. Use |
rank_var |
character. Must already be present in grouped_prof_dt. Use |
fill_limits |
Limits of heatmap fill scale. |
signal_var |
value to plot |
list of ggplot plots that use feature overlaps to plot signal
bw_files = dir(system.file("extdata", package = "seqqc"), pattern = "^M.+bw$", full.names = TRUE)
query_dt = make_dt(bw_files)
query_dt[, sample := sub("_FE_random100.A", "", name)]
query_dt[, name_split := gsub("_", "\n", name)]
peak_files = dir(system.file("extdata", package = "seqqc"), pattern = "Peak$", full.names = TRUE)
names(peak_files) = sub("_CTCF_rand.+", "", basename(peak_files))
peak_grs = seqsetvis::easyLoad_narrowPeak(peak_files, )
overlaps_gr = seqsetvis::ssvOverlapIntervalSets(peak_grs)
query_gr = resize(overlaps_gr, 6e2, fix = "center")
group_prof_dt = make_feature_overlap_signal_profiles(query_dt, overlaps_gr)
plots = plot_feature_overlap_signal_profiles(group_prof_dt)
cowplot::plot_grid(plotlist = plots)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.