Extract expression values, with the possibility to select other assay slots
get_expression_values(
dds,
gene,
intgroup,
assay = "counts",
normalized = TRUE,
gtl = NULL
)
A DESeqDataSet
object, normally obtained after running your data
through the DESeq2
framework.
Character, specifies the identifier of the feature (gene) to be extracted
A character vector of names in colData(dds)
to use for grouping.
Character, specifies with assay of the dds
object to use for
reading out the expression values. Defaults to "counts".
Logical value, whether the expression values should be
normalized by their size factor. Defaults to TRUE, applies when assay
is
"counts"
A GeneTonic
-list object, containing in its slots the arguments
specified above: dds
, res_de
, res_enrich
, and annotation_obj
- the names
of the list must be specified following the content they are expecting
A tidy data.frame with the expression values and covariates for further processing
library("macrophage")
library("DESeq2")
library("org.Hs.eg.db")
library("AnnotationDbi")
# dds object
data("gse", package = "macrophage")
dds_macrophage <- DESeqDataSet(gse, design = ~ line + condition)
#> using counts and average transcript lengths from tximeta
rownames(dds_macrophage) <- substr(rownames(dds_macrophage), 1, 15)
dds_macrophage <- estimateSizeFactors(dds_macrophage)
#> using 'avgTxLength' from assays(dds), correcting for library size
df_exp <- get_expression_values(dds_macrophage,
gene = "ENSG00000125347",
intgroup = "condition"
)
#> Warning: Please use `mosdef::get_expr_values()` in replacement of the `get_expression_values()` function, originally located in the GeneTonic package.
#> Check the manual page for `?mosdef::get_expr_values()` to see the details on how to use it
head(df_exp)
#> exp_value condition
#> SAMEA103885102 819.6422 naive
#> SAMEA103885347 31852.1503 IFNg
#> SAMEA103885043 17874.4499 SL1344
#> SAMEA103885392 71361.7711 IFNg_SL1344
#> SAMEA103885182 1239.2723 naive
#> SAMEA103885136 41985.4038 IFNg