compute_term_similarities: Term similarity computation.

View source: R/term_similarities.R

compute_term_similaritiesR Documentation

Term similarity computation.

Description

Generate similarity matrix for input terms.

Usage

compute_term_similarities(
  df_terms,
  similarity_function = jaccard,
  max_similarity = 1
)

Arguments

df_terms

Dataframe storing pathway database.

similarity_function

Function to compute similarity between two sets.

max_similarity

Value to fill diagonal with.

Value

Symmetric matrix of similarity scores.

Examples

df_terms <- data.frame(
  term = c("A", "A", "B", "B", "B", "C", "C", "C"),
  gene = c("a", "b", "a", "b", "c", "a", "c", "d")
)
compute_term_similarities(df_terms)

cbg-ethz/pareg documentation built on July 20, 2023, 7:30 p.m.