The function provides a reference implementation of differential expression analysis using DESeq. It is possible to replace this function by any other method generating at least the log2 fold change, a p-value and an IHW p-value for each unique sequence to be compatible with downstream functions.
runDESeq2(count_table, pheno_info, design, contrast, effect_name, shrink_type = "normal", out_dir, prefix = "DESeq2")
count_table | The count table generated by createCountTableFromFastQs |
---|---|
pheno_info | A data frame with sample identifiers as row names including the columns used for the design formula. The sample identifiers must be identical to those in the count_table. |
design | Design formula for differential expression analysis |
contrast | Argument to specify the comparison for which the results table will be generated (corresponds to 'contrast' argument in results and lfcShrink). Required if interaction terms are part of the design formula. |
effect_name | Argument to specify the comparision for which the results table will be generated (corresponds to 'name' argument in results and 'coef' argument in lfcShrink). Required if interaction terms are part of the design formula. |
shrink_type | DESeq2 shrinkage estimator (corresponds to 'type' argument in lfcShrink). |
out_dir | Directory to save sample distance map, PCA and MA plot. |
prefix | Prefix for the names of the PDF files containing the sample distance map, the PCA and the MA plot. |
Returns a list consisting of 'normCounts' and the 'deResult'. 'normCounts' is a data frame of normalized counts with sequences as row names. 'deResult' is a data frame with sequences as row names and the columns 'pvalue', 'padj', 'baseMean', 'log2FoldChange', 'lfcSE', 'stat', 'IHWPval'. See results and ihw.default for further documentation on the columns.