res2df: Work in PROGRESS. Convert a general DESeq2 result object into...

View source: R/deseq2_utils.R

res2dfR Documentation

Work in PROGRESS. Convert a general DESeq2 result object into a data frame.

Description

Work in PROGRESS. Convert a general DESeq2 result object into a data frame.

Usage

res2df(
  res,
  map_gene_IDs = F,
  histone_PTMs = F,
  pval_cutoff = 0.05,
  log2FC_cutoff = 0
)

Arguments

res

A DESeq2 object created with results() or lfcShrink()

map_gene_IDs

Logical. Do you want to convert ensembl gene IDs to gene names?

histone_PTMs

Logical. Are you analysing histone PTMs? Used to name the first column First_Col to be compatible with other functions.

pval_cutoff

Numeric threshold to consider observations statistically significant. Default 0.05.

log2FC_cutoff

Numeric threshold to consider observations moving in a given direction (UP or DOWN). Default 0.

Value

A tibble data frame

Examples


# Somewhere in your DESeq2 analysis
resLFC <- lfcShrink(dds, coef = "condition_treated_vs_untreated", type = "apeglm")
res_as_df <- res2df(resLFC)

Ni-Ar/niar documentation built on Feb. 3, 2025, 9:25 a.m.