View source: R/rnaseq_functions.R
runDESeq2 | R Documentation |
Differential expression analysis with DESeq2
runDESeq2(
data,
design = NULL,
formula = ~1,
contrasts = NULL,
lrt_reduced = NULL,
prefilter = NULL,
postfilter = NULL,
min_counts = 5,
min_samples = 2,
ctrlgenes = NULL,
sizefactors = NULL,
RUV = list(),
SVA = list(),
alpha = 0.05,
ordered = TRUE,
df = TRUE,
ncores = NULL,
shrink = TRUE,
ihw = TRUE,
vst = FALSE,
rlog = FALSE,
minReplicatesForReplace = 7,
fitType = "parametric",
...
)
data |
Counts matrix |
design |
Experimental design/colData |
formula |
Formula |
contrasts |
Named list of contrasts, specified as c(factor, level, reflevel) |
lrt_reduced |
Reduced formula for LRT test |
prefilter |
Filter before normalization |
postfilter |
Filter after normalization |
min_counts |
min_counts in min_samples for filtering |
min_samples |
min_counts in min_samples for filtering |
ctrlgenes |
Control genes for normalization (housekeeping genes) |
sizefactors |
Pre-calculated size factors |
RUV |
RUV batch effect correction: 'list(empirical = genes, group = column, n = n_vars)' |
SVA |
SVA batch effect correction: 'list(reduced = formula, n = n_vars)' |
alpha |
Significance level (default = 0.05) |
ordered |
Order results (default = TRUE) |
df |
Return results as data.frame |
ncores |
Parallel processing |
shrink |
Use ashr for log2FC shrinkage |
ihw |
Use independent hypothesis weighting |
vst |
Add vst-transformed assay |
rlog |
Add rlog-transformed assay |
minReplicatesForReplace |
Required number of replicates to replace outliers |
fitType |
Fit type of dispresion estimate (parametric, local, mean or glmGamPoi) |
... |
Parameters passed to DESeq |
dds <- DESeq2::makeExampleDESeqDataSet(n = 10000, interceptMean = c(2,5))
dds |> runDESeq2(formula = ~ condition, contrasts = list(BvsA = c("condition", "B", "A")))
dds |> runDESeq2(formula = ~ condition, lrt_reduced = ~ 1)
dds |> runDESeq2(formula = ~ condition, contrasts = list(BvsA = c("condition", "B", "A")), vst = TRUE, ncores = 5)
dds |> runDESeq2(formula = ~ condition, RUV = list(empirical = sample(rownames(dds), 10)), contrasts = list(BvsA = c("condition", "B", "A")))
dds |> runDESeq2(formula = ~ condition, SVA = list(reduced = ~ 1), contrasts = list(BvsA = c("condition", "B", "A")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.