PomaDESeq: Differential Expression Analysis Based on the Negative...

View source: R/PomaDESeq.R

PomaDESeqR Documentation

Differential Expression Analysis Based on the Negative Binomial Distribution

Description

PomaDESeq estimates variance-mean dependence in count data from high-throughput sequencing assays and test for differential expression based on a model using the negative binomial distribution.

Usage

PomaDESeq(data, contrast = NULL, outcome = NULL, covs = NULL, adjust = "fdr")

Arguments

data

A SummarizedExperiment object.

contrast

Character. Indicates the comparison. For example, "Group1-Group2" or "control-intervention".

outcome

Character. Indicates the name of the colData column to be used as the outcome factor. Default is NULL (first factor variable in colData).

covs

Character vector. Indicates the names of colData columns to be included as covariates. Default is NULL (no covariates). If not NULL, a limma model will be fitted using the specified covariates. Note: The order of the covariates is important and should be listed in increasing order of importance in the experimental design.

adjust

Character. Indicates the multiple comparisons correction method. Options are: "fdr", "holm", "hochberg", "hommel", "bonferroni", "BH" and "BY".

Value

A tibble with the results.

Author(s)

Pol Castellano-Escuder

References

Love, M.I., Huber, W., Anders, S. Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2 Genome Biology 15(12):550 (2014)

Examples

#library("airway")
#data("airway")
#se <- airway
#
## Classic DESeq2
#DESeq_results <- se %>% 
#  PomaDESeq(contrast = NULL,
#            outcome = "dex",
#            covs = NULL,
#            adjust = "fdr")
#
#DESeq_results %>% 
#  dplyr::slice(1:10)
#
### Volcano plot
#DESeq_results %>% 
#  dplyr::select(feature, log2FC, pvalue) %>% 
#  PomaVolcano(labels = TRUE)
#
### Boxplot of top features
#se %>% 
#  PomaBoxplots(x = "features", 
#               outcome = "cell", # factorial variable to group by (e.g., treatment, sex, etc)
#               feature_name = DESeq_results$feature[1:10])
#
### Heatmap of top features
#se[rownames(se) %in% DESeq_results$feature[1:10]] %>% 
#  PomaHeatmap(covs = c("cell", "dex"), # covariates to plot (e.g., treatment, sex, etc)
#              feature_names = TRUE)
#
## DESeq2 with covariates
#DESeq_results <- se %>% 
#  PomaDESeq(contrast = NULL,
#            outcome = "dex",
#            covs = "cell",
#            adjust = "fdr")
#
#DESeq_results %>% 
#  dplyr::slice(1:10)
#
### Volcano plot
#DESeq_results %>% 
#  dplyr::select(feature, log2FC, adj_pvalue) %>% 
#  PomaVolcano(labels = TRUE, y_label = "-log10 (Adjusted P-value)")
#
### Boxplot of top features
#se %>% 
#  PomaBoxplots(x = "features", 
#               outcome = "dex", # factorial variable to group by (e.g., treatment, sex, etc)
#               feature_name = DESeq_results$feature[1:10])
#
### Heatmap of top features
#se[rownames(se) %in% DESeq_results$feature[1:10]] %>% 
#  PomaHeatmap(covs = c("cell", "dex"), # covariates to plot (e.g., treatment, sex, etc)
#              feature_names = TRUE)
#
## DESeq2 with covariates and batch
#DESeq_results <- se %>% 
#  PomaDESeq(contrast = NULL,
#            outcome = "dex",
#            covs = c("batch", "cell"),
#            adjust = "fdr")
#
#DESeq_results %>% 
#  dplyr::slice(1:10)
#
### Volcano plot
#DESeq_results %>% 
#  dplyr::select(feature, log2FC, adj_pvalue) %>% 
#  PomaVolcano(labels = TRUE, y_label = "-log10 (Adjusted P-value)")
#
### Boxplot of top features
#se %>% 
#  PomaBoxplots(x = "features", 
#               outcome = "cell", # factorial variable to group by (e.g., treatment, sex, etc)
#               feature_name = DESeq_results$feature[1:10])
#
### Heatmap of top features
#se[rownames(se) %in% DESeq_results$feature[1:10]] %>% 
#  PomaHeatmap(covs = c("cell", "dex"), # covariates to plot (e.g., treatment, sex, etc)
#              feature_names = TRUE)

pcastellanoescuder/POMA documentation built on Nov. 28, 2024, 1:21 p.m.