topGenes | R Documentation |
For a given beta matrix (cell-type gene distribution matrix), returns the top n genes based on their probability.
topGenes(beta, n = 10)
beta |
beta matrix (cell-type gene distribution matrix) |
n |
number of top genes for each deconvolved cell-type to return (default: 10) |
a list where each item is a vector of the top genes and their associated probabilities for a given deconvolved cell-type
data(mOB)
pos <- mOB$pos
cd <- mOB$counts
counts <- cleanCounts(cd, min.lib.size = 100)
corpus <- restrictCorpus(counts, removeAbove=1.0, removeBelow = 0.05)
ldas <- fitLDA(t(as.matrix(corpus)), Ks = 3, ncores=2)
optLDA <- optimalModel(models = ldas, opt = 3)
results <- getBetaTheta(optLDA, perc.filt = 0.05, betaScale = 1000)
deconGexp <- results$beta
genes <- topGenes(deconGexp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.