Skip to contents

Wrapper around DESeq2::DESeqDataSetFromMatrix() and DESeq2::DESeq() for tRNA abundance or charging data.

Usage

run_deseq(count_matrix, coldata, design, ...)

Arguments

count_matrix

An integer count matrix (from abundance_count_matrix() or charging_count_matrix()).

coldata

A data frame of sample metadata (from build_coldata()).

design

A formula specifying the design (e.g., ~ condition or ~ condition + charge_status + condition:charge_status).

...

Additional arguments passed to DESeq2::DESeq().

Value

A DESeqDataSet object.

Examples

# \donttest{
se <- create_clover(clover_example("ecoli/config.yaml"))
counts <- SummarizedExperiment::assay(se, "counts")
coldata <- as.data.frame(SummarizedExperiment::colData(se))
coldata$condition <- ifelse(
  grepl("ctl", coldata$sample_id), "ctl", "inf"
)
dds <- run_deseq(counts, coldata, design = ~condition)
#> Warning: some variables in design formula are characters, converting to factors
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
# }