Calculate Jaccard Similarity.

jaccardSim(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 similarity matrix sim.mat and input preference vector ip.vec.

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)]


  jaccard.sim <- jaccardSim(idsInSet = set_list,
                            score = -log10(padj_list))
} # }