ct.plot.heatmap: Gene Expression Heatmap

Description Usage Arguments Value Examples

View source: R/cellTree.R

Description

Plots a heatmap of gene expression, with cells ordered according to the structure computed by compute.backbone.tree.

Usage

1
2
ct.plot.heatmap(data, b.tree, log.scale = TRUE, sd.filter = 0.7,
  reorder.genes = TRUE)

Arguments

data

A matrix of (non-negative) RNA-seq expression levels where each row is a gene and each column is the cell sequenced.

b.tree

igraph object returned by compute.backbone.tree.

log.scale

Boolean (optional). Whether the data should be log-scaled.

sd.filter

Numeric or FALSE (optional). Standard-deviation threshold below which genes should be removed from the data (no filtering if set to FALSE).

reorder.genes

Boolean (optional). Whether the gene rows should be reordered using a dendrogram of their mean value.

Value

data object reordered according to the backbone tree, such as used to plot the heatmap.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Load pre-computed LDA model for skeletal myoblast RNA-Seq data from HSMMSingleCell package:
data(HSMM_lda_model)

# Recover sampling time (in days) for each cell:
library(HSMMSingleCell)
data(HSMM_sample_sheet)
days.factor = HSMM_sample_sheet$Hours
days = as.numeric(levels(days.factor))[days.factor]

# Compute near-optimal backbone tree:
b.tree = compute.backbone.tree(HSMM_lda_model, days)
# Plot heatmap:
data(HSMM_expr_matrix)
ct.plot.heatmap(HSMM_expr_matrix[1:2000,], b.tree, reorder.genes=FALSE)

cellTree documentation built on Nov. 8, 2020, 5:05 p.m.