Testing scClassify model

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

Examples

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)
#> Ensemble learning is disabled... #> Using parameters: #> similarity algorithm features #> "pearson" "WKNN" "limma" #> [1] "Using dynamic correlation cutoff..." #> [1] "Using dynamic correlation cutoff..." #> classify_res #> correct correctly unassigned intermediate #> 0.704590818 0.239520958 0.000000000 #> incorrectly unassigned error assigned misclassified #> 0.000000000 0.051896208 0.003992016 #> weights for each base method: #> numeric(0)