jaccardSimilarityMatrix: Jaccard Similarity Matrix

View source: R/utility_functions.R

jaccardSimilarityMatrixR Documentation

Jaccard Similarity Matrix

Description

Computes Jaccard similarity mtrix for list of genesets

Usage

jaccardSimilarityMatrix(gene.sets, y = NULL, assert.unique = T)

Arguments

gene.sets

named list of genesets, where names specify name of gene set, and entries are character vectors specifying genes belongs to the respective set.

y

Optional second gene set. If provided, resulting matrix is gene.sets x y.

assert.unique

Logical flag specifying whether to remove duplicate entries within individual sets. Default is TRUE.

Value

Jaccard similarity matrix

Author(s)

Nicholas Mikolajewicz

See Also

pheatmap

Examples


# compute jaccard similarity matrix for (named) list of genesets.
j.mat <- jaccardSimilarityMatrix(gene.sets)

# generate heatmap
pheatmap::pheatmap(j.mat, show_colnames = F, main = "Jaccard Similarity")


NMikolajewicz/scMiko documentation built on June 28, 2023, 1:41 p.m.