makeDiffExprFile: Make differential expression results file.

View source: R/makeDiffExprFile.R

makeDiffExprFileR Documentation

Make differential expression results file.

Description

Make a data frame or text file containing coefficients, p-, and q-values from Limma differential expression analysis. If returns == "all", will also center the log-expression data on the median of base.group expression, and include the expression data in the output.

Usage

makeDiffExprFile(
  limmaResults,
  filename = NULL,
  returns = c("all", "stats"),
  skip.first = TRUE
)

Arguments

limmaResults

Result from runLimmaAnalysis

filename

The desired name for the output tab-delimited text file. If NULL (default) the resulting table will be returned as an R data frame.

returns

If "all" (default), will center the log-expression data on median of base.group expression and include the expression data in the output. If "stats", will only include the differential expression statistics.

skip.first

Logical: Skip the first factor for gene set analysis? Frequently the first factor is the 'Intercept', which is generally uninteresting for GSEA (default TRUE).

Value

A table of differential expression results

Examples

data("ExampleResults") # Results from runLimmaAnalysis

# Include expression data in the results table
deResults <- makeDiffExprFile(ExampleResults, returns = "all")

# Only include statistics, and save to a .txt file

makeDiffExprFile(ExampleResults, file = "DE.txt",
                 returns = "stats")


calebclass/NanoTube documentation built on Nov. 21, 2023, 12:31 p.m.