Training scClassify model
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, ... )
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". |
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 |
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 |
list of results or an object of scClassifyTrainModel
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 )#> after filtering not expressed genes #> [1] 980 674 #> [1] "Feature Selection..." #> [1] "Number of genes selected to construct HOPACH tree 160" #> [1] "Constructing tree ..." #> [1] "Training...." #> [1] "=== selecting features by: limma ====" #> [1] "=== selecting features by: BI ===="