SimilarityHeatmap: A heatmap of similarity values between compounds

Description Usage Arguments Details Value Author(s) Examples

View source: R/SimilarityHeatmap.R

Description

The function SimilarityHeatmap plots the similarity values between compounds. The darker the shade, the more similar compounds are. The option is available to set a cutoff value to highlight the most similar compounds.

Usage

1
2
3
SimilarityHeatmap(Data,type=c("data","clust","sim","dist"),
distmeasure="tanimoto",normalize=FALSE,method="Q",cutoff=NULL,
percentile=FALSE,plottype="new",location=NULL)

Arguments

Data

The data of which a heatmap should be drawn.

type

The type of data. Data can either be the data itself ("data"), the outcome of a clustering method ("clust'), a distance matrix ("dist") or a similarity matrix ("sim").

distmeasure

If type is "data", a distance measure for the clustering should be specified.

normalize

Logical. If type is "data", it can be specified whether the data should be normalized.

method

If type is "data" and normalize is TRUE, a method for normalization should be specified. See Normalization.

cutoff

Optional. If a cutoff value is specified, all values lower are put to zero while all other values are kept. This helps to highlight the most similar compounds.

percentile

Logical. The cutoff value can be a percentile. If one want the cutoff value to be the 90th percentile of the data, one should specify cutoff = 0.90 and percentile = TRUE.

plottype

Should be one of "pdf","new" or "sweave". If "pdf", a location should be provided in "location" and the figure is saved there. If "new" a new graphic device is opened and if "sweave", the figure is made compatible to appear in a sweave or knitr document, i.e. no new device is opened and the plot appears in the current device or document.

location

If plottype is "pdf", a location should be provided in "location" and the figure is saved there.

Details

If data is of type "clust", the distance matrix is extracted from the result and transformed to a similarity matrix. Possibly a range normalization is performed. If data is of type "dist", it is also transformed to a similarity matrix and cluster is performed on the distances. If data is of type "sim", the data is tranformed to a distance matrix on which clustering is performed. Once the similarity mattrix is obtained, the cutoff value is applied and a heatmap is drawn. If no cutoff value is desired, one can leave the default NULL specification.

Value

A heatmap with the names of the compounds on the right and bottom and a dendrogram of the clustering at the left and top.

Author(s)

Marijke Van Moerbeke

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
data(fingerprintMat)


MCF7_F = Cluster(fingerprintMat,type="data",distmeasure="tanimoto",normalize=FALSE,
method=NULL,clust="agnes",linkage="ward",gap=FALSE,maxK=55)

SimilarityHeatmap(Data=MCF7_F,type="clust",cutoff=0.90,percentile=TRUE)
SimilarityHeatmap(Data=MCF7_F,type="clust",cutoff=0.75,percentile=FALSE)


## End(Not run)

Example output

dev.new(): using pdf(file="Rplots1.pdf")

IntClust documentation built on May 2, 2019, 5:23 p.m.