pareg: Pathway enrichment using a regularized regression approach.

View source: R/main.R

paregR Documentation

Pathway enrichment using a regularized regression approach.

Description

Run model to compute pathway enrichments. Can model inter-pathway relations, cross-validation and much more.

Usage

pareg(
  df_genes,
  df_terms,
  lasso_param = NA_real_,
  network_param = NA_real_,
  term_network = NULL,
  cv = FALSE,
  cv_cores = NULL,
  family = beta,
  response_column_name = "pvalue",
  max_iterations = 1e+05,
  lasso_param_range = seq(0, 2, length.out = 10),
  network_param_range = seq(0, 500, length.out = 10),
  log_level = NULL,
  ...
)

Arguments

df_genes

Dataframe storing gene names and DE p-values.

df_terms

Dataframe storing pathway database.

lasso_param

Lasso regularization parameter.

network_param

Network regularization parameter.

term_network

Term similarity network as adjacency matrix.

cv

Estimate best regularization parameters using cross-validation.

cv_cores

How many cores to use for CV parallelization.

family

Distribution family of response.

response_column_name

Which column of model dataframe to use as response.

max_iterations

How many iterations to maximally run optimizer for.

lasso_param_range

LASSO regularization parameter search space in grid search of CV.

network_param_range

Network regularization parameter search space in grid search of CV.

log_level

Control verbosity (logger::INFO, logger::DEBUG, ...).

...

Further arguments to pass to '(cv.)edgenet'.

Value

An object of class pareg.

Examples

df_genes <- data.frame(
  gene = paste("g", 1:20, sep = ""),
  pvalue = c(
    rbeta(10, .1, 1),
    rbeta(10, 1, 1)
  )
)
df_terms <- rbind(
  data.frame(
    term = "foo",
    gene = paste("g", 1:10, sep = "")
  ),
  data.frame(
    term = "bar",
    gene = paste("g", 11:20, sep = "")
  )
)
pareg(df_genes, df_terms, max_iterations = 10)

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