Predict annotations of query cells from the reference using k-NN method
knnPredict(
query_obj,
ref_obj,
train_labels,
k = 5,
save_as = "cell_type_pred_knn",
confidence = TRUE,
seed = 0
)Symphony query object, with predicted reference labels stored in the 'save_as' slot of the query$meta_data
Symphony query object
Symphony reference object
vector of labels to train
number of neighbors
string that result column will be named in query metadata
return k-NN confidence scores (proportion of neighbors voting for the predicted annotation)
random seed (k-NN has some stochasticity in the case of ties)