Skip to contents

Resolves one or more signatures from SigRepo and runs hypeR::hypeR() on them without requiring the user to call getSignature() manually first.

Usage

runHypeR(
  conn_handler = NULL,
  signature_id = NULL,
  signature_name = NULL,
  omic_signature = NULL,
  genesets = NULL,
  msigdb_species = "Homo sapiens",
  msigdb_collection = NULL,
  msigdb_subcollection = NULL,
  msigdb_clean = FALSE,
  method = c("hypergeo", "kstest", "gsea"),
  feature_col = "feature_name",
  score_col = "score",
  split_by_group = FALSE,
  split_by_direction = FALSE,
  background = NULL,
  fdr = 0.05,
  plotting = FALSE,
  quiet = TRUE,
  absolute = FALSE,
  power = 1,
  ...,
  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.

genesets

A named list of genesets, a hypeR gsets object, or a hypeR rgsets object supplied to hypeR. Alternatively, leave this as NULL and specify msigdb_collection to fetch genesets from MSigDB automatically.

msigdb_species

Species passed to hypeR::msigdb_gsets() when msigdb_collection is supplied. Defaults to "Homo sapiens".

msigdb_collection

MSigDB collection identifier, such as "H" or "C2". When supplied, runHypeR() retrieves genesets automatically via hypeR::msigdb_gsets().

msigdb_subcollection

Optional MSigDB subcollection identifier, such as "CP:KEGG_LEGACY".

msigdb_clean

Logical; whether to clean MSigDB geneset labels using hypeR::msigdb_gsets(clean = ...). Defaults to FALSE.

method

One of "hypergeo", "kstest", or "gsea".

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.

background

Optional background size passed to hypeR.

fdr

FDR threshold passed to hypeR. Defaults to 0.05.

plotting

Logical; whether to let hypeR generate plots. Defaults to FALSE.

quiet

Logical; whether to suppress hypeR messages. Defaults to TRUE.

absolute

Passed to hypeR for GSEA-style ranked enrichment. Defaults to FALSE.

power

Passed to hypeR for GSEA-style ranked enrichment. Defaults to 1.

...

Additional arguments passed directly to hypeR::hypeR(). Use this for extra tuning parameters such as background or other engine-specific options.

verbose

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

Value

A list with:

result

A hyp or multihyp object returned by hypeR.

signatures

The query vectors passed into hypeR.

metadata

A data frame describing each query vector.

Examples

if (FALSE) { # \dontrun{
hyp_res <- SigRepo::runHypeR(
  conn_handler = conn_handler,
  signature_name = "example_signature",
  msigdb_collection = "H",
  method = "hypergeo",
  background = 20000
)
} # }