Skip to contents

Custom wrapper for fora.

Usage

fora2(
  pathways,
  genes,
  universe,
  gene_column = "entrez_gene",
  minSize = 1,
  maxSize = length(universe) - 1,
  adjust.method = "scale",
  adjust.globally = TRUE
)

Arguments

pathways

output of link{msigdbr2}.

genes

named list of genes. These are usually clusters of related genes.

universe

character vector of background genes. Usually, this is all unique elements of genes.

gene_column

character; the name of the column in pathways containing the elements of each gene set.

minSize

integer; minimum size of gene sets allowed for testing.

maxSize

integer; maximum size of gene sets allowed for testing.

adjust.method

character string; p-value correction method. Either "scale" (default), which will compute scaled p-values or one of p.adjust.methods.

adjust.globally

logical; should p-values from all contrasts be adjusted together using adjust.method? Set to FALSE if the contrasts being tested are not closely related.

Details

If adjust.method = "scale", the function will calculate the maximum overlap for each combination of names(genes) and (if adjust.globally = TRUE), the entries of the "gs_subcat" column of pathways. For each gene set, it will then calculate the ratio of the size of that set's overlap to one plus the maximum overlap. The addition of 1 in the denominator is to penalize small maximum overlaps. The log10(pval) is multiplied by this overlap ratio and then back-transformed to obtain p-values adjusted by how well they describe each group defined by genes.

See also

Author

Tyler Sagendorf