Skip to contents

Native implementation of GSEA

Usage

gsea_sample_perm(
  expr,
  condition,
  gs,
  direction = c("std", "pos", "neg"),
  power = 1,
  min_size = 5,
  max_size = 1000,
  nperm = 1000,
  verbose = TRUE
)

gsea_gene_perm(
  s,
  gs,
  direction = c("std", "pos", "neg"),
  power = 1,
  min_size = 5,
  max_size = 1000,
  nperm = 1000,
  verbose = TRUE
)

Arguments

expr

The complete expression matrix.

condition

The condition labels of samples. The value should be a factor where level[1] corresponds to the treatment group and level[2] corresponds to the control group.

gs

A list of gene sets. Genes should have the same ID types as expr.

direction

Whether the test is one-sided or two-sided.

power

Power added to the absolute value of weight.

min_size

Minimal size of gene sets for analysis.

max_size

Maximal size of gene sets for analysis.

nperm

Number of permutations.

verbose

Whether to print messages?

s

A numeric vector of gene scores.

Details

The two functions are only for the purpose of studying.