Closed Shians closed 3 years ago
Fixed in 1fbaedd
New interface is
plot_agg_regions <- function(
x,
regions,
group_col = NULL,
flank = 2000,
stranded = TRUE,
span = 0.05,
palette = ggplot2::scale_colour_brewer(palette = "Set1")
)
Regions are now provided as a table only, with optional columns to specify grouping. The grouping column is specified by group_col
and column can be selected from either the regions
table or samples(x)
. plot_agg_regions_sample_grouped()
is therefore made redundant.
Currently, the aggregate plotting function has two interfaces
and
The first was an initial implementation that took lists of features such that each member of the list was a feature group. This decision lead to many list-handling code blocks that were complicated to interpret. Furthermore, since the grouping was implicit in the feature level data structure, it made it impossible to group by sample-level information. Therefore, the second function was created in order to group by a column in the sample annotation.
A re-implementation is required. Ideally allowing grouping by any column found in either the sample annotation or feature annotation, preferably using a single data.frame for the regions.