Use affinity propagation to cluster similar gene sets to reduce redundancy in report.

affinity.propagation(idsInSet, score)

Arguments

idsInSet

A list of set names and their member IDs.

score

A vector of addible scores with the same length used to assign input preference; higher score has larger weight, i.e. -logP.

Value

A list of clusters and representatives for each cluster.

clusters

A list of character vectors of set IDs in each cluster.

representatives

A character vector of representatives for each cluster.

References

John M Elizarraras, Yuxing Liao, Zhiao Shi, Qian Zhu, Alexander R Pico, Bing Zhang, WebGestalt 2024: faster gene set analysis and new support for metabolomics and multi-omics, Nucleic Acids Research, Volume 52, Issue W1, 5 July 2024, Pages W415–W421, doi:10.1093/nar/gkae456 .

Author

Zhiao Shi, Yuxing Liao

Examples

if (FALSE) { # \dontrun{
  padj_list = enrichment.results@enrichment.discovery@result$p.adjust
  names(padj_list) = enrichment.results@enrichment.discovery@result$ID

  set_list = enrichment.results@enrichment.discovery@geneSets[names(padj_list)]


  aff.propag <- affinity.propagation(idsInSet = set_list,
                                     score = -log10(padj_list))
} # }