train_scClassify: Training scClassify model

Description Usage Arguments Value Author(s) Examples

View source: R/train_scClassify.R

Description

Training scClassify model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
train_scClassify(
  exprsMat_train,
  cellTypes_train,
  tree = "HOPACH",
  selectFeatures = "limma",
  topN = 50,
  hopach_kmax = 5,
  pSig = 0.05,
  cellType_tree = NULL,
  weightsCal = FALSE,
  parallel = FALSE,
  BPPARAM = BiocParallel::SerialParam(),
  verbose = TRUE,
  returnList = TRUE,
  ...
)

Arguments

exprsMat_train

A matrix of log-transformed expression matrix of reference dataset

cellTypes_train

A vector of cell types of reference dataset

tree

A vector indicates the method to build hierarchical tree, set as "HOPACH" by default. This should be one of "HOPACH" and "HC" (using stats::hclust).

selectFeatures

A vector indicates the gene selection method, set as "limma" by default. This should be one or more of "limma", "DV", "DD", "chisq", "BI", "Cepo".

topN

An integer indicates the top number of features that are selected

hopach_kmax

An integer between 1 and 9 specifying the maximum number of children at each node in the HOPACH tree.

pSig

A numeric indicates the cutoff of pvalue for features

cellType_tree

A list indicates the cell type tree provided by user. (By default, it is NULL)

weightsCal

A logical input indicates whether we need to calculate the weights for the model.

parallel

A logical input indicates whether the algorihms will run in parallel

BPPARAM

A BiocParallelParam class object from the BiocParallel package is used. Default is SerialParam().

verbose

A logical input indicates whether the intermediate steps will be printed

returnList

A logical input indicates whether the output will be class of list

...

Other input for predict_scClassify for the case when weights calculation of the pretrained model is performed

Value

list of results or an object of scClassifyTrainModel

Author(s)

Yingxin Lin

Examples

1
2
3
4
5
6
7
8
data("scClassify_example")
xin_cellTypes <- scClassify_example$xin_cellTypes
exprsMat_xin_subset <- scClassify_example$exprsMat_xin_subset
trainClass <- train_scClassify(exprsMat_train = exprsMat_xin_subset,
cellTypes_train = xin_cellTypes,
selectFeatures = c("limma", "BI"),
returnList = FALSE
)

SydneyBioX/scClassify documentation built on Oct. 22, 2021, 4:03 p.m.