geseca: Runs multilevel Monte-Carlo variant for performing gene sets...

View source: R/geseca-multilevel.R

gesecaR Documentation

Runs multilevel Monte-Carlo variant for performing gene sets co-regulation analysis

Description

This function is based on the adaptive multilevel splitting Monte Carlo approach and allows to estimate arbitrarily small P-values for the task of analyzing variance along a set of genes.

Usage

geseca(
  pathways,
  E,
  minSize = 1,
  maxSize = nrow(E) - 1,
  center = TRUE,
  scale = FALSE,
  sampleSize = 101,
  eps = 1e-50,
  nproc = 0,
  BPPARAM = NULL,
  nPermSimple = 1000
)

Arguments

pathways

List of gene sets to check.

E

expression matrix, rows corresponds to genes, columns corresponds to samples.

minSize

Minimal size of a gene set to test. All pathways below the threshold are excluded.

maxSize

Maximal size of a gene set to test. All pathways above the threshold are excluded.

center

a logical value indicating whether the gene expression should be centered to have zero mean before the analysis takes place. The default is TRUE. The value is passed to scale.

scale

a logical value indicating whether the gene expression should be scaled to have unit variance before the analysis takes place. The default is FALSE. The value is passed to scale.

sampleSize

sample size for conditional sampling.

eps

This parameter sets the boundary for calculating P-values.

nproc

If not equal to zero sets BPPARAM to use nproc workers (default = 0).

BPPARAM

Parallelization parameter used in bplapply.

nPermSimple

Number of permutations in the simple geseca implementation for preliminary estimation of P-values.

Value

A table with GESECA results. Each row corresponds to a tested pathway. The columns are the following

  • pathway – name of the pathway as in 'names(pathways)';

  • pctVar – percent of explained variance along gene set;

  • pval – P-value that corresponds to the gene set score;

  • padj – a BH-adjusted p-value;

  • size – size of the pathway after removing genes not present in 'rownames(E)'.

Examples

data("exampleExpressionMatrix")
data("examplePathways")
gr <- geseca(examplePathways, exampleExpressionMatrix, minSize=15, maxSize=500)

ctlab/fgsea documentation built on Oct. 10, 2024, 10:31 a.m.