diffExp | R Documentation |
Identifies differentially expressed genes by using the linear model approach of limma. Optionally produces a Venn diagram, heatmap, Polar plot and volcano plot.
diffExp( arrayData, contrasts, chromosomeMapping, fitMethod = "ls", adjustMethod = "fdr", significance = 0.001, plot = TRUE, heatmapCutoff = 1e-10, volcanoFC = 2, colors = c("red", "green", "blue", "yellow", "orange", "purple", "tan", "cyan", "gray60", "black"), save = FALSE, verbose = TRUE )
arrayData |
an object of class |
contrasts |
a character vector giving the contrasts to be tested for
differential expression. Use |
chromosomeMapping |
character string giving the name of the chromosome
mapping file, or an object of class |
fitMethod |
character string giving the fitting method used by
|
adjustMethod |
character string giving the method to use for adjustment
of multiple testing. Can be |
significance |
number giving the significance cutoff level for the Venn
diagram and the horizontal line drawn in the volcano plot. Defaults to
|
plot |
should plots be produced? Set either to |
heatmapCutoff |
number giving the significance cutoff level for the
heatmap. Defaults to |
volcanoFC |
number giving the x-coordinates of the vertical lines drawn
in the volcano plot. Defaults to |
colors |
character vector of colors to be used by the Venn diagram and Polar plot. |
save |
should the figures and p-values be saved? Defaults to
|
verbose |
verbose? Defaults to |
This function uses limma to calculate p-values measuring
differential expression in the given contrasts
. The
uniqueFactors
given by extractFactors
can be used to
define a contrast vector, where each element should be a character string on
the form "uniqueFactorA - uniqueFactorB"
, note the space surrounding
the -
. (See the example below and for extractFactors
.)
If appropriate annotation is missing for the ArrayData
object the
user can suppply this as chromosomeMapping
. This should be either a
data.frame
or a tab delimited text file and include the columns
chromosome with the chromosome name and chromosome location
containing the starting position of each gene. A -
sign can be used
to denote the antisense strand but this will be disregarded while plotting.
The rownames should be probe IDs or, if using a text file, the first
column with a column header should contain the probe IDs.
Note that the fitMethod="robust"
may need longer time to run.
A Venn diagram can be drawn for up to five contrasts (diffExp()
will
use vennDiagram
).
The heatmap shows normalized expression values of the genes that pass the
heatmapCutoff
in at least one contrast.
A volcano plot is produced for each contrast showing magnitude of change versus significance.
The Polar plot sorts the genes according to chromosomal location, for each chromosome starting with unknown positions followed by increasing number in the chromosome location column. Genes which do not map to any chromosome are listed as U for unknown. The radial lines in the Polar plot are -log10 scaled p-values, so that a longer line means a smaller p-value. This gives an overview of the magnitude of differential expression for each contrast.
Typical usages are:
# Identify significantly changed genes in 'm1' and 'm2' compared to 'wt': diffExp(arrayData, contrasts=c("m1 - wt", "m2 - wt"))
A list
with elements:
pValues |
|
foldChanges |
|
resTable |
a |
vennMembers |
|
Leif Varemo piano.rpkg@gmail.com and Intawat Nookaew piano.rpkg@gmail.com
Smyth, G. K. (2005). Limma: linear models for microarray data. In: 'Bioinformatics and Computational Biology Solutions using R and Bioconductor'. R. Gentleman, V. Carey, S. Dudoit, R. Irizarry, W. Huber (eds), Springer, New York, pages 397–420.
piano, loadMAdata
,
extractFactors
, polarPlot
, runGSA
,
limma, venn
, heatmap.2
# Get path to example data and setup files: dataPath <- system.file("extdata", package="piano") # Load normalized data: myArrayData <- loadMAdata(datadir=dataPath, dataNorm="norm_data.txt.gz", platform="yeast2") # Perform differential expression analysis: pfc <- diffExp(myArrayData, contrasts=c("aerobic_Clim - anaerobic_Clim", "aerobic_Nlim - anaerobic_Nlim")) # Order the genes according to p-values, for aerobic_Clim vs anaerobic_Clim: o <- order(pfc$resTable$'aerobic_Clim - anaerobic_Clim'$P.Value) # Display statistics for the top 10 significant genes: pfc$resTable$'aerobic_Clim - anaerobic_Clim'[o[1:10],]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.