plotCorrelationHeat: plotCorrelationHeat

Description Usage Arguments Value Author(s) Examples

View source: R/plotCorrelationHeat.R

Description

plotCorrelationHeat uses the specificity scores returned by sortGenes to correlate cell clusters with each other and plot a heatmap.

Usage

1
2
3
4
5
6
7
8
9
plotCorrelationHeat(
  gs,
  markers = NULL,
  corMethod = "pearson",
  colors = colorRampPalette(rev(c("orangered4", "orangered", "gray90", "dodgerblue",
    "dodgerblue4")))(n = 100),
  outs = FALSE,
  displayNumbers = TRUE
)

Arguments

gs

The output of sortGenes.

markers

Restrict correlation analysis to those genes. A character vector.

corMethod

Correlation method, will passed to method in the function cor.

colors

Color palette for drawing the heatmap

outs

Should the pheatmap object and correlation matrix be returned? FALSE by default.

displayNumbers

Should correlation values be displayed on the heatmap? TRUE by default.

Value

If outs is TRUE, the pheatmap object and the correlation matrix will be returned.

Author(s)

Mahmoud M Ibrahim <mmibrahim@pm.me>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(kidneyTabulaMuris)
gs = sortGenes(kidneyTabulaMuris$exp, kidneyTabulaMuris$cellType)
plotCorrelationHeat(gs)

#user only marker genes and spearman correlation
mm = getMarkers(gs, quant = 0.95)
plotCorrelationHeat(gs, markers = mm$markers, corMethod = "spearman")

#do not write correlation values, useful if there are many cell clusters
plotCorrelationHeat(gs, markers = mm$markers, corMethod = "spearman", displayNumbers = FALSE)

mahmoudibrahim/genesorteR documentation built on April 20, 2021, 4:07 p.m.