multi_de_pairs {consensusDE} | R Documentation |
Given a summarized experiment generated using buildSummarized() this function will automatically perform differential expression (DE) analysis for all possible groups using 3 different methods 1) EdgeR, 2) Voom and 3) DEseq2. It will also output 10x diagnostic plots automatically, if the plotting options are selected (see ?diag_plots for more details).
multi_de_pairs(summarized = NULL, paired = "unpaired", intercept = NULL, adjust_method = "BH", ruv_correct = FALSE, ensembl_annotate = NULL, plot_dir = NULL, output_voom = NULL, output_edger = NULL, output_deseq = NULL, output_combined = NULL, verbose = FALSE, legend = TRUE, label = TRUE)
summarized |
A "RangedSummarizedExperiment" object with included groups to be analysed. For format specifications see ?buildSummarized. E.g. accessible as "summarized$group". Groups are used to automate colouring of samples in unsupervised analyses. Default = NULL |
paired |
Are the sample paired? If "paired" a paired statistical analysis by including factors as pairs described in the "pairs" column of the "RangedSummarizedExperiment" object in the model (accessible as summarized$pairs). Options are "unpaired" or "paired". Default="unpaired" |
intercept |
Optional ability to set the base term for fitting the model. This is not necessary as all pairs are computed automatically. The base term, if set, must match the name of group in "summarized$group". Default = NULL |
adjust_method |
Method used for multiple comparison adjustment of p-values. Options are: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr" or "none". See ?p.adjust.methods for a details description and references. Default = "BH" |
ruv_correct |
Remove Unwanted Variation (RUV)? See ?RUVr for description. Currently only RUVr, which used the residuals is enabled and one factor of variation is determined. If set to TRUE and a "plot_dir" is provided, additional plots after RUV correction and the RUV residuals will be reported. Residuals are obtained through fitting a generalised linear model (GLM) using EdgeR. Residuals are then incorporated into the SummarizedExperiment object and models for DE analysis. Options = TRUE, FALSE. Default = FALSE. |
ensembl_annotate |
If the dataset has been mapped to ensembl transcript identifiers, obtain additional annotation of the ensembl transcripts. A R Genome Wide Annotation object e.g. org.Mm.eg.db for mouse or org.Hs.eg.db for human must be provided. Default = NULL |
plot_dir |
Full path to directory for output of plots (pdf files). See ?diag_plots for more details. Default = NULL |
output_voom |
If you wish to output the results of the Voom analysis, provide a full path to directory for output of files. Default = NULL |
output_edger |
If you wish to output the results of the EdgeR analysis, provide a full path to directory for output of files. Default = NULL |
output_deseq |
If you wish to output the results of the DEseq2 analysis, provide a full path to directory for output of files. Default = NULL |
output_combined |
consensusDE will report the results of Voom, EdgeR and DEseq2 as a combined report. If you wish to output the results of the COMBINED analysis, provide a full path to directory for output of files. In addition to the combined data, it will also output the raw count and normalised data to the same directory. Default = NULL |
verbose |
Verbosity ON/OFF. Default=FALSE |
legend |
Include legend in plots? Legend is based on group data in summarized Options: TRUE, FALSE. Default = TRUE |
label |
Include point labels in plots? Points are based on ID column after DE analysis from merged results. Options: TRUE, FALSE. Default = TRUE |
A list of all the comparisons conducted. ## See vignette for more details.
## Load the example data set and attach - see vignette for more details ## The example below will perfrom DE analysis on all pairs of data library(airway) data(airway) ## Name groups of the data. colData(airway)$group <- colData(airway)$dex ## Identify file locations colData(airway)$file <- rownames(colData(airway)) #' ## Filter low count data: airway_filter <- buildSummarized(summarized = airway, filter = TRUE) ## for illustration, we only use random sample of 1000 transcripts set.seed(1234) airway_filter <- sample(airway_filter, 1000) ## Run multi_de_pairs() with-out RUV correction ## To run with RUV correction, use ruv_correct = TRUE all_pairs_airway <- multi_de_pairs(summarized = airway_filter, ruv_correct = FALSE, paired = "unpaired")