wrapLimma: Differential expression analysis with limma

Description Usage Arguments Details Value Author(s)

View source: R/GEX_wrapLimma.R

Description

Differential Gene expression analysis for multiple group comparisons incl. output of Venn diagrams, volcano plots and heatmaps.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
wrapLimma(
  data,
  comparisons,
  p.value.threshold = 0.05,
  adjust.method = "BH",
  FC.threshold = log2(1.5),
  projectfolder = file.path("GEX/limma"),
  projectname = "",
  matchvar = NULL,
  Symbol.column = "SYMBOL",
  sampleColumn = "Sample_Name",
  groupColumn = "Sample_Group",
  useWeights = TRUE,
  geneAnno2keep = NULL,
  venn_comparisons = NULL,
  maxHM = 50,
  scale = c("none"),
  HMcexRow = 1.1,
  HMcexCol = 1.1,
  figure.res = 300,
  HMincludeRelevantSamplesOnly = TRUE,
  color.palette = "heat.colors",
  FC.heatmap.comparisons = NULL,
  FC.heatmap.geneselection = c("allprobes", "intersect", "union")
)

Arguments

data

ExpressionSet, SummarizedExperiment, DESeqDataSet or MethylSet.

comparisons

character vector with group comparisons in format "groupA-groupB" or nested comparisons in format "(groupA-groupB)-(groupC-groupD)".

p.value.threshold

numeric p-value threshold

adjust.method

adjustment method for multiple testing ("none", "BH", "BY" and "holm")

FC.threshold

numeric foldchange threshold. If data is log2-transformed, mind to transform threshold, too.

projectfolder

character with directory for output files (will be generated if not exisiting).

projectname

optional character prefix for output file names.

matchvar

(character) if paired design, name of column to be used to group samples. NULL for unpaired design.

Symbol.column

character with column name of Gene Symbols in data or NULL.

sampleColumn

character with column name of Sample names in data

groupColumn

character with column name of group names in data. Group names must match comparisons!

useWeights

(boolean) if TRUE, arrays are weighted for their quality.

geneAnno2keep

(character vector) annotation columns in feature data to keep in output

venn_comparisons

character vector or (named) list of character vectors with group comparisons to be included in Venn Diagram (max 5 comparisons per Venn diagramm). Must be subset of comparisons or NULL.

maxHM

(numeric) max number of top diff. regulated elements printed in Heatmap

scale

character indicating if the values should be centered and scaled in either the row direction or the column direction, or none (default). Either "none", "row" or "column".

HMcexRow

labelsize for rownames in Heatmap

HMcexCol

labelsize for colnames in Heatmap

figure.res

numeric resolution for png.

HMincludeRelevantSamplesOnly

(boolean) if TRUE include only Samples in heatmap, which belong to the groups of the respective group comparison. If FALSE, all samples are plotted in the heatmaps. If a custom selection of sample groups is required for the heatmap of each group comparison, HMincludeRelevantSamplesOnly can be a named list of the form list("groupA-groupB" = c("groupA", "groupB", "groupX"))

color.palette

select color palette for heatmaps

FC.heatmap.comparisons

character vector or (named) list of character vectors with group comparsions to be included in foldchange heatmaps. One FC heatmap is generated for each character vector. If NULL no FC heatmaps are generated.

FC.heatmap.geneselection

character vector containing elements of c("all", "intersect", "union"). Which probes shall be used for foldchange heatmaps? "allprobes": no restriction, "intersect": only probes are used which are differentially expressed in all respective group comparisons. "union": only probes are used which are differentially expressed in any of the respective group comparisons. Probes are prioritised by F-Test p-value calculated for all group comparisons denoted in comparisons as well as by minimum adjusted p-value of respective group comparisons plotted in this heatmap. Obsolete if FC.heatmap.comparisons is NULL.

Details

Function generates design matrix, fit and differential expression results for dedicated group comparisons of the input object. Analysis is performed either for one group comparison in paired design or for any number of unpaired group comparisons. The group designations in the groupColumn must match the contrasts given in comparisons ("groupA-groupB"). P-value and foldchange thresholds may be applied to filter result data. Volcano plots are generated for each group comparison given in comparisons with highligted significance thresholds. Heatmaps with sample signal intensities are generated for top differentially expressed genes for each group comparison. Additionally heatmaps indicating foldchanges can be generated for each set of group comparisons given in FC.heatmap.comparisons. Selection of probes with respect to these group comparisons is characterised in FC.heatmap.geneselection. If the resulting number of probes exceeds maxHM, probes are prioritized by either F-Test p-value or by minimum p-value of selected group comparisons.

Value

List of 2 elements

An F-Test and a Venn Diagramm of all comparisons as well as filtered and unfiltered result tables, heatmaps and volcano plots for each group comparison are stored as side-effects in the project folder.

Author(s)

Frank Ruehle


frankRuehle/systemsbio documentation built on Sept. 14, 2020, 1:18 a.m.