Calculate pathway similarity metric
Source:R/pathway_enrichment_networks.R
calc_similarity_metric.Rd
Calculate EnrichmentMap's similarity metric for pathways, which is 50% Jaccard
index and 50% overlap score.
Function is used internally in enrichment_network_vis()
.
Usage
calc_similarity_metric(
pws,
fid_lists,
include_metab_singletons,
parent_pathways,
clust1sig_collapsed,
similarity_cutoff
)
Arguments
- pws
character vector of pathway term IDs, length 2
- fid_lists
named list where names are pathway terms IDs and values are lists of integers corresponding to unique feature IDs
- include_metab_singletons
boolean. If
TRUE
, include pathways enriched only by metabolites (ome METAB) as singleton nodes- parent_pathways
named list, map of KEGG and REAC pathway term ID to parent pathway. Used to create labels for clusters of pathway enrichments. List names must correspond to values in
pw_enrich_res$term_id
. MotrpacRatTraining6moData::PATHWAY_PARENTS by default. If NULL, then only the pathway names are used to create cluster labels, which is quite meaningless is all pathway names are unique. In that case, it is recommended to setlabel_nodes
toFALSE
.- clust1sig_collapsed
data table of merged pathway enrichment results passed by
enrichment_network_vis()
- similarity_cutoff
numeric, edges are drawn between pairs of pathways if they have a similarity metric above this value