Skip to contents

Jaccard coefficent

Usage

jaccard(lt, weight = NULL)

genesets_similarity_heatmap(
  lt,
  weight = NULL,
  min_pct = 0.5,
  max_k = 5,
  resolution = 1
)

Arguments

lt

A list of gene sets.

weight

Weight of genes. The value should be a named vector and it should cover all genes in lt.

min_pct

Minimal recurreny of genes in a geneset cluster.

max_k

Maximal number of recurrent genes to use on the plot.

resolution

For controlling the graph clustering method, pass to igraph::cluster_louvain().

Examples

data(p53_dataset)
gs = p53_dataset$gs
jaccard(gs[grep("p53", names(gs), ignore.case = TRUE)])
#>                   p53_signalling p53hypoxiaPathway p53Pathway     P53_UP
#> p53_signalling        1.00000000        0.08035714 0.09345794 0.04444444
#> p53hypoxiaPathway     0.08035714        1.00000000 0.20000000 0.09090909
#> p53Pathway            0.09345794        0.20000000 1.00000000 0.09803922
#> P53_UP                0.04444444        0.09090909 0.09803922 1.00000000
#> P53_DOWN              0.01694915        0.00000000 0.02941176 0.00000000
#>                     P53_DOWN
#> p53_signalling    0.01694915
#> p53hypoxiaPathway 0.00000000
#> p53Pathway        0.02941176
#> P53_UP            0.00000000
#> P53_DOWN          1.00000000