predict_scClassify: Testing scClassify model

Description Usage Arguments Value Author(s) Examples

View source: R/predict_scClassify.R

Description

Testing scClassify model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
predict_scClassify(
  exprsMat_test,
  trainRes,
  cellTypes_test = NULL,
  k = 10,
  prob_threshold = 0.7,
  cor_threshold_static = 0.5,
  cor_threshold_high = 0.7,
  features = "limma",
  algorithm = "WKNN",
  similarity = "pearson",
  cutoff_method = c("dynamic", "static"),
  weighted_ensemble = FALSE,
  weights = NULL,
  parallel = FALSE,
  BPPARAM = BiocParallel::SerialParam(),
  verbose = FALSE
)

Arguments

exprsMat_test

A list or a matrix indicates the log-transformed expression matrices of the query datasets

trainRes

A 'scClassifyTrainModel' or a 'list' indicates scClassify trained model

cellTypes_test

A list or a vector indicates cell types of the qurey datasets (Optional).

k

An integer indicates the number of neighbour

prob_threshold

A numeric indicates the probability threshold for KNN/WKNN/DWKNN.

cor_threshold_static

A numeric indicates the static correlation threshold.

cor_threshold_high

A numeric indicates the highest correlation threshold

features

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

algorithm

A vector indicates the KNN method that are used, set as "WKNN" by default. This should be one or more of "WKNN", "KNN", "DWKNN".

similarity

A vector indicates the similarity measure that are used, set as "pearson" by default. This should be one or more of "pearson", "spearman", "cosine", "jaccard", "kendall", "binomial", "weighted_rank","manhattan"

cutoff_method

A vector indicates the method to cutoff the correlation distribution. Set as "dynamic" by default.

weighted_ensemble

A logical input indicates in ensemble learning, whether the results is combined by a weighted score for each base classifier.

weights

A vector indicates the weights for ensemble

parallel

A logical input indicates whether running in paralllel or not

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

Value

list of results

Author(s)

Yingxin Lin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data("scClassify_example")
wang_cellTypes <- scClassify_example$wang_cellTypes
exprsMat_wang_subset <- scClassify_example$exprsMat_wang_subset
data("trainClassExample_xin")

pred_res <- predict_scClassify(exprsMat_test = exprsMat_wang_subset,
trainRes = trainClassExample_xin,
cellTypes_test = wang_cellTypes,
algorithm = "WKNN",
features = c("limma"),
similarity = c("pearson"),
prob_threshold = 0.7,
verbose = TRUE)

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