sim.plot.zscore.heatmap {SIM} | R Documentation |
Produces an association heatmap that shows the association (standardized influence) of each independent feature (expression measurement) with each dependent feature (copy number measurement). A p-value bar on the left indicates test signficance. A color bar on top indicates genes with mean z-scores across the signficant copy number probes above a set threshold. A summary of the copy number data helps to identify what copy number alterations are present in a region of association with expression. Positive association can mean copy number gain and increased expression, or deletion and decreased expression. The heatmaps can also be used in an exploratory analysis, looking for very local effects of copy number changes (usually small amplifications) on gene expression, that do not lead to a significant test result.
sim.plot.zscore.heatmap(input.regions = "all chrs", significance = 0.2, z.threshold = 3, show.names.indep = FALSE, show.names.dep = FALSE, adjust.method = c("BY", "BH", "raw"), scale = "auto", plot.method = c("none"), Normal.data = if (plot.method == "clac") FALSE, windowsize = 5, lambda = 2, subtype = FALSE, acgh.heatmap.scale = "auto", pdf = TRUE, run.name = NULL, ...)
input.regions |
vector indicating the regions to be analyzed. Can be defined in four ways:
1) predefined input region: insert a predefined input region, choices are:
"all chrs" , "all chrs auto" , "all arms" , "all arms auto"
In the predefined regions "all arms" and "all arms auto" the arms 13p,
14p, 15p, 21p and 22p are left out, because in most studies there are no or few probes
in these regions. To include them, just make your own vector of arms.
2) whole chromosome(s): insert a single chromosome or a list of chromosomes as a vector:
c(1, 2, 3) .
3) chromosome arms: insert a single chromosome arm or a list of chromosome arms like
c("1q", "2p", "2q") .
4) subregions of a chromosome: insert a chromosome number followed by the start and end position
like c("chr1_1-1000000")
These regions can also be combined, e.g. c("chr1_1-1000000","2q", 3) .
See details for more information. |
significance |
Threshold to select the significant dependent features. Only these features are used to calculate the mean z-scores per independent feature (expression probe). |
z.threshold |
Threshold to display a green or red bar in the color bar on top of
the heatmap for independent features with mean z-scores above z.threshold (high positive
association) or below -z.threshold (high negative association). |
show.names.indep |
Boolean . If set to TRUE, displays the names (indep.id and in
dep.symb entered in the assemble.data ) of the independent features with mean z-scores above or
below the z.threshold in the heatmap. |
show.names.dep |
Boolean . If set to TRUE, displays the names (dep.id and dep.sy
mb entered in the assemble.data ) of the significant dependent features in the heatmap. |
adjust.method |
Method used to adjust the p-values for multiple
testing. Either "BY" (recommended when copy number is used as dependent data),
"BH" or "raw" . See SIM for more information about adjusting
p-values. Defaults to "BY". |
scale |
Vector specifying the color scale in the heatmap. If scale="auto", the maximum and minimum value of all z-scores will be calculated and set as the limits for all analyzed regions. Another option is to define a custom scale, e.g. scale = c(-5,5). |
plot.method |
Summary plot of copy number data in left panel. Either "clac" ,
"smooth" ,"heatmap" , or "none" . Should only be used when the dep.data
is array-CGH. The "clac" plot is a consensus of the aberration frequencies across
all samples. CLAC requires at least three normal/diploid arrays. For more details see
?clac.preparenormal.R . The "smooth" plot smoothes the copy number log ratios
per sample, see ?quantsmooth for more details. The "heatmap" method produces
an aCGH heatmap where green indicates gain, and red loss. The scale of the aCGH heatmap
is automatically set to the min and max of the aCGH measurements of the analyzed regions.
Default is plot.method = "none" , no additional plot will be drawn. |
Normal.data |
vector , required for plot.method = "clac" , indicating
least three normal samples in the dependent data. Insert the column names of
the samples that are normal e.g. for the first three samples : Normal.data = 1:3 .
If no normal samples are available, use Normal.data = FALSE. Then Normal.data
are generated by calculating probe medians of three subsets of the dependent data. |
windowsize |
Numeric value, specifying the window size to carry out the average
smooth for plot.method="clac" . For more details see ?clac.preparenormal.R . |
lambda |
Numeric value, specifying the quantile smoothing parameter for
plot.method="smooth" . See ?quantsmooth and references for more information. |
subtype |
This variable must be a vector with the same length as samples or FALSE. The
vector will be transformed to a factor and the levels of this will be coloured according to
their subtype. When subtype =FALSE, all the samples will be coloured black. |
acgh.heatmap.scale |
Vector specifiing the color scale in the aCGH heatmap. If scale="auto", the maximum and minimum value of all aCGH values will be calculated and set as the limits for all analyzed regions. Another option is to define a custom scale, e.g. scale = c(-5,5). |
pdf |
Logical. Indicate whether to generate a pdf of the plots in the heatmap_zscores subdirectory or plot to screen. |
run.name |
Name of the analysis. The results will be
stored in a folder with this name in the current working directory
(use getwd() to print the current working directory).
If the run.name = NULL , the default folder "analysis_results" will be generated. |
... |
additional arguments passed on to image |
The sim.plot.zscore.heatmap
function can only run after the integrated.analysis
is run with zscores = TRUE
.
The results are returned as a single-page pdf containing an association heatmap of the regions
listed in input.regions
. For high-density arrays large files will be produced, both
demanding more memory available from your computer to produce them as well as being heavier to
open on screen. To avoid this, analyze chromosome arms as units instead of chromosomes, both
here and in input.regions = "all arms"
.
The heatmap contains the z-scores generated by the function integrated.analysis
with
zscores=T
. The dependent features are plotted from bottom to top, the independent
features from left to right. Positive associations are shown in green, negative associations in red
(color scale on the right). At the left side of the heatmap a color bar represents the
multiple testing corrected p-values of the probes in the dependent data (copy number), also
with a color legend. Dependening on which plot.method
is used, a summary of copy number
changes is shown on the left. At the top of the heatmap is a color bar corresponding to
the mean z-scores of the independent features (expression data) that are above or below
the z.threshold
. If show.names.indep
is set to TRUE, labels will be drawn for
the probes with mean z-scores greater than z.threshold
or lower than -z.threshold
at the bottom of the heatmap. If show.names.dep
is set to TRUE, labels will be drawn for
the significant dependent probes lower than significance
to the right of the heatmap.
No values are returned. The results are stored in a subdirectory of run.name
as pdf.
Marten Boetzer, Melle Sieswerda, Renee X. de Menezes R.X.Menezes@lumc.nl
SIM
, assemble.data
, integrated.analysis
,
sim.plot.pvals.on.region
, sim.plot.pvals.on.genome
,
tabulate.pvals
, tabulate.top.dep.features
,
tabulate.top.indep.features
, impute.nas.by.surrounding
,
sim.update.chrom.table
,image.plot
,maPalette
#load the datasets and the samples to run the integration for data(expr.data) data(acgh.data) data(samples) #assemble the data assemble.data(dep.data = acgh.data, indep.data = expr.data, ann.dep = colnames(acgh.data)[1:4], ann.indep = colnames(expr.data)[1:4], dep.id="ID",dep.chr = "CHROMOSOME",dep.pos = "STARTPOS",dep.symb="Symbol", indep.id="ID",indep.chr = "CHROMOSOME", indep.pos = "STARTPOS", indep.symb="Symbol", overwrite = TRUE,run.name ="chr8") #run the integrated analysis integrated.analysis(samples = samples, input.regions = 8, adjust=FALSE, zscores=TRUE, method = "auto", run.name= "chr8") # use functions to plot the results of the integrated analysis #plot the zscores in a heatmap sim.plot.zscore.heatmap(input.regions = 8, significance=0.2, z.threshold=3, show.names.dep=TRUE, show.names.indep=TRUE, adjust.method = c("BY"), scale="auto", plot.method = "smooth", pdf = FALSE, run.name = "chr8")