topGenes: Extract the top genes from the Cepo output

View source: R/topGenes.R

topGenesR Documentation

Extract the top genes from the Cepo output

Description

Extract the top genes from the Cepo output

Usage

topGenes(object, n = 5, returnValues = FALSE)

Arguments

object

Output from the Cepo function

n

Number of top genes to extract

returnValues

Whether to return the numeric value associated with the top selected genes

Value

Returns a list of key genes.

Examples

set.seed(1234)
n <- 50 ## genes, rows
p <- 100 ## cells, cols
exprsMat <- matrix(rpois(n * p, lambda = 5), nrow = n)
rownames(exprsMat) <- paste0('gene', 1:n)
colnames(exprsMat) <- paste0('cell', 1:p)
cellTypes <- sample(letters[1:3], size = p, replace = TRUE)
cepo_output <- Cepo(exprsMat = exprsMat, cellTypes = cellTypes)
cepo_output
topGenes(cepo_output, n = 2)
topGenes(cepo_output, n = 2, returnValues = TRUE)

PYangLab/Cepo documentation built on June 29, 2024, 7:16 p.m.