create_jaccard_matrix: Compute the overlap matrix for enrichment results

Description Usage Arguments Value See Also Examples

View source: R/gs_distances.R

Description

Compute the overlap matrix for enrichment results, based on the Jaccard Index between each pair of sets

Usage

1
2
3
4
5
6
create_jaccard_matrix(
  res_enrich,
  n_gs = nrow(res_enrich),
  gs_ids = NULL,
  return_sym = FALSE
)

Arguments

res_enrich

A data.frame object, storing the result of the functional enrichment analysis. See more in the main function, GeneTonic(), to see the formatting requirements.

n_gs

Integer value, corresponding to the maximal number of gene sets to be included (from the top ranked ones). Defaults to the number of rows of res_enrich

gs_ids

Character vector, containing a subset of gs_id as they are available in res_enrich. Lists the gene sets to be included, additionally to the ones specified via n_gs. Defaults to NULL.

return_sym

Logical, whether to return the symmetrical matrix or just the upper triangular - as needed by enrichment_map(), for example.

Value

A matrix with the kappa scores between gene sets

See Also

gs_mds(), enrichment_map()

Examples

1
2
3
4
5
6
# res_enrich object
data(res_enrich_macrophage, package = "GeneTonic")
res_enrich <- shake_topGOtableResult(topgoDE_macrophage_IFNg_vs_naive)

jmat <- create_jaccard_matrix(res_enrich[1:200,])
dim(jmat)

GeneTonic documentation built on Nov. 8, 2020, 5:27 p.m.