View source: R/MakeSigMatrix.R
matrixToGenelist | R Documentation |
Provide a gList and signature matrix with matched cell types to get signatures gene lists for GSVA and similar algorithms. gList=NULL select highest genes for each cell type, minimum of 3.
matrixToGenelist(sigMat, gList = NULL)
sigMat |
A signature matrix such as from ADAPTS::AugmentSigMatrix() |
gList |
A list of prioritized genes such as from ADAPTS::gListFromRF() (DEFAULT:NULL) |
A list of genes for each cell types musually in sigMat and gList
library(ADAPTS) ct1 <- runif(1000, 0, 100) ct2 <- runif(1000, 0, 100) dataMat <- cbind(ct1, ct1, ct1, ct1, ct1, ct1, ct2, ct2, ct2, ct2) rownames(dataMat) <- make.names(rep('gene', nrow(dataMat)), unique=TRUE) noise <- matrix(runif(nrow(dataMat)*ncol(dataMat), -2, 2), nrow = nrow(dataMat), byrow = TRUE) dataMat <- dataMat + noise gList <- ADAPTS::gListFromRF(trainSet=dataMat, oneCore=TRUE) newSigMat <- ADAPTS::buildSeed(trainSet=dataMat, plotIt=FALSE) geneLists <- matrixToGenelist(sigMat=newSigMat, gList=gList)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.