Newer
Older
% Please edit documentation in R/wrapper_dds.R
\name{wrap_dds}
\alias{wrap_dds}
wrap_dds(dds, lfcThreshold, altHypothesis, correction_method = "BH")
}
\arguments{
\item{dds}{A DESeqDataSet object containing the count data and experimental design.}
\item{lfcThreshold}{The threshold for minimum log-fold change (LFC) to consider differentially expressed.}
\item{altHypothesis}{The alternative hypothesis for the analysis, indicating the direction of change.
Options are "greater", "less", or "two.sided".}
\item{correction_method}{The method for p-value correction. Default is "BH" (Benjamini-Hochberg).}
}
\value{
A list containing the dispersion values and the results of the differential expression analysis.
The dispersion values are calculated from the dds object and named according to sample names.
The inference results include adjusted p-values and log2 fold changes for each gene.
}
\description{
This function performs differential expression analysis using DESeq2 based on the provided
DESeqDataSet (dds) object. It calculates the dispersion values from the dds object and then
performs inference on the log-fold change (LFC) values using the specified parameters.
}
\examples{
N_GENES = 100
MAX_REPLICATES = 5
MIN_REPLICATES = 5
## --init variable
input_var_list <- init_variable( name = "genotype", sd = 0.1, level = 3) \%>\%
init_variable(name = "environment", NA , level = 2)
mock_data <- mock_rnaseq(input_var_list, N_GENES, MIN_REPLICATES, MAX_REPLICATES)
dds <- DESeq2::DESeqDataSetFromMatrix(mock_data$counts ,
mock_data$metadata, ~ genotype + environment)
dds <- DESeq2::DESeq(dds, quiet = TRUE)
result <- wrap_dds(dds, lfcThreshold = 1, altHypothesis = "greater")