heatmap_cor_dist: heatmap for set of cells and odours based on correlation...

Description Usage Arguments Examples

View source: R/heatmap.R

Description

heatmap for set of cells and odours based on correlation distance

spike_cor_dist calculate the cross-correlation between the spike responses of a set of cells. It is called by heatmap_cor_dist but you may wish to use this data directly.

Usage

1
2
3
4
heatmap_cor_dist(cells, odours, col = jet.colors(20), labRow = NULL,
  labCol = NULL, ColSideColors, RowSideColors, heatmapfun = heatmap, ...)

spike_cor_dist(cells, odours)

Arguments

cells

Character specifying cells to plot OR a data.frame containing information about those cells

odours

Character vector specifying odours to plot

col

Character vector of colour levels generated by a colour palette function such as jet.colors. Defaults to jet.colors(20).

labRow

character vectors with row and column labels to use; these default to rownames(x) or colnames(x), respectively.

labCol

character vectors with column labels to use; defaults to cells.

ColSideColors

(optional) character vector of length ncol(x) containing the color names for a horizontal side bar that may be used to annotate the columns of x.

RowSideColors

(optional) character vector of length nrow(x) containing the color names for a vertical side bar that may be used to annotate the rows of x.

heatmapfun

Which heatmap function to use. There are many besides the default heatmap. See examples.

...

Additional parameters passed to heatmap function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Find LHNs with Anatomy.type 4 and ephys class 16,17,23 for which we have
# spiking response data
physplit.c161723=subset(PhySplitDB, cell%in% names(Spikes) &
  Anatomy.type==4 & class%in%c(16,17,23))
heatmap_cor_dist(physplit.c161723)

# repeat but with class information
heatmap_cor_dist(physplit.c161723, labRow=physplit.c161723$class,
  labCol=NA, RowSideColors=rainbow(3)[factor(physplit.c161723$class)])

# Same but set limit for the palette
heatmap_cor_dist(physplit.c161723, labRow=physplit.c161723$class,
  labCol=NA, RowSideColors=rainbow(3)[factor(physplit.c161723$class)],
  zlim=c(-1,1))

## use heatmap.2
## Not run: 
library(gplots)
heatmap_cor_dist(physplit.c161723, heatmapfun=heatmap.2)

## End(Not run)

sfrechter/physplit.analysis documentation built on May 29, 2019, 8:02 p.m.