h_diff_expr_deseq2: 'DESeq2' Differential Expression Analysis

View source: R/differential.R

h_diff_expr_deseq2R Documentation

DESeq2 Differential Expression Analysis

Description

[Experimental]

This helper functions performs the differential expression analysis with DESeq2::DESeq() for a given AnyHermesData input and design matrix.

Usage

h_diff_expr_deseq2(object, design, ...)

Arguments

object

(HermesData)
input.

design

(matrix)
design matrix.

...

additional arguments internally passed to DESeq2::DESeq() (fitType, sfType, minReplicatesForReplace, useT, minmu).

Value

A data frame with columns log2_fc (estimated log2 fold change), stat (Wald statistic), p_val (raw p-value), adj_p_pval (Benjamini-Hochberg adjusted p-value).

References

\insertRef

DESeq2_packagehermes

Examples

object <- hermes_data

# Create the design matrix corresponding to the factor of interest.
design <- model.matrix(~SEX, colData(object))

# Then perform the `DESeq2` differential expression analysis.
result <- h_diff_expr_deseq2(object, design)
head(result)

# Change of the `fitType` can be required in some cases.
result2 <- h_diff_expr_deseq2(object, design, fitType = "local")
head(result2)

insightsengineering/hermes documentation built on Sept. 19, 2024, 9:06 p.m.