Testing scClassify model (joint training)

predict_scClassifyJoint(
  exprsMat_test,
  trainRes,
  cellTypes_test,
  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"),
  parallel = FALSE,
  BPPARAM = BiocParallel::SerialParam(),
  verbose = FALSE
)

Arguments

exprsMat_test

A list or a matrix indicates the expression matrices of the testing datasets

trainRes

A `scClassifyTrainModel` or a `list` indicates scClassify training model

cellTypes_test

A list or a vector indicates cell types of the testing 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 method to select features, 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.

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

Examples

data("scClassify_example") wang_cellTypes <- scClassify_example$wang_cellTypes exprsMat_wang_subset <- scClassify_example$exprsMat_wang_subset data("trainClassExample_xin") data("trainClassExample_wang") trainClassExampleJoint <- scClassifyTrainModelList(trainClassExample_wang, trainClassExample_xin) pred_res_joint <- predict_scClassifyJoint(exprsMat_test = exprsMat_wang_subset, trainRes = trainClassExampleJoint, cellTypes_test = wang_cellTypes, algorithm = "WKNN", features = c("limma"), similarity = c("pearson"), prob_threshold = 0.7, verbose = FALSE) table(pred_res_joint$jointRes$cellTypes, wang_cellTypes)
#> wang_cellTypes #> acinar alpha beta delta ductal gamma stellate #> acinar 4 0 0 0 0 0 0 #> alpha 0 206 0 0 0 0 0 #> beta 0 0 118 0 0 0 0 #> delta 0 0 0 10 0 0 0 #> ductal 0 0 0 0 93 0 0 #> gamma 0 0 0 0 0 21 0 #> intermediate 1 0 0 0 3 0 0 #> stellate 0 0 0 0 0 0 45