Map samples to a training dataset by correlation

map_by_cor(train.dat, train.cl, test.dat, method = "median")

Arguments

train.dat

Training data matrix, usually log-transformed CPM

train.cl

Training cluster factor object

test.dat

Data for cells to map to the training set. Should have the same genes as train.dat.

method

Which statistic to compare. "median" or "mean". Default is "median".

Value

a list object containing two objects:

  • pred.df: a data.frame with two columns, pred.cl and pred.score with the predicted cluster and correlation scores.

  • cor.matrix: a matrix object with correlation scores for each cluster.