Skip to contents

Converts one or more SigRepo signatures into the query-vector format expected by hypeR::hypeR(). This helper can resolve signatures directly from the SigRepo database, so users do not need to call getSignature() manually first.

Usage

prepareHypeRSignatures(
  conn_handler = NULL,
  signature_id = NULL,
  signature_name = NULL,
  omic_signature = NULL,
  method = c("hypergeo", "kstest", "gsea"),
  feature_col = "feature_name",
  score_col = "score",
  split_by_group = FALSE,
  split_by_direction = FALSE,
  verbose = TRUE
)

Arguments

conn_handler

An R object obtained from SigRepo::newConnHandler(). Required unless omic_signature is supplied.

signature_id

One or more SigRepo signature IDs.

signature_name

One or more SigRepo signature names.

omic_signature

A single OmicSignature object or a list of OmicSignature objects.

method

One of "hypergeo", "kstest", or "gsea". Hypergeometric enrichment uses the signature table. KS/GSEA-style enrichment use ranked scores from difexp.

feature_col

Column containing feature identifiers. Defaults to "feature_name".

score_col

Column containing ranked scores for KS/GSEA-style enrichment. Defaults to "score".

split_by_group

Logical; whether to create separate query vectors for each group_label. Defaults to FALSE.

split_by_direction

Logical; when method = "hypergeo", whether to split each group into up- and down-direction feature sets using the sign of score_col. Defaults to FALSE.

verbose

Logical; whether or not to print diagnostic messages while retrieving signatures. Defaults to TRUE.

Value

A list with three elements:

signatures

A named list of query vectors for hypeR.

metadata

A data frame describing each generated query vector.

omic_signatures

The resolved OmicSignature objects.