gListFromRF: Build a gList using random forest

Description Usage Arguments Value Examples

View source: R/MakeSigMatrix.R

Description

Use ranger to select features and build a genesInSeed gene matrix

Usage

1
gListFromRF(trainSet, oneCore = FALSE)

Arguments

trainSet

Each row is a gene, and each column is an example of a particular cell type, e.g. ADAPTS::scSample(trainSet, groupSize=30)

oneCore

SEt to TRUE to disable multicore (DEFAULT: FALSE)

Value

A cell specific geneList for ADAPTS::AugmentSigMatrix()

Examples

1
2
3
4
5
6
7
8
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 <- gListFromRF(trainSet=dataMat, oneCore=TRUE)

yxinyi2/ADAPTS1.0.3 documentation built on Aug. 5, 2020, 12:09 a.m.