get_expression_values: Get expression values

Description Usage Arguments Value Examples

View source: R/gene_plot.R

Description

Extract expression values, with the possibility to select other assay slots

Usage

1
get_expression_values(dds, gene, intgroup, assay = "counts", normalized = TRUE)

Arguments

dds

A DESeqDataSet object, normally obtained after running your data through the DESeq2 framework.

gene

Character, specifies the identifier of the feature (gene) to be extracted

intgroup

A character vector of names in colData(dds) to use for grouping.

assay

Character, specifies with assay of the dds object to use for reading out the expression values. Defaults to "counts".

normalized

Logical value, whether the expression values should be normalized by their size factor. Defaults to TRUE, applies when assay is "counts"

Value

A tidy data.frame with the expression values and covariates for further processing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library("macrophage")
library("DESeq2")
library("org.Hs.eg.db")
library("AnnotationDbi")

# dds object
data("gse", package = "macrophage")
dds_macrophage <- DESeqDataSet(gse, design = ~line + condition)
rownames(dds_macrophage) <- substr(rownames(dds_macrophage), 1, 15)
dds_macrophage <- estimateSizeFactors(dds_macrophage)

df_exp <- get_expression_values(dds_macrophage,
                                gene = "ENSG00000125347",
                                intgroup = "condition")
head(df_exp)

GeneTonic documentation built on Nov. 8, 2020, 5:27 p.m.