Rank Multienrichment clusters
Usage
rank_mem_clusters(
mem,
clusters,
choose = NULL,
per_cluster = Inf,
byCols = c("minp_rank", "composite_rank", "gene_count_rank"),
verbose = FALSE,
...
)Arguments
- mem
Memor legacylistmem output frommultiEnrichMap()- clusters
listcontaining set names, that must matchcolnames(mem$memIM)andrownames(mem$enrichIM).- choose
charactervector with optional subset of clusters to return, matchingnames(clusters); orintegervector referring toclustersby index position. WhenchooseisNULL, all clusters are returned.- per_cluster
integervector with the number of entries to return for each cluster. Values will be recycled to the length of the clusters to be returned, defined bychooseor bylength(clusters)whenchooseisNULL.- byCols
charactervector used to sort the resultingdata.framewithin each cluster. This argument is passed directly tojamba::mixedSortDF(). Default 'minp_rank'. Recognized columns:'minp_rank': the lowest P-value for all enrichments.
'composite_rank': a composite score which sorts by the order of magnitude of the lowest P-value, then by number of genes.
'gene_count_rank': the set with the most genes.
Note that any column order can be reversed using "-" prefix, for example '-gene_count_rank' would return the set with the lowest gene count.
- verbose
logical indicating whether to print verbose output.
- ...
additional arguments are ignored.
Value
data.frame sorted by the criteria defined by byCols,
with colname "set" to indicate the pathway/set name.
It includes additional columns which may be useful in
filtering or sorting.
'gene_count': the total number of genes involved in enrichment
'minp': the lowest enrichment P-value
'gene_count_rank': the rank by descending gene count per cluster.
'minp_rank': the rank by ascending minimum P-value.
'composite_rank': the rank of the composite score, ascending. The composite rank uses the order of magnitude of minimum P-value, then descending number of genes.
Details
This function takes list output from multiEnrichMap(), and
a list of clusters, and returns a data.frame that contains
several rank order metrics. It is intended to be used with
column clusters following mem_gene_path_heatmap(),
see examples.
The argument per_cluster is intended to make it convenient
to pick the top exemplar pathways, especially when argument
byCols is defined so that it sorts by the rank columns.
The argument choose is intended to make it easy to retrieve
pathways from specific clusters.
See also
Other jam utility functions:
ashape(),
avg_angles(),
avg_colors_by_list(),
cell_fun_bivariate(),
collapse_mem_clusters(),
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(),
rotate_coordinates(),
summarize_node_spacing(),
with_ht_opts(),
xyAngle()