Collapse Multienrichment clusters
Arguments
- mem
Memor legacylistmem object- clusters
listnamed by cluster name, containingcharactervectors all of whose values should be present insets(mem).- choose
characterdefault NULL, passed torank_mem_clusters()to choose a subset of clusters to return. Values must be found innames(clusters).- per_cluster
integerdefault 'Inf' with the maximum sets to include in each cluster. Use an integer likeper_cluster=1to choose one "exemplar" per cluster, ranked according tobyColswhich is described inrank_mem_clusters().- byCols
charactervector of summary values to use when sorting sets within each cluster, passed to and described inrank_mem_clusters().- return_type
characterdefault "cnet" with the output format:"cnet" returns an
igraphCnet plot."Mem" returns a
Memobject after collapsing by cluster."mem" returns legacy
listmem output.
- max_labels
integerdefault 4, the number of pathway labels to include in each cluster, ordered according to 'byCols'.- max_nchar_labels
integerdefault 25, max character length for each pathway label.- include_cluster_title
logicaldefault TRUE, whether to include the cluster title as a prefix. For example if the cluster name is 'A' the new title would be: 'A: pathway 1; pathway 2; pathway 3; pathway 4'.- cluster_color_min_fraction
numericvalue default 0.5, the fraction of pathways in a cluster which has "non blank" assigned color inenrichIMcolors()in order for the color to be assigned to the resulting node, in the case of Cnet output withreturn_type="cnet".- verbose
logicalwhether to print verbose output.- ...
additional arguments are passed to
cnet2mem()which includes thresholds used byapply_cnet_direction()such asdirection_col_fn(color function applied to enrichIMdirection),gene_direction_col_fn(color function applied to geneIMdirection), and others. To avoid applying directional color to Set nodes (nodeType='Set') usedirection_cutoff=100anddirection_max=101, which will consider any enrichIMdirection value at or below 100 to be non-directional.
Value
By default return_type="cnet" and this function returns
an augmented Cnet plot. The labels of each cluster are defined
by the input names(clusters), however an igraph attribute
"set_labels" includes an abbreviated label of the top ranked
sets for each cluster. This label is probably the closest thing
to summarizing the composition of each cluster.
Details
This function is similar to rank_mem_clusters() in that it
starts with mem results from multiEnrichMap() and a list
of clusters of pathways/sets. Instead of ranking and choosing
exemplars from each clusters, it simply collapses each cluster
into one super-set that contains union of all genes.
It does also run rank_mem_clusters() in the event one would
want to collapse only the top per_cluster entries for each
cluster, but the default is to include them all.
See also
Other jam utility functions:
ashape(),
avg_angles(),
avg_colors_by_list(),
cell_fun_bivariate(),
colorRamp2D(),
curateIPAcolnames(),
deconcat_df2(),
display_colorRamp2D(),
enrichList2geneHitList(),
find_colname(),
find_enrich_colnames(),
get_hull_data(),
get_igraph_layout(),
gsubs_remove(),
handle_igraph_param_list(),
isColorBlank(),
make_legend_bivariate(),
make_point_hull(),
mem_find_overlap(),
order_colors(),
rank_mem_clusters(),
rotate_coordinates(),
summarize_node_spacing(),
with_ht_opts(),
xyAngle()