do.goseq: Performs goseq analysis significance of gene set membership.

Description Usage Arguments Details Value

View source: R/do.goseq.R

Description

Genes are selected for testing against each geneset by virture of them passing a maximum FDR and minimum log fold change as perscribed by the min.logFC and max.padj parameters, respectfully.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
do.goseq(
  gsd,
  x,
  design,
  contrast = ncol(design),
  feature.bias,
  goseq.method = "Wallenius",
  repcnt = 2000,
  use_genes_without_cat = TRUE,
  split.updown = TRUE,
  direction = c("over", "under"),
  plot.fit = FALSE,
  use.treat = FALSE,
  feature.min.logFC = if (use.treat) log2(1.25) else 1,
  feature.max.padj = 0.1,
  logFC = NULL,
  ...
)

Arguments

gsd

The GeneSetDb for analysis

x

The expression object

design

Experimental design

contrast

The contrast to test

feature.bias

a named vector as long as nrow(x) that has the "bias" information for the features/genes tested (ie. vector of gene lengths). names(feature.bias) should equal rownames(x). The caller MUST provide this. The goseq package provides a getlength function which facilitates getting default values for these if you do not have the correct values used in your analysis. If there is no way for you to get this information, then use ora with no feature.bias vector.

repcnt

Number of random samples to be calculated when random sampling is used. Ignored unless method="Sampling".

use_genes_without_cat

A boolean to indicate whether genes without a categorie should still be used. For example, a large number of gene may have no GO term annotated. If this option is set to FALSE, those genes will be ignored in the calculation of p-values (default behaviour). If this option is set to TRUE, then these genes will count towards the total number of genes outside the category being tested.

direction

Same as direction in GOstats

plot.fit

To plot (or not) the bias in selected genes vs. feature.bias.

logFC

The logFC data.table from calculateIndividualLogFC

...

arguments to pass down into calculateIndividualLogFC

method

The method to use to calculate the unbiased category enrichment scores

Details

Note that we are intentionally adding a hyperG.selected column by reference so that this information is kicked back to the caller multiGSEA function and included in downstream reporting.

This function is not meant to be called directly. It should only be called internally within multiGSEA().

Value

A data.table of goseq results. The "pval" column here refers to pval.over, for simplicity in other places. If split.updown=TRUE, a list of data.table's are returned named 'goseq', 'goseq.up', and 'goseq.down' which are the results of running goseq three independent times.


lianos/multiGSEA documentation built on Nov. 17, 2020, 1:26 p.m.