feature_map: Plot heatmap of basis matrix

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

Generate heatmap of features derived from factorization of count data.

Usage

1
2
3
4
5
feature_map(object, basis.matrix = NULL, rank, markers = NULL,
  subtract.mean = TRUE, log = TRUE, max.per.cluster = 10,
  feature.names = NULL, perm = NULL, main = "Feature map",
  cscale = NULL, cex.cluster = 1, cex.feature = 0.5, mar = NULL,
  ...)

Arguments

object

Object of class scNMFSet.

basis.matrix

Basis matrix can be supplied instead of object.

rank

Rank value for which the gene map is to be displayed. The object must contain the corresponding slot (one element of basis(object)[[k]] for which ranks(object)[[k]]==rank.

markers

Vector of gene names containing markers to be included in addition to the metagenes. All entries of rowData(object) matching them will be added to the metagene list.

subtract.mean

Process each rows of basis matrix W by standardization using the mean of elements within the row.

log

If TRUE, subtract.mean uses geometric mean and division. Otherwise, use arithmetic mean and subtraction.

max.per.cluster

Maximum number of metagenes per cluster.

feature.names

Names to be used in the plot for features.

perm

Permutation of cluster IDs.

main

Main title.

cscale

Colors for heatmap.

cex.cluster

Cluster ID label size.

cex.feature

Feature ID label size.

mar

Margins for graphics::par.

...

Other arguments to be passed to image, and plot.

Details

This function uses image() and is more flexible than gene_map.

If object contains multiple ranks, only the requested rank's basis matrix W will be displayed. As in gene_map, the features displayed in rows are selected by "max" scheme

Value

NULL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 
set.seed(1)
x <- simulate_data(nfeatures=10,nsamples=c(20,20,60))
rownames(x) <- seq_len(10)
 
set.seed(1)
x <- simulate_data(nfeatures=10,nsamples=c(20,20,60))
rownames(x) <- seq_len(10)
colnames(x) <- seq_len(100)
s <- scNMFSet(count=x,rowData=seq_len(10), colData=seq_len(100))
s <- vb_factorize(s,ranks=seq(2,5))
plot(s)
feature_map(s, rank=3)

ccfindR documentation built on Nov. 8, 2020, 5:12 p.m.