buildSeed: Build a deconvolution seed matrix

Description Usage Arguments Value Examples

View source: R/MakeSigMatrix.R

Description

Use ranger to select features and build a genesInSeed gene matrix

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
buildSeed(
  trainSet,
  genesInSeed = 200,
  groupSize = 30,
  randomize = TRUE,
  num.trees = 1000,
  plotIt = FALSE,
  trainSet.3sam = NULL,
  trainSet.30sam = NULL
)

Arguments

trainSet

Each row is a gene, and each column is an example of a particular cell type, ie from single cell data

genesInSeed

The maximum number of genes in the returned seed matrix (DEFAULT: 200)

groupSize

The number of groups to break the trainSet into by ADAPTS::scSample (DEFAULT: 30)

randomize

Set to TRUE randomize the sets selected by ADAPTS::scSample (DEFAULT: TRUE)

num.trees

The number of trees to be used by ranger (DEFAULT: 1000)

plotIt

Set to TRUE to plot (DEFAULT: FALSE)

trainSet.3sam

Optional pre-calculated ADAPTS::scSample(trainSet, groupSize = 3) (DEFAULT: NULL)

trainSet.30sam

Optional pre-calculated ADAPTS::scSample(trainSet, groupSize=groupSize, randomize=randomize) (DEFAULT: NULL)

Value

A list with condition numbers and gene lists

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
newSigMat <- buildSeed(trainSet=dataMat)

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