Description Usage Arguments Value Author(s) See Also Examples
View source: R/plotSpectraHeatmap.R
This function generates a heatmap plot of associations between spectra (columns) and mutational signatures (rows), which may include statistical significance annotations based on shot noise modeling. By default, all spectra and signatures are plotted, but the user can provide custom subsets. Options are provided to plot only samples and/or signatures that satisfy statistical significance. A variety of association metrics can be chosen via type
; numerical results are returned.
1 2 3 4 5 6 7 8 9 10 11 | plotSpectraHeatmap(x, spectra.set=NULL, sig.set=NULL,
type=c("weights","cosine","entropy","correlation"),
cor.method = c("pearson","kendall","spearman"), signif=TRUE, pval=0.05,
signif.sig.only=FALSE, signif.sample.only=FALSE, xlab=NULL, ylab=NULL,
color=NULL, breaks=NULL, breaks.scale.adj=TRUE,
breaks.scale.adj.max=c("q99","q95","max"), scale="none", Rowv=FALSE, Colv=TRUE,
na.color=NULL, cexRow=NULL, srtRow=0, cexCol=NULL, srtCol=45, margins=c(5,5),
key=TRUE, key.title=NA, dendrogram="none", trace="none", notecol="red",
cor.notecol="white", notecex=1.5, main.title=NULL, col.title="black",
line.title=1, cex.title=0.95, subtitle=NULL, col.subtitle="red",
line.subtitle=-1, cex.subtitle=0.65, ...)
|
x |
|
spectra.set |
Vector of sample names. If |
sig.set |
Vector of signature names. If |
type |
Type of signature vs spectra matrix to show: |
cor.method |
Correlation method (if |
signif |
Logical to display statistical significance annotations. Default is |
pval |
P-value threshold for statistical significance. Default is 0.05. |
signif.sig.only |
Logical to only display statistically significant signatures. Default is |
signif.sample.only |
Logical to only display statistically significant samples. Default is |
xlab |
Label for x axis. |
ylab |
Label for y axis. |
color |
Heatmap color vector. Length must be one less than number of breaks. |
breaks |
Color breaks vector. |
breaks.scale.adj |
(If |
breaks.scale.adj.max |
(If |
scale |
Logical to scale the data for heatmap in either the row or column direction. Default is |
Rowv |
Logical to reorder rows (signatures) by hierarchical clustering. Default is |
Colv |
Logical to reorder columns (samples) by hierarchical clustering. Default is |
na.color |
Color to use for missing values. |
cexRow |
Size of row labels. |
srtRow |
Angle of row labels, in degrees from horizontal. |
cexCol |
Size of column labels. |
srtCol |
Angle of column labels, in degrees from horizontal. |
margins |
Numeric vector of length 2 containing the margins for column and row names, respectively. |
key |
Logical to display key. Default is |
key.title |
Main title of the color key. |
dendrogram |
To draw dendrograms. Default is |
trace |
To display trace lines. Default is |
notecol |
Color of statistical significance annotations for |
cor.notecol |
Color of statistical significance annotations for |
notecex |
Size of significance annotations. |
main.title |
Custom title. |
col.title |
Title color. |
line.title |
Title line position. |
cex.title |
Title size. |
subtitle |
Custom subtitle. |
col.subtitle |
Subtitle color. |
line.subtitle |
Subtitle line position. |
cex.subtitle |
Subtitle size. |
... |
Additional plotting parameters to be passed to |
A list with:
sig_spectra |
Numerical data frame with the values plotted in the heatmap across signatures (rows) and samples (columns). |
Julian Candia
Maintainer: Julian Candia julian.candia@nih.gov
mutSigMapper
, plotSpectraCaterpillar
1 2 3 4 | data(spectra)
map = mutSigMapper(spectra)
weights = plotSpectraHeatmap(map)
cos_sim = plotSpectraHeatmap(map,type="cosine")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.