Removes (or includes) annotations such that the named column excludes (or includes) the specified intersection levels. Supports any number of groups using intersection-based filtering. If no levels are specified, all available intersection levels will be returned for inspection. If invalid levels are specified, a warning will be shown with the list of valid levels.
Usage
filter_venn(
factor_name,
group_column = NULL,
tables = NULL,
filter = NULL,
mode = "include",
...
)Arguments
- factor_name
(character) The name of the column(s) in the
annotation_sourceto generate intersection groups from. Supports any number of columns for intersection-based filtering.- group_column
(character, NULL) The name of the column in the
annotation_sourceto create groups from in the Venn diagram. This parameter is ignored if!is.null(tables), as each table is considered to be a group. This parameter is also ignored if more than onefactor_nameis provided, as each column is considered a group. The default isNULL.- tables
(list, NULL) A list of
annotation_sourcesto generate the venn groups from. If the only table of interest is the table coming in frommodel_applythen settables = NULLand usegroup_column. The default isNULL.- filter
(function, NULL) A function to filter intersections based on their properties. The function should take region_data as input and return a logical vector indicating which intersections to keep. Use upset_intersections(), upset_min_size(), upset_min_groups(), upset_max_groups(), or create custom filter functions. The default is
NULL.- mode
(character) Filter mode. Allowed values are limited to the following:
"include": Only items that appear in the filtered intersections are kept in the output."exclude": Items that appear in the filtered intersections are removed from the output.
The default is
"include".- ...
Additional slots and values passed to
struct_class.
Value
A filter_venn object with the following output
slots:
filtered | (annotation_source) Annotation_source after filtering. |
flags | (data.frame) A list of flags indicating which annotations were removed. |