gene_map {ccfindR} | R Documentation

## Plot heatmap of metagene matrix

### Description

Generate heatmap of metagenes derived from factorization of count data.

### Usage

    gene_map(object, rank, markers = NULL, subtract.mean = TRUE,
      log = TRUE, max.per.cluster = 10, Colv = NA, gene.names = NULL,
      main = "Genes", col = NULL, ...)

### Arguments

`object` | Object of class `scNMFSet`.
`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.
`Colv` | `NA` suppresses reordering and dendrogram of clusters along the column. See `heatmap`.
`gene.names` | Names to be used in the plot for genes.
`main` | Title of plot.
`col` | Colors for the cluster panels on the left and top.
`...` | Other arguments to be passed to `heatmap`, `image`, and `plot`.

### Details

Wrapper for `heatmap` to display metagenes and associated basis matrix element magnitudes. Factorization results inside an object specified by its rank value will be retrieved, and metagene sets identified from clusters.

If `object` contains multiple ranks, only the requested rank's basis matrix W will be displayed. The genes displayed in rows are selected by "max" scheme [Carmona-Saez, BMC Bioinformatics (2006), https://doi.org/10.1186/1471-2105-7-54]: for each cluster (`k in 1:ncol`), rows of W are sorted by decreasing order of `W[,k]`. Marker genes for `k` are those among the top `nmarker` for which `W[,k]` is maximum within each row.

### Value

`NULL`

### Examples

    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)
    gene_map(s, rank=3)

[Package ccfindR version 1.4.2 Index]